-
Notifications
You must be signed in to change notification settings - Fork 1
validity‐first‐polycube‐labeling
https://github.com/LIHPC-Computational-Geometry/validity-first-polycube-labeling
To build and execute, see the README
# tetrahedrization with Gmsh
# https://gmsh.info/
gmsh input.step -3 -format mesh -o tet.mesh -setnumber Mesh.CharacteristicLengthFactor 0.1
# extract the surface, triangle mesh & store the triangle-to-tetra map for later
./bin/extract_surface tet.mesh surface.obj surface_map.txt
# run the labeling algorithm
./bin/automatic_polycube surface.obj gui=false output=surface_labeling.txt
# generate the per-tetrahedron-facet labeling using the triangle-to-tetra map
./bin/volume_labeling surface_labeling.txt surface_map.txt volume_labelign.txt
# simple polycube parametrization then HexEx (Lyon et al. 2016)
# https://github.com/fprotais/polycube_withHexEx
polycube tet.mesh volume_labelign.txt hex.mesh 1.0
Geogram provides the Application
, SimpleApplication
and SimpleMeshApplication
classes.
On top of that, I created a SimpleMeshApplicationExt
class in include/gui_base.h
, to add:
- An overlay with groups of points and groups of edges. All items in a group have the same color, and are displayed/hidden simultaneously.
- A
ColorArray
class : a vector of colors that can be access both as floats (for ImGui) and as chars (for OpenGL textures). - A
update_GL_texture()
to update a texture at runtime - A
pick()
function to retrieve the vertex/edge/facet/cell under the cursor. See discussion #88 and pull request #102 in the Geogram repo.
My LabelingViewerApp
(include/gui_labeling.h
), my HexMeshViewerApp
(app/hex_mesh_viewer.cpp
) and my AreasToTiltApp
(app/areas_to_tilt.cpp
) inherit SimpleMeshApplicationExt
.
LabelingViewerApp
is itself the base of:
-
AutomaticPolycubeApp
(app/automatic_polycube.cpp
) : add buttons for labeling edition operators -
GraphCutLabelingApp
(app/graphcut_labeling.cpp
) : adjustable graph-cut optimization weights for labeling generation -
HalfedgeMovementsApp
(app/halfedge_movements.cpp
) : add buttons to move a halfedge on a surface mesh -
LabelingPainterApp
(app/labeling_painter.cpp
) : add a label selector as well as buttons for the pencil, bucket fill and pipette tools.
Where the labeling (vector) only encode the per-facet labels, the labeling graph stores higher level information: charts (patches of adjacent facets having the same label), boundaries (successive edges between charts) and corners (vertices where boundaries meet).
I think the Evocube equivalent is in include/chart.h
(updateCharts()
, computeBoundaries()
) and in include/labeling_individual.h
(updateChartsAndTPs()
)
TODO
TODO
Turning-points identification
TODO