1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketchSolver_ConstraintLength.h
4 // Created: 31 Mar 2015
5 // Author: Artem ZHIDKOV
7 #ifndef SketchSolver_ConstraintLength_H_
8 #define SketchSolver_ConstraintLength_H_
10 #include "SketchSolver.h"
11 #include <SketchSolver_Constraint.h>
13 /** \class SketchSolver_ConstraintLength
15 * \brief Convert length constraint to SolveSpace structure
17 class SketchSolver_ConstraintLength : public SketchSolver_Constraint
20 /// Constructor based on SketchPlugin constraint
21 SketchSolver_ConstraintLength(ConstraintPtr theConstraint) :
22 SketchSolver_Constraint(theConstraint)
25 virtual int getType() const
26 { return SLVS_C_PT_PT_DISTANCE; }
29 /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
30 virtual void process();
32 /// \brief This method is used in derived objects to check consistence of constraint.
33 /// E.g. the distance between line and point may be signed.
34 virtual void adjustConstraint();