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

0025300: Visualization - Build wireframe representation consistent with the shape's triangulation

1) Remove duplicating presentation algorithms for shapes StdPrs_WFShape, StdPrs_WFDeflectionShape.
2) Rewrite Prs3d_WFShape to use deflection for non-triangulated shapes and rename it to StdPrs_WFShape.
3) Revise and correct references in code.
4) Rename StdPrs_ToolShadedShape to StdPrs_ToolTriangulatedShape (reused in StdPrs_WFShape, StdPrs_ShadedShape).
5) Add StdPrs_BndBox for drawing bounding box presentation.
6) Implemented on-triangulation isoline builder.
7) Add option -isoontriangulation to vaspects command to enable on-triangulation isoline builder for shape.
8) Drawer's maximum UV parameter value is taken into account in isolines calculation correctly.
9) Add option -setMaxParamValue to vaspects command to change drawer's maximum UV parameter value.
This commit is contained in:
vpa
2015-04-22 00:53:37 +03:00
committed by ski
parent 9ebaae3797
commit 5ad8c033aa
49 changed files with 2075 additions and 1483 deletions

View File

@@ -34,8 +34,8 @@
#include <PrsMgr_PresentationManager3d.hxx>
#include <Standard_ErrorHandler.hxx>
#include <StdPrs_ShadedShape.hxx>
#include <StdPrs_ToolShadedShape.hxx>
#include <StdPrs_WFDeflectionShape.hxx>
#include <StdPrs_ToolTriangulatedShape.hxx>
#include <StdPrs_WFShape.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
@@ -317,7 +317,13 @@ void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
}
// After this call if type of deflection is relative
// computed deflection coefficient is stored as absolute.
StdPrs_ShadedShape::Tessellate (myshape, myDrawer);
Standard_Boolean wasRecomputed = StdPrs_ToolTriangulatedShape::Tessellate (myshape, myDrawer);
// Set to update wireframe presentation on triangulation.
if (myDrawer->IsoOnTriangulation() && wasRecomputed)
{
SetToUpdate (AIS_WireFrame);
}
}
}
else // WireFrame mode
@@ -416,7 +422,7 @@ void AIS_ColoredShape::addShapesWithCustomProps (const Handle(Prs3d_Presentation
}
else
{
StdPrs_WFDeflectionShape::Add (thePrs, aShapeDraw, aDrawer);
StdPrs_WFShape::Add (thePrs, aShapeDraw, aDrawer);
}
aDrawer->SetTypeOfDeflection (aPrevType);
}