X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_ConstraintAngle.cpp;h=d49897fa010b2060ad587face98c8c009bfa8df8;hb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;hp=f4207163b241f406bbe39f35116326f883fbaf44;hpb=bd9d4bb5ec157cf7a6f8118d197d5a4c85706d83;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_ConstraintAngle.cpp b/src/SketchSolver/SketchSolver_ConstraintAngle.cpp index f4207163b..d49897fa0 100644 --- a/src/SketchSolver/SketchSolver_ConstraintAngle.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintAngle.cpp @@ -1,41 +1,37 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include -#include - -#include -#include -#include -#include #include - #include -#include - void SketchSolver_ConstraintAngle::getAttributes( - double& theValue, std::vector& theAttributes) + EntityWrapperPtr& theValue, std::vector& theAttributes) { SketchSolver_Constraint::getAttributes(theValue, theAttributes); - - myAngle = theValue; myType = myBaseConstraint->integer(SketchPlugin_ConstraintAngle::TYPE_ID())->value(); } void SketchSolver_ConstraintAngle::adjustConstraint() { - static const double aTol = 1000. * tolerance; - BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder(); - - ConstraintWrapperPtr aConstraint = myStorage->constraint(myBaseConstraint).front(); - //if (fabs(myAngle - aConstraint->value()) < aTol) - // return; - myAngle = aConstraint->value(); - aBuilder->adjustConstraint(aConstraint); - myStorage->addConstraint(myBaseConstraint, aConstraint); - int aType = myBaseConstraint->integer(SketchPlugin_ConstraintAngle::TYPE_ID())->value(); if (aType != myType) { myType = aType;