Standard_Real aLength = myDrawer->DimensionAspect()->ArrowAspect()->Length();
Standard_Real anAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle();
+ Standard_Boolean isZoomable = myDrawer->DimensionAspect()->ArrowAspect()->IsZoomable();
if (myDrawer->DimensionAspect()->IsArrows3d())
{
}
else
{
+ gp_Pnt aLocation = isZoomable ? theLocation : gp::Origin();
gp_Pnt aLeftPoint (gp::Origin());
gp_Pnt aRightPoint (gp::Origin());
const gp_Dir& aPlane = GetPlane().Axis().Direction();
- PointsForArrow (theLocation, theDirection, aPlane, aLength, anAngle, aLeftPoint, aRightPoint);
+ PointsForArrow (aLocation, theDirection, aPlane, aLength, anAngle, aLeftPoint, aRightPoint);
Handle(Graphic3d_ArrayOfTriangles) anArrow = new Graphic3d_ArrayOfTriangles(3);
anArrow->AddVertex (aLeftPoint);
- anArrow->AddVertex (theLocation);
+ anArrow->AddVertex (aLocation);
anArrow->AddVertex (aRightPoint);
// Set aspect for arrow triangles
aGroup->SetPrimitivesAspect (aShadingStyle);
aGroup->AddPrimitiveArray (anArrow);
+ if (!isZoomable)
+ {
+ aGroup->SetTransformPersistence (new Graphic3d_TransformPers (Graphic3d_TMF_ZoomPers, theLocation));
+ }
}
SelectionGeometry::Arrow& aSensitiveArrow = mySelectionGeom.NewArrow();
aFirstArrowBegin = aLineBegPoint;
aSecondArrowBegin = aLineEndPoint;
- aFirstArrowEnd = aLineBegPoint.Translated (-gp_Vec (aFirstArrowDir).Scaled (anArrowLength));
- aSecondArrowEnd = aLineEndPoint.Translated (-gp_Vec (aSecondArrowDir).Scaled (anArrowLength));
+ aFirstArrowEnd = aLineBegPoint;
+ aSecondArrowEnd = aLineEndPoint;
+
+ if (aDimensionAspect->ArrowAspect()->IsZoomable())
+ {
+ aFirstArrowEnd.Translate (-gp_Vec (aFirstArrowDir).Scaled (anArrowLength));
+ aSecondArrowEnd.Translate (-gp_Vec (aSecondArrowDir).Scaled (anArrowLength));
+ }
- gp_Pnt aCenterLineBegin = isArrowsExternal
+ gp_Pnt aCenterLineBegin = isArrowsExternal
? aLineBegPoint : aFirstArrowEnd;
gp_Pnt aCenterLineEnd = isArrowsExternal || theIsOneSide