X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_ConstraintDistance.cpp;h=02931bcc29d08b662006c0df232b596a5584af3f;hb=bb5bba6e567f9cae87f9fbaf584d2d0502ec372e;hp=35104dc38fc72efff13967c0b5eac81c7d7b986c;hpb=c3aeb6b898054376c1047071ea9fea61abdc9e99;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp index 35104dc38..02931bcc2 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp @@ -71,7 +71,8 @@ AISObjectPtr SketchPlugin_ConstraintDistance::getAISObject(AISObjectPtr thePrevi if (!sketch()) return thePrevious; - AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, sketch()->coordinatePlane(), + AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, + sketch()->coordinatePlane(), thePrevious); return anAIS; } @@ -170,7 +171,8 @@ void SketchPlugin_ConstraintDistance::attributeChanged(const std::string& theID) { std::shared_ptr aValueAttr = std::dynamic_pointer_cast< ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE())); - if (!aValueAttr->isInitialized()) { // only if it is not initialized, try to compute the current value + if (!aValueAttr->isInitialized()) { + // only if it is not initialized, try to compute the current value double aDistance = calculateCurrentDistance(); if (aDistance > 0) { // set as value the length of updated references aValueAttr->setValue(aDistance); @@ -179,7 +181,8 @@ void SketchPlugin_ConstraintDistance::attributeChanged(const std::string& theID) } else if (theID == SketchPlugin_Constraint::FLYOUT_VALUE_PNT() && !myFlyoutUpdate) { myFlyoutUpdate = true; // Recalculate flyout point in local coordinates of the distance constraint: - // the X coordinate is a length of projection of the flyout point on the line binding two distanced points + // the X coordinate is a length of projection of the flyout point on the + // line binding two distanced points // or a line of projection of the distanced point onto the distanced segment // the Y coordinate is a distance from the flyout point to the line std::shared_ptr aFlyoutAttr =