-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cut holes in mesh #144
Comments
Progress update: It is stated in the comments that input polygons need to be dense. This means that naively omitting selected faces will obviously not work. geometry-central/src/surface/manifold_surface_mesh.cpp Lines 48 to 50 in ebe4029
A workaround I found is to first construct a SimplePolygonMesh, compress it and then create a ManifoldSurfaceMesh SimplePolygonMesh simpleMesh(meshFaces, vertexPositions);
simpleMesh.stripUnusedVertices();
auto lvals = makeManifoldSurfaceMeshAndGeometry(simpleMesh.polygons, simpleMesh.vertexCoordinates); This works, but is relatively slow for larger meshes and recreating all connectivity from scratch on each mutation definitely feels heavy-handed. I'd still like to understand how to correctly delete faces from an existing mesh. I found the following description in the docs:
Does deleting a face mean setting all the core arrays to INVALID_IND for all halfedges describing this face? std::vector<size_t> heNextArr; // he.next(), forms a circular singly-linked list in each face
std::vector<size_t> heVertexArr; // he.vertex()
std::vector<size_t> heFaceArr; // he.face()
std::vector<size_t> vHalfedgeArr; // v.halfedge()
std::vector<size_t> fHalfedgeArr; // f.halfedge() |
+1 for a feature request. |
First of all, a huge thanks for creating this fantastic library!
I've been experimenting with GC inside of Rhino to work with modelling terrains. One thing I'm struggling with is cutting holes in the mesh. Consider this basic example:
Initial mesh:
Faces to remove:
Resulting mesh with a hole inside:
I tried several approaches:
geometry-central/src/surface/manifold_surface_mesh.cpp
Line 48 in ebe4029
This fails here:
geometry-central/src/surface/manifold_surface_mesh.cpp
Lines 154 to 161 in ebe4029
geometry-central/src/surface/manifold_surface_mesh.cpp
Line 671 in ebe4029
Which fails here;
geometry-central/src/surface/manifold_surface_mesh.cpp
Lines 808 to 814 in ebe4029
Is there a straight-forward way to define an edge loop as a boundary?
@nmwsharp, @MarkGillespie, @keenancrane
The text was updated successfully, but these errors were encountered: