From 3d8567de3730b8b06e753b688668e0d1b408bc73 Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 16 Apr 2015 13:10:55 +0300 Subject: [PATCH] Adjusting point-line distance only in case of constraint creation --- src/SketchSolver/SketchSolver_ConstraintDistance.cpp | 6 +----- src/SketchSolver/SketchSolver_ConstraintDistance.h | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) 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) }; -- 2.39.2