From: azv Date: Thu, 16 Apr 2015 10:10:55 +0000 (+0300) Subject: Adjusting point-line distance only in case of constraint creation X-Git-Tag: V_1.1.0~23^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3d8567de3730b8b06e753b688668e0d1b408bc73;p=modules%2Fshaper.git Adjusting point-line distance only in case of constraint creation --- diff --git a/src/SketchSolver/SketchSolver_ConstraintDistance.cpp b/src/SketchSolver/SketchSolver_ConstraintDistance.cpp index 51f0d7359..d256a25ed 100644 --- a/src/SketchSolver/SketchSolver_ConstraintDistance.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintDistance.cpp @@ -53,11 +53,8 @@ void SketchSolver_ConstraintDistance::process() getType(), myGroup->getWorkplaneId(), aValue, aPoint[0], aPoint[1], aLine, SLVS_E_UNKNOWN); aConstraint.h = myStorage->addConstraint(aConstraint); mySlvsConstraints.push_back(aConstraint.h); - adjustConstraint(); -} -void SketchSolver_ConstraintDistance::adjustConstraint() -{ + // Adjust point-line distance if (getType() != SLVS_C_PT_LINE_DISTANCE) return; @@ -84,4 +81,3 @@ void SketchSolver_ConstraintDistance::adjustConstraint() } } } - diff --git a/src/SketchSolver/SketchSolver_ConstraintDistance.h b/src/SketchSolver/SketchSolver_ConstraintDistance.h index 48cadbfca..ff594c10c 100644 --- a/src/SketchSolver/SketchSolver_ConstraintDistance.h +++ b/src/SketchSolver/SketchSolver_ConstraintDistance.h @@ -28,9 +28,6 @@ protected: /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints virtual void process(); - /// \brief Verifies the sign of the distance between line and point and change it if necessary - virtual void adjustConstraint(); - private: int myType; ///< type of constraint (applicable: SLVS_C_PT_PT_DISTANCE, SLVS_C_PT_LINE_DISTANCE) };