Tools: tweak mesh generation

Mesh generation parameters are taken from PrusaSlicer's STEP importer,
which does a just-in-time STEP->STL conversion in memory.

Resulting meshes have better geometry, but are a little larger as a result.
This commit is contained in:
Pascal de Bruijn
2023-01-30 19:13:56 +01:00
committed by Chris Hennes
parent 1ab36e21e8
commit 3ecff9588e

View File

@@ -645,7 +645,7 @@ Handle (Poly_Triangulation) Part::Tools::triangulationOfFace(const TopoDS_Face&
TopoDS_Shape shape = mkBuilder.Shape();
shape.Location(loc);
BRepMesh_IncrementalMesh(shape, 0.1);
BRepMesh_IncrementalMesh(shape, 0.005, false, 1, true);
return BRep_Tool::Triangulation(TopoDS::Face(shape), loc);
}
@@ -671,7 +671,7 @@ Handle(Poly_Polygon3D) Part::Tools::polygonOfEdge(const TopoDS_Edge& edge, TopLo
TopLoc_Location inv = loc.Inverted();
shape.Location(inv);
BRepMesh_IncrementalMesh(shape, 0.1);
BRepMesh_IncrementalMesh(shape, 0.005, false, 1, true);
TopLoc_Location tmp;
return BRep_Tool::Polygon3D(TopoDS::Edge(shape), tmp);
}