generate_polyline_from_planar_section results have incomplete sectionsurface meshes created.
danwbean opened this issue · comments
I am generating cross-section slices using ms.apply_filter('generate_polyline_from_planar_section', planeaxis=planeaxis, planeoffset=planeoffset, createsectionsurface=True)
I then use ms.apply_filter('get_geometric_measures') to get properties (like area) for the section (so I need the meshes). I then save the polyline and related geometry.
Two meshes are created 1) a polyline with vertices and edges and 2) a sectionsurface mesh with vertices and faces.
In some cases only vertices are produced (no face or edges).
See below. Thanks for a great program.
After more experimentation, this appears to be a bug in generate_polyline_from_planar_section:
The attached zip file contains G2246.ply, a closed watertight mesh to cut with a planar section perpendicular to Y axis at Y=0
- The resulting section polyline only has vertices with no edges.
- The resulting sectionsurface only has vertices with no faces.
The routine works correctly on many meshes, but fails here. The mesh topology looks OK.
The mesh does have variable inter-vertex spacing from scanning.
Workflow:
Load ply mesh and check topology:
G2246.ply in 223 msec
All files opened in 226 msec
V: 172164 E: 516486 F:344324 (watertight object mesh to be cut)
Unreferenced Vertices 0
Boundary Edges 0
Mesh is composed by 1 connected component(s)
Mesh is two-manifold
Mesh has 0 holes
Genus is 0
Cut planar section perpendicular to Y axis at y=0 (including section surface)
Applied filter Compute Planar Section in 451 msec
V: 1449 E: 0 F: 0 (planar section polyline)
Unreferenced Vertices 0
Boundary Edges 0
Mesh is composed by 0 connected component(s)
Mesh is two-manifold
Mesh has 0 holes
Genus is -724
The section polyline vertices above are correct, but it has no edges. (What is going on with Genus?)
V: 1449 E: 0 F: 0 (filled section)
Unreferenced Vertices 1449
Boundary Edges 0
Mesh is composed by 0 connected component(s)
Mesh is two-manifold
Mesh has 0 holes
Genus is 0
The filled section vertices above are correct, but it has no faces.
This can be duplicated with the attached mesh file.
In pymeshlab, the calling context is:
ms.apply_filter('generate_polyline_from_planar_section', planeaxis='Y Axis',
planeoffset=0.0, createsectionsurface=True)