Part: clean mesh before adding triangulation in setupCoinGeometry
Calling BRepMesh_IncrementalMesh repeatedly would accumulate BRep_CurveRepresentation instances attached to the BRep_TEdges of the shape. We now clean added triangulations before adding a new one, which improves performance in the long run. Co-authored-by: Kacper Donat <kadet1090@gmail.com>
This commit is contained in:
committed by
Kacper Donat
parent
0af22943b2
commit
3601161d80
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||
#include <BRepExtrema_DistShapeShape.hxx>
|
||||
@@ -1095,6 +1096,13 @@ void ViewProviderPartExt::setupCoinGeometry(
|
||||
meshParams.InParallel = Standard_True;
|
||||
meshParams.AllowQualityDecrease = Standard_True;
|
||||
|
||||
// Clear triangulation and PCurves from geometry which can slow down the process
|
||||
#if OCC_VERSION_HEX < 0x070600
|
||||
BRepTools::Clean(shape);
|
||||
#else
|
||||
BRepTools::Clean(shape, Standard_True);
|
||||
#endif
|
||||
|
||||
BRepMesh_IncrementalMesh(shape, meshParams);
|
||||
|
||||
// We must reset the location here because the transformation data
|
||||
|
||||
Reference in New Issue
Block a user