1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #include <SketchSolver_ConstraintAngle.h>
4 #include <SketchSolver_Manager.h>
6 #include <GeomAPI_Dir2d.h>
7 #include <GeomAPI_Lin2d.h>
8 #include <GeomAPI_Pnt2d.h>
9 #include <GeomAPI_XY.h>
13 void SketchSolver_ConstraintAngle::getAttributes(
14 double& theValue, std::vector<EntityWrapperPtr>& theAttributes)
16 SketchSolver_Constraint::getAttributes(theValue, theAttributes);
22 void SketchSolver_ConstraintAngle::adjustConstraint()
24 static const double aTol = 1000. * tolerance;
25 BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder();
27 ConstraintWrapperPtr aConstraint = myStorage->constraint(myBaseConstraint).front();
28 //if (fabs(myAngle - aConstraint->value()) < aTol)
30 myAngle = aConstraint->value();
31 aBuilder->adjustConstraint(aConstraint);
32 myStorage->addConstraint(myBaseConstraint, aConstraint);