1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketchSolver_ConstraintCollinear.h
4 // Created: 27 May 2014
5 // Author: Artem ZHIDKOV
7 #ifndef SketchSolver_ConstraintCollinear_H_
8 #define SketchSolver_ConstraintCollinear_H_
10 #include <SketchSolver_Constraint.h>
12 /** \class SketchSolver_ConstraintCollinear
14 * \brief Converts collinear constraint to the constraint applicable for solver
16 class SketchSolver_ConstraintCollinear : public SketchSolver_Constraint
19 /// Constructor based on SketchPlugin constraint
20 SketchSolver_ConstraintCollinear(ConstraintPtr theConstraint)
21 : SketchSolver_Constraint(theConstraint),
24 for (int i = 0; i < 4; ++i)
25 myIsConstraintApplied[i] = false;
28 /// \brief Notify this object about the feature is changed somewhere
29 virtual void notify(const FeaturePtr& theFeature,
30 PlaneGCSSolver_Update* theUpdater);
33 /// \brief Converts SketchPlugin constraint to a list of solver constraints
34 virtual void process();
37 EntityWrapperPtr myPoints[4]; ///< extremities on collinear lines
38 bool myIsConstraintApplied[4]; ///< set \c true if point on opposite line
39 bool myInSolver; ///< the constraint is added to the solver