]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketcherPrs/SketcherPrs_Tools.cpp
Salome HOME
Precise calculation of the flyout point for Length and Distance constraints
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Tools.cpp
index 94b98c2951d536f3ec5daf55577b6bca4dc792ea..8497ec08edf453c50161989aab466db832a3a96f 100644 (file)
@@ -145,7 +145,11 @@ void setArrowSize(double theSize)
 double getFlyoutDistance(const ModelAPI_Feature* theConstraint, 
                          const std::shared_ptr<GeomAPI_Ax3>& thePlane)
 {
-  return 50;
+  std::shared_ptr<GeomDataAPI_Point2D> aFlyoutPoint =
+      std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+      const_cast<ModelAPI_Feature*>(theConstraint)->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
+
+  return aFlyoutPoint->y();
 }