Salome HOME
38ba87eb40c64b92ec3f6aed838025c7d40d5fc6
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintAngle.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 #include <SketchSolver_ConstraintAngle.h>
4
5 #include <ModelAPI_AttributeInteger.h>
6 #include <SketchPlugin_ConstraintAngle.h>
7
8 void SketchSolver_ConstraintAngle::getAttributes(
9     EntityWrapperPtr& theValue, std::vector<EntityWrapperPtr>& theAttributes)
10 {
11   SketchSolver_Constraint::getAttributes(theValue, theAttributes);
12   myType = myBaseConstraint->integer(SketchPlugin_ConstraintAngle::TYPE_ID())->value();
13 }
14
15
16 void SketchSolver_ConstraintAngle::adjustConstraint()
17 {
18   int aType = myBaseConstraint->integer(SketchPlugin_ConstraintAngle::TYPE_ID())->value();
19   if (aType != myType) {
20     myType = aType;
21     myStorage->setNeedToResolve(true);
22   }
23 }