SHAPER 9.16.0
PlaneGCSSolver_Defs.h
1// Copyright (C) 2014-2026 CEA, EDF
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 email : webmaster.salome@opencascade.com
18//
19
20#ifndef PlaneGCSSolver_Defs_H_
21#define PlaneGCSSolver_Defs_H_
22
23#include <Constraints.h>
24#include <Geo.h>
25#include <memory>
26
27typedef std::shared_ptr<GCS::Point> GCSPointPtr;
28typedef std::shared_ptr<GCS::Curve> GCSCurvePtr;
29typedef std::shared_ptr<GCS::Constraint> GCSConstraintPtr;
30
31// Tolerance for value of parameters
32const double tolerance = 1.e-10;
33
34#define PI 3.1415926535897932
35
36// Types for data entities enumeration
37typedef int ConstraintID;
38
39// Predefined values for identifiers
40const ConstraintID CID_UNKNOWN = 0;
41const ConstraintID CID_MOVEMENT = -1;
42const ConstraintID CID_FICTIVE = 99;
43
45enum SketchSolver_EntityType {
46 ENTITY_UNKNOWN = 0,
47 ENTITY_BOOLEAN,
48 ENTITY_SCALAR,
49 ENTITY_SCALAR_ARRAY,
50 ENTITY_ANGLE,
51 ENTITY_POINT,
52 ENTITY_POINT_ARRAY,
53 ENTITY_LINE,
54 ENTITY_CIRCLE,
55 ENTITY_ARC,
56 ENTITY_ELLIPSE,
57 ENTITY_ELLIPTIC_ARC,
58 ENTITY_BSPLINE
59};
60
62enum SketchSolver_ConstraintType {
63 CONSTRAINT_UNKNOWN = 0,
64 CONSTRAINT_COINCIDENCE, // base coincidence if we don't know exact type yet
65 CONSTRAINT_PT_PT_COINCIDENT,
66 CONSTRAINT_PT_ON_CURVE,
67 CONSTRAINT_MIDDLE_POINT,
68 CONSTRAINT_DISTANCE, // base distance if we don't know the measured objects yet
69 CONSTRAINT_PT_PT_DISTANCE,
70 CONSTRAINT_PT_LINE_DISTANCE,
71 CONSTRAINT_HORIZONTAL_DISTANCE,
72 CONSTRAINT_VERTICAL_DISTANCE,
73 CONSTRAINT_RADIUS,
74 CONSTRAINT_ANGLE,
75 CONSTRAINT_FIXED,
76 CONSTRAINT_HORIZONTAL,
77 CONSTRAINT_VERTICAL,
78 CONSTRAINT_PARALLEL,
79 CONSTRAINT_PERPENDICULAR,
80 CONSTRAINT_PERPENDICULAR_CURVES,
81 CONSTRAINT_SYMMETRIC,
82 CONSTRAINT_EQUAL, // base equality if we don't know the measured objects yet
83 CONSTRAINT_EQUAL_LINES,
84 CONSTRAINT_EQUAL_LINE_ARC,
85 CONSTRAINT_EQUAL_RADIUS,
86 CONSTRAINT_EQUAL_ELLIPSES,
87 CONSTRAINT_TANGENT, // base tangency if we don't know the measured objects yet
88 CONSTRAINT_TANGENT_CIRCLE_LINE,
89 CONSTRAINT_TANGENT_CURVE_CURVE,
90 CONSTRAINT_COLLINEAR,
91 CONSTRAINT_MULTI_TRANSLATION,
92 CONSTRAINT_MULTI_ROTATION
93};
94
95#endif