Closed dstoutamire closed 6 years ago
However, in this case remove_isolated_vertices_raw does work:
v, f, info = pm.remove_isolated_vertices_raw(b.vertices, b.faces)
b = pm.form_mesh(v, f)
...
num_vertex_removed: 343
Here is 5:
[5 0 1]
[5 4 0]
[9 5 1]
[15 4 5]
[17 5 9]
[17 15 5]
Here is 6:
[0 6 3]
[0 4 6]
[ 3 6 12]
[ 4 16 6]
[ 6 18 12]
[ 6 16 18]
Here is 7:
[1 8 7]
[9 1 7]
[ 7 8 20]
[ 7 20 19]
[21 9 7]
[21 7 19]
This is because pymesh.generate_box_mesh
creates a volumetric mesh (i.e. b.voxels
are not empty). So, the isolated vertices you found are actually interior vertices used by voxels. If you only need a surface mesh, you can form a new mesh from vertices and the faces only:
b = pm.generate_box_mesh((0,0,0), (10,10,10), subdiv_order=3)
b = pm.form_mesh(b.vertices, b.faces) # Extract the surface mesh.
b, info = pm.remove_isolated_vertices(b)
I see. The documentation does indeed make it clear that something special is going on with tets, unlike the other procedural mesh generators.
This produces the output
Vertex 6 should have been removed as there are no referencing faces.