mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0029109: Visualization, AIS_Trihedron - add option hiding arrows tips
Prs3d_DatumAspect::DrawDatumPart() now handles new flag ToDrawArrows(). vtrihedron - added new option -arrowTip. Fixed misprint in command description -arrowscolor -> -arrowcolor.
This commit is contained in:
@@ -103,6 +103,8 @@ void AIS_Trihedron::setOwnDatumAspect()
|
||||
if (myDrawer->Link().IsNull())
|
||||
return;
|
||||
|
||||
myDrawer->DatumAspect()->SetDrawArrows (myDrawer->Link()->DatumAspect()->ToDrawArrows());
|
||||
myDrawer->DatumAspect()->SetDrawLabels (myDrawer->Link()->DatumAspect()->ToDrawLabels());
|
||||
*myDrawer->DatumAspect()->TextAspect()->Aspect() =
|
||||
*myDrawer->Link()->DatumAspect()->TextAspect()->Aspect();
|
||||
*myDrawer->DatumAspect()->PointAspect()->Aspect() =
|
||||
@@ -493,14 +495,14 @@ void AIS_Trihedron::computePresentation (const Handle(PrsMgr_PresentationManager
|
||||
anAxisGroup->AddPrimitiveArray (arrayOfPrimitives (aPart));
|
||||
|
||||
// draw arrow
|
||||
Handle(Graphic3d_Group) anArrowGroup = Prs3d_Root::NewGroup (thePrs);
|
||||
anArrowGroup->SetPrimitivesAspect (anAspect->ArrowAspect()->Aspect());
|
||||
|
||||
Prs3d_DatumParts anArrowPart = anAspect->ArrowPartForAxis (aPart);
|
||||
if (!anAspect->DrawDatumPart (anArrowPart))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(Graphic3d_Group) anArrowGroup = Prs3d_Root::NewGroup (thePrs);
|
||||
anArrowGroup->SetGroupPrimitivesAspect (anAspect->ArrowAspect()->Aspect());
|
||||
anArrowGroup->AddPrimitiveArray (arrayOfPrimitives (anArrowPart));
|
||||
}
|
||||
}
|
||||
@@ -714,6 +716,25 @@ void AIS_Trihedron::UnsetColor()
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ToDrawArrows
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean AIS_Trihedron::ToDrawArrows() const
|
||||
{
|
||||
return myDrawer->DatumAspect()->ToDrawArrows();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetDrawArrows
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_Trihedron::SetDrawArrows (const Standard_Boolean theToDraw)
|
||||
{
|
||||
setOwnDatumAspect();
|
||||
myDrawer->DatumAspect()->SetDrawArrows (theToDraw);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : createSensitiveEntity
|
||||
//purpose :
|
||||
|
@@ -152,6 +152,12 @@ public:
|
||||
//! Standard_DEPRECATED("This method is deprecated - SetColor() should be called instead")
|
||||
Standard_EXPORT void SetAxisColor (const Quantity_Color& theColor);
|
||||
|
||||
//! Returns true if arrows are to be drawn
|
||||
Standard_EXPORT Standard_Boolean ToDrawArrows() const;
|
||||
|
||||
//! Sets whether to draw the arrows in visualization
|
||||
Standard_EXPORT void SetDrawArrows (const Standard_Boolean theToDraw);
|
||||
|
||||
//! Sets priority of selection for owner of the given type
|
||||
void SetSelectionPriority (Prs3d_DatumParts thePart,
|
||||
Standard_Integer thePriority)
|
||||
|
Reference in New Issue
Block a user