-
Notifications
You must be signed in to change notification settings - Fork 110
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
Mesh Simplification is incomplete after one pass #675
Comments
Yeah, that's probably a good idea for a stand-alone |
This is due to the order in which we perform edge collapses. We currently only do one pass over the list of halfedges in the order in the vector, but collapsing a halfedge with index |
Yeah, agreed. Currently |
Wonder what the black thing in your first photo is. Is this a bug in our boolean impl? And yeah, the lump of triangles not being simplified at the end is also interesting. |
I would guess the black thing is a thin, disconnected mesh that's likely responsible for the genus being 1 low (an extra separate mesh will do that). On a second pass, I'm guessing it got simplified down to nothing. |
Yep; that’s right! This is the same bug that was seen with Offset with the sliver meshes. Simplify can often eliminate them (but not always). |
is there any method to simplify mesh to polyhedron? (list of polygons, not only tri_verts, and tri_faces) |
|
I got the face_id, I want a structure just like mesh. vert is n x 3, but faces is 2d list. not tri_face. I had got the faces id, so Is there a simple method to produce the face list? or need I do some geometry analysis? (I just deal with face without holes) |
Just |
import manifold3d as mfd
cube = mfd.Manifold.cube((1,1,1))
mesh = cube.to_mesh()
out:
mesh.vert_properties
array([[0., 0., 0.],
[0., 0., 1.],
[0., 1., 0.],
[0., 1., 1.],
[1., 0., 0.],
[1., 0., 1.],
[1., 1., 0.],
[1., 1., 1.]], dtype=float32)
mesh.tri_verts
array([[1, 0, 4],
[2, 4, 0],
[1, 3, 0],
[3, 1, 5],
[3, 2, 0],
[3, 7, 2],
[5, 4, 6],
[5, 1, 4],
[6, 4, 2],
[7, 6, 2],
[7, 3, 5],
[7, 5, 6]], dtype=int32)
mesh.face_id
[0, 1, 2, 3, 2, 5, 6, 0, 1, 5, 3, 6] I want to trans the tri-mesh to polyhedron. (for a cube, I need 4 index to describe a face) |
That's right, you'll need to merge them back into a polygon(s) by removing interior edges. Best you do that yourself, since naively they may produce concave polygons or polygons with holes, which you may want to avoid. |
ok, I will process it myself. but is there an simple method to get the face polygon, when assuming the mesh is convex. |
Lots of ways - e.g. find the half edges without pairs and assemble them into a loop. |
@elalish if you can verify if this is fixed or not, we can close this issue. |
Fixed by #894 - |
Yeah, certainly worth a look. We've got a bunch of breaking changes to close out for v3.0, but if you'd like to take another look, that would be great. |
@elalish It seems like there's room for additional simplification after one pass; perhaps topology should be simplified until no changes are made?
Pass 0:
Pass 1:
Pass 2:
The text was updated successfully, but these errors were encountered: