1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0027555: Visualization, AIS_Shape - own deviation coefficient change is not considered by Wireframe presentation mode

This commit is contained in:
kgv
2016-05-31 16:18:36 +03:00
committed by bugmaster
parent 52db475165
commit 83b0f13a58
6 changed files with 75 additions and 39 deletions

View File

@@ -310,14 +310,8 @@ void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
if (myDrawer->IsAutoTriangulation())
{
// compute mesh for entire shape beforehand to ensure consistency and optimizations (parallelization)
Standard_Real anAnglePrev, anAngleNew, aCoeffPrev, aCoeffNew;
Standard_Boolean isOwnDeviationAngle = OwnDeviationAngle (anAngleNew, anAnglePrev);
Standard_Boolean isOwnDeviationCoefficient = OwnDeviationCoefficient(aCoeffNew, aCoeffPrev);
if ((isOwnDeviationAngle && Abs (anAngleNew - anAnglePrev) > Precision::Angular())
|| (isOwnDeviationCoefficient && Abs (aCoeffNew - aCoeffPrev) > Precision::Confusion()))
{
BRepTools::Clean (myshape);
}
StdPrs_ToolTriangulatedShape::ClearOnOwnDeflectionChange (myshape, myDrawer, Standard_True);
// After this call if type of deflection is relative
// computed deflection coefficient is stored as absolute.
Standard_Boolean wasRecomputed = StdPrs_ToolTriangulatedShape::Tessellate (myshape, myDrawer);
@@ -331,6 +325,8 @@ void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
}
else // WireFrame mode
{
StdPrs_ToolTriangulatedShape::ClearOnOwnDeflectionChange (myshape, myDrawer, Standard_True);
// After this call if type of deflection is relative
// computed deflection coefficient is stored as absolute.
Prs3d::GetDeflection (myshape, myDrawer);