aleutgeb / STEPToXSection

The program STEPToXSection is a command line utility to export the contour of a planar cross section of solids contained in STEP files. It supports surface offsetting of the input geometry and in-plane curve offsetting. The in-plane base contour can also result from the orthogonal projection of geometries (silhouette) onto the plane within a specified maximum plane distance.
GNU Lesser General Public License v2.1
13 stars 4 forks source link

Issues with polygon results of multi-slicing #5

Closed yvanblanchard closed 2 years ago

yvanblanchard commented 2 years ago

Hello,

when calling your 'multiple slicing' on the 'bone' test case (with Polygon output type), the final results (in the output .ply file) does not look good: the triangles shared a same vertex/node, leading to triangles edges crossing the 'bone" slice boundary (see image). I expected to have a kind of delaunay triangulation inside the slice boundary.

image

image

aleutgeb commented 2 years ago

Hello,

currently the command line utility extracts contours using the ply format in the following way. In the case of the format "ply_edges" the ply file contains elements with two vertex indices per element (line segments). In the case of the format "ply_polygons" the ply file contains elements with an arbitrary number of vertex indices per element, where two neighboring vertices represent one line segment of the contour. According to the ply specification (http://paulbourke.net/dataformats/ply) faces with more than three vertices are interpreted in a triangle fan way (center of the fan is always the first vertex). Because our tools use the sequence of vertices only for contour information this is not an issue for us, but 3D viewers will interprete the sequence in a triangle fan way resulting in an erroneous visualization (see your illustration).

Kind regards, Alex

yvanblanchard commented 2 years ago

That's very clear. Thank you Alex