1 // Copyright (C) 2014-2023 CEA, EDF
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef SketchPlugin_ConstraintBase_H_
21 #define SketchPlugin_ConstraintBase_H_
23 #include "SketchPlugin.h"
24 #include <SketchPlugin_Constraint.h>
25 #include <SketchPlugin_Sketch.h>
26 #include <ModelAPI_AttributeReference.h>
27 #include <ModelAPI_AttributeRefAttr.h>
29 #include <GeomAPI_IPresentable.h>
30 #include <GeomAPI_ICustomPrs.h>
35 * Each constraint uses a set of parameters. In the SolveSpace library
36 * these parameters are named "valA", "ptA", "ptB", "entityA", "entityB".
37 * The "ptA" and "ptB" parameters represents a point in the constraint.
38 * The "entityA" and "entityB" represents any other object (and a point too).
39 * And the "valA" represents a real value.
41 * The attributes below are named independent of the SolveSpace.
42 * Some of them may be unused.
44 * Also the list of possible attributes is provided to simplify assignment.
47 #define SKETCH_DIMENSION_COLOR "64,128,225"
49 /** \class SketchPlugin_ConstraintBase
51 * \brief Feature for creation of a new constraint between other features.
52 * Some feature's methods implemented here as dummy to
53 * Base class for all constraints.
55 class SketchPlugin_ConstraintBase : public SketchPlugin_Constraint, public GeomAPI_IPresentable
58 /// \brief Use plugin manager for features creation
59 SketchPlugin_ConstraintBase()