Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_Defs.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 //
20
21 #ifndef PlaneGCSSolver_Defs_H_
22 #define PlaneGCSSolver_Defs_H_
23
24 #include <Constraints.h>
25 #include <Geo.h>
26 #include <memory>
27
28 typedef std::shared_ptr<GCS::Point>       GCSPointPtr;
29 typedef std::shared_ptr<GCS::Curve>       GCSCurvePtr;
30 typedef std::shared_ptr<GCS::Constraint>  GCSConstraintPtr;
31
32 // Tolerance for value of parameters
33 const double tolerance = 1.e-10;
34
35 #define PI 3.1415926535897932
36
37 // Types for data entities enumeration
38 typedef int ConstraintID;
39
40 // Predefined values for identifiers
41 const ConstraintID CID_UNKNOWN  =  0;
42 const ConstraintID CID_MOVEMENT = -1;
43
44 /// Types of entities
45 enum SketchSolver_EntityType {
46   ENTITY_UNKNOWN = 0,
47   ENTITY_SCALAR,
48   ENTITY_ANGLE,
49   ENTITY_POINT,
50   ENTITY_LINE,
51   ENTITY_CIRCLE,
52   ENTITY_ARC
53 };
54
55 /// Types of constraints
56 enum SketchSolver_ConstraintType {
57   CONSTRAINT_UNKNOWN = 0,
58   CONSTRAINT_COINCIDENCE,      // base coincidence if we don't know exact type yet
59   CONSTRAINT_PT_PT_COINCIDENT,
60   CONSTRAINT_PT_ON_LINE,
61   CONSTRAINT_PT_ON_CIRCLE,
62   CONSTRAINT_MIDDLE_POINT,
63   CONSTRAINT_DISTANCE,         // base distance if we don't know the measured objects yet
64   CONSTRAINT_PT_PT_DISTANCE,
65   CONSTRAINT_PT_LINE_DISTANCE,
66   CONSTRAINT_RADIUS,
67   CONSTRAINT_ANGLE,
68   CONSTRAINT_FIXED,
69   CONSTRAINT_HORIZONTAL,
70   CONSTRAINT_VERTICAL,
71   CONSTRAINT_PARALLEL,
72   CONSTRAINT_PERPENDICULAR,
73   CONSTRAINT_SYMMETRIC,
74   CONSTRAINT_EQUAL,           // base equality if we don't know the measured objects yet
75   CONSTRAINT_EQUAL_LINES,
76   CONSTRAINT_EQUAL_LINE_ARC,
77   CONSTRAINT_EQUAL_RADIUS,
78   CONSTRAINT_TANGENT,         // base tangency if we don't know the measured objects yet
79   CONSTRAINT_TANGENT_CIRCLE_LINE,
80   CONSTRAINT_TANGENT_CIRCLE_CIRCLE,
81   CONSTRAINT_COLLINEAR,
82   CONSTRAINT_MULTI_TRANSLATION,
83   CONSTRAINT_MULTI_ROTATION
84 };
85
86 #endif