-
Notifications
You must be signed in to change notification settings - Fork 1
PolyCut
M. Livesu, N. Vining, A. Sheffer, J. Gregson, and R. Scateni, "PolyCut: Monotone Graph-Cuts for PolyCube Base-Complex Construction", ACM Transactions on Graphics, Volume 32, Issue 6 (SIGGRAPH ASIA 2013 Papers), p.853‑860, doi: 10.1145/1186562.1015810
Project page : http://www.cs.ubc.ca/labs/imager/tr/2013/polycut/
Patented, see https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2015061914 (but "withdrawn" status at European Patent Office since 2020)
http://www.cs.ubc.ca/labs/imager/tr/2018/HexDemo/
There is also an executable for their untangler (Edge-Cone Rectification)
Important
Executable provided for Windows only.
Important
This is not written in their webpage nor their README: the demo executable polycut.exe only processes tet-meshes with < 300k cells.
Important
Contrary to what is written in the 8th clause of their software license agreement, the demo is available for 7 days, not 30.
You will need a new Windows VM if you exceed 7 days since first use. Or try to remove the whole 'University of British Columbia' folder inside Documents\, which contains PolyCut\license.dat?
The required file format for the polycut.exe inputs is VTU (.vtu): VTKFile of type UnstructuredGrid and version 0.1.
They provide a MEDIT-to-VTU converter, mesh2vtu.exe. First positional argument is the input VTU, the second is the output MEDIT/Gamma (.mesh).
Important
This is not written in their README : the input MEDIT tetrahedral mesh must contain the surface (triangle) mesh in the same file. See this program and this commit to generate such a mesh with Geogram.
Note
One of the provided .vtu example meshes (asm_tets) have raw binary embedded. meshio can read but cannot write such VTU files (not valid XML, see issue #483), but mesh2vtu.exe and other example meshes shows that polycut.exe accepts other kinds of VTUs, those with a base64 section instead of embedded raw binary. So meshio could be used to substitute mesh2vtu.exe.
From their pipeline.bat :
polycut.exe tet-mesh.vtu tet-mesh_segm.vtu 3
# for a compactness factor of 3
cusy2.exe tet-mesh_segm.vtu tet-mesh_segm_deform.vtu
# also writes 'segmentation_XYZ.obj' and 'segmentation.mtl'
optimizer.exe tet-mesh_segm_deform.vtu tet-mesh_segm_deform_opt.vtu 100
# for an element size (min hex size) of 100
integerizer.exe tet-mesh_segm_deform_opt.vtu hex-mesh.vtu
vtu2mesh.exe hex-mesh.vtu hex-mesh.mesh
untangler.exe --in hex-mesh.mesh`
# writes 'hex_features.obj', 'hex_scaled.mesh', 'hex_smooth.mesh', 'hex_smooth_scaled.mesh'
# and (most of the time?) 'hex_highest_quality.mesh'I do not know if it is possible to retrieve the polycube labeling from the output of polycut.exe (*_segm.vtu).
Like Evocube, in validity‐first‐polycube‐labeling the labeling is extracted from the material names of segmentation_XYZ.obj, the latter being generated by cusy2.exe.
| Material name | Corresponding label |
|---|---|
| red | 0 (+X) |
| darkred | 1 (-X) |
| green | 2 (+Y) |
| darkgreen | 3 (-Y) |
| blue | 4 (+Z) |
| darkblue | 5 (-Z) |
Output hexahedral meshes are in the MEDIT (.mesh) format.



