mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Use poly2tri for triangulation. This fixes some cases where polyPartition couldn't triangulate successfully. Reported as issue #9 in polyPartition repository. Tested with MotorHalter_0.stl cut at 1.2
This commit is contained in:
parent
60f640f100
commit
edeb0a90dd
19 changed files with 2830 additions and 6 deletions
|
@ -923,7 +923,7 @@ TriangleMeshSlicer::cut(float z, TriangleMesh* upper, TriangleMesh* lower)
|
|||
// triangulate section
|
||||
Polygons triangles;
|
||||
for (ExPolygons::const_iterator expolygon = section.begin(); expolygon != section.end(); ++expolygon)
|
||||
expolygon->triangulate_pp(&triangles);
|
||||
expolygon->triangulate_p2t(&triangles);
|
||||
|
||||
// convert triangles to facets and append them to mesh
|
||||
for (Polygons::const_iterator polygon = triangles.begin(); polygon != triangles.end(); ++polygon) {
|
||||
|
@ -951,7 +951,7 @@ TriangleMeshSlicer::cut(float z, TriangleMesh* upper, TriangleMesh* lower)
|
|||
// triangulate section
|
||||
Polygons triangles;
|
||||
for (ExPolygons::const_iterator expolygon = section.begin(); expolygon != section.end(); ++expolygon)
|
||||
expolygon->triangulate_pp(&triangles);
|
||||
expolygon->triangulate_p2t(&triangles);
|
||||
|
||||
// convert triangles to facets and append them to mesh
|
||||
for (Polygons::const_iterator polygon = triangles.begin(); polygon != triangles.end(); ++polygon) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue