mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
0023200: Visualization - prevent multiple triangulating of a shape that already has been triangulated
Add new flag IsAutoTriangulated to Prs3d_Drawer. It is True by default. If this flag is True automatic re-triangulation with deflection-check logic will be applied. Else this feature will be disable and triangulation is expected to be computed by application itself. Change the syntax of vdefalts command. Add new parameter -autoTriang for check of AutoTriangulated functionality. Adjust camera position in test case bugs/xde/bug23969
This commit is contained in:
@@ -64,9 +64,12 @@ void StdPrs_HLRPolyShape::Add(const Handle (Prs3d_Presentation)& aPresentation,
|
||||
TColgp_SequenceOfPnt HiddenPnts;
|
||||
TColgp_SequenceOfPnt SeenPnts;
|
||||
|
||||
const Standard_Boolean rel = aDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE;
|
||||
Standard_Real def = rel? aDrawer->HLRDeviationCoefficient() : aDrawer->MaximalChordialDeviation();
|
||||
BRepMesh_IncrementalMesh mesh(aShape, def, rel, aDrawer->HLRAngle());
|
||||
if (aDrawer->IsAutoTriangulation())
|
||||
{
|
||||
const Standard_Boolean aRel = aDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE;
|
||||
Standard_Real aDef = aRel ? aDrawer->HLRDeviationCoefficient() : aDrawer->MaximalChordialDeviation();
|
||||
BRepMesh_IncrementalMesh mesh(aShape, aDef, aRel, aDrawer->HLRAngle());
|
||||
}
|
||||
|
||||
Handle(HLRBRep_PolyAlgo) hider = new HLRBRep_PolyAlgo(aShape);
|
||||
|
||||
|
Reference in New Issue
Block a user