X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_Radius.cpp;h=5d7135e063f274502802d781487822bb1efcab9c;hb=aea15db62bec148b6bfd5db468c682b1695c3449;hp=6f398803684351741ba609bb3fa18c9e998d45ed;hpb=0eee839530dc4220014d03e30887e9a3c7773e33;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Radius.cpp b/src/SketcherPrs/SketcherPrs_Radius.cpp index 6f3988036..5d7135e06 100644 --- a/src/SketcherPrs/SketcherPrs_Radius.cpp +++ b/src/SketcherPrs/SketcherPrs_Radius.cpp @@ -84,14 +84,15 @@ void SketcherPrs_Radius::Compute(const Handle(PrsMgr_PresentationManager3d)& the GeomAPI_Circ aCircle(aCenter, aNormal, aRadius); - std::shared_ptr anAnchor = aCircle.project(aFlyoutPnt); - std::shared_ptr anAnchorXYZ = anAnchor->xyz(); - anAnchorXYZ = anAnchorXYZ->decreased(aCenter->xyz()); - std::shared_ptr aDeltaDir(new GeomAPI_Dir(anAnchorXYZ)); - const double aDelta = 1e-3; - anAnchor->setX(anAnchor->x() + aDelta * aDeltaDir->x()); - anAnchor->setY(anAnchor->y() + aDelta * aDeltaDir->y()); - anAnchor->setZ(anAnchor->z() + aDelta * aDeltaDir->z()); + std::shared_ptr anAnchor = SketcherPrs_Tools::getAnchorPoint(myConstraint, myPlane); + //std::shared_ptr anAnchor = aCircle.project(aFlyoutPnt); + //std::shared_ptr anAnchorXYZ = anAnchor->xyz(); + //anAnchorXYZ = anAnchorXYZ->decreased(aCenter->xyz()); + //std::shared_ptr aDeltaDir(new GeomAPI_Dir(anAnchorXYZ)); + //const double aDelta = 1e-3; + //anAnchor->setX(anAnchor->x() + aDelta * aDeltaDir->x()); + //anAnchor->setY(anAnchor->y() + aDelta * aDeltaDir->y()); + //anAnchor->setZ(anAnchor->z() + aDelta * aDeltaDir->z()); SetMeasuredGeometry(aCircle.impl(), anAnchor->impl()); SetCustomValue(aRadius);