1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0031117: Visualization, AIS_ViewCube - additional properties for visualization of trihedron of a View Cube

AIS_ViewCube has been extended by additional properties (previously hard-coded):
- radius of axes of the trihedron
- radius of cones of the axes of the trihedron
- radius of a sphere (central point) of the trihedron

ViewerTest command vviewcube has been extended to support new parameters:
-axesradius, -axesconeradius, -axessphereradius.
This commit is contained in:
vro
2019-10-31 15:57:25 +03:00
committed by apn
parent f7fc0c03be
commit 6466cc9eb1
3 changed files with 65 additions and 2 deletions

View File

@@ -137,6 +137,9 @@ AIS_ViewCube::AIS_ViewCube()
myBoxEdgeGap (0.0),
myBoxFacetExtension (1.0),
myAxesPadding (1.0),
myAxesRadius (1.0),
myAxesConeRadius (3.0),
myAxesSphereRadius (4.0),
myCornerMinSize (2.0),
myRoundRadius (0.0),
myToDisplayAxes (true),
@@ -599,7 +602,7 @@ void AIS_ViewCube::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
anAxisGroup->SetGroupPrimitivesAspect (aDatumAspect->ShadingAspect (aPart)->Aspect());
const Standard_Real anArrowLength = 0.2 * anAxisSize;
Handle(Graphic3d_ArrayOfTriangles) aTriangleArray = Prs3d_Arrow::DrawShaded (anAx1, 1.0, anAxisSize, 3.0, anArrowLength, THE_NB_ARROW_FACETTES);
Handle(Graphic3d_ArrayOfTriangles) aTriangleArray = Prs3d_Arrow::DrawShaded (anAx1, myAxesRadius, anAxisSize, myAxesConeRadius, anArrowLength, THE_NB_ARROW_FACETTES);
anAxisGroup->AddPrimitiveArray (aTriangleArray);
TCollection_AsciiString anAxisLabel;
@@ -621,7 +624,7 @@ void AIS_ViewCube::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
Handle(Prs3d_ShadingAspect) anAspectCen = new Prs3d_ShadingAspect();
anAspectCen->SetColor (Quantity_NOC_WHITE);
aGroup->SetGroupPrimitivesAspect (anAspectCen->Aspect());
Prs3d_ToolSphere aTool (4.0, THE_NB_DISK_SLICES, THE_NB_DISK_SLICES);
Prs3d_ToolSphere aTool (myAxesSphereRadius, THE_NB_DISK_SLICES, THE_NB_DISK_SLICES);
gp_Trsf aTrsf;
aTrsf.SetTranslation (gp_Vec (gp::Origin(), aLocation));
Handle(Graphic3d_ArrayOfTriangles) aCenterArray;