From: azv Date: Wed, 1 Jun 2016 07:41:18 +0000 (+0300) Subject: PLaneGCSSolver: It is not necessary to adjust Angle constraint (issue #1536) X-Git-Tag: V_2.3.1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=09dabb6acd9664f589a0bd9415d804d7a37ab801;p=modules%2Fshaper.git PLaneGCSSolver: It is not necessary to adjust Angle constraint (issue #1536) --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp index 24d9cb3f0..027d57a0a 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp @@ -142,8 +142,6 @@ static ConstraintWrapperPtr -/// \brief Set flags for angle constraint -static void adjustAngle(ConstraintWrapperPtr theConstraint); /// \brief Update mirror points static void adjustMirror(ConstraintWrapperPtr theConstraint); /// \brief Update a sign of the point-line distance constraint @@ -459,9 +457,7 @@ void PlaneGCSSolver_Builder::adjustConstraint(ConstraintWrapperPtr theConstraint { SketchSolver_ConstraintType aType = theConstraint->type(); // Update flags and parameters in constraints - if (aType == CONSTRAINT_ANGLE) - adjustAngle(theConstraint); - else if (aType == CONSTRAINT_PT_LINE_DISTANCE) + if (aType == CONSTRAINT_PT_LINE_DISTANCE) adjustPtLineDistance(theConstraint); else if (aType == CONSTRAINT_SYMMETRIC) adjustMirror(theConstraint); @@ -1138,24 +1134,6 @@ ConstraintWrapperPtr createConstraintTangent( -void adjustAngle(ConstraintWrapperPtr theConstraint) -{ - BuilderPtr aBuilder = PlaneGCSSolver_Builder::getInstance(); - - std::shared_ptr aConstraint = - std::dynamic_pointer_cast(theConstraint); - - bool isReversed[2] = { - aConstraint->baseConstraint()->boolean( - SketchPlugin_ConstraintAngle::ANGLE_REVERSED_FIRST_LINE_ID())->value(), - aConstraint->baseConstraint()->boolean( - SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID())->value() - }; - - if (isReversed[0] != isReversed[1]) - aConstraint->setValue(aConstraint->value() - 180.0); -} - void makeMirrorPoints(EntityWrapperPtr theOriginal, EntityWrapperPtr theMirrored, EntityWrapperPtr theMirrorLine)