1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketcherPrs_Factory.h
4 // Created: 13 February 2015
5 // Author: Vitaly SMETANNIKOV
7 #ifndef SketcherPrs_Factory_H_
8 #define SketcherPrs_Factory_H_
10 #include "SketcherPrs.h"
12 #include <ModelAPI_Feature.h>
14 #include <GeomAPI_Ax3.h>
15 #include <GeomAPI_AISObject.h>
17 #define GET_CONSTRAINT_PRS(NAME) \
18 static AISObjectPtr NAME(ModelAPI_Feature* theConstraint, \
19 const std::shared_ptr<GeomAPI_Ax3>& thePlane);
23 * Class which creates constraints presentations
25 class SKETCHERPRS_EXPORT SketcherPrs_Factory
28 /// Creates coincedent constraint presentation
29 /// \param theConstraint the constraint
30 /// \param thePlane the current sketch plane
31 GET_CONSTRAINT_PRS(coincidentConstraint)
33 /// Creates parallel constraint presentation
34 /// \param theConstraint the constraint
35 /// \param thePlane the current sketch plane
36 GET_CONSTRAINT_PRS(parallelConstraint)
38 /// Creates coincedent perpendicular presentation
39 /// \param theConstraint the constraint
40 /// \param thePlane the current sketch plane
41 GET_CONSTRAINT_PRS(perpendicularConstraint)
43 /// Creates rigid constraint presentation
44 /// \param theConstraint the constraint
45 /// \param thePlane the current sketch plane
46 GET_CONSTRAINT_PRS(rigidConstraint)
48 /// Creates horizontal constraint presentation
49 /// \param theConstraint the constraint
50 /// \param thePlane the current sketch plane
51 GET_CONSTRAINT_PRS(horisontalConstraint)
53 /// Creates vertical constraint presentation
54 /// \param theConstraint the constraint
55 /// \param thePlane the current sketch plane
56 GET_CONSTRAINT_PRS(verticalConstraint)
58 /// Creates equal constraint presentation
59 /// \param theConstraint the constraint
60 /// \param thePlane the current sketch plane
61 GET_CONSTRAINT_PRS(equalConstraint)
63 /// Creates tangent constraiont presentation
64 /// \param theConstraint the constraint
65 /// \param thePlane the current sketch plane
66 GET_CONSTRAINT_PRS(tangentConstraint)
68 /// Creates radius dimension presentation
69 /// \param theConstraint the constraint
70 /// \param thePlane the current sketch plane
71 GET_CONSTRAINT_PRS(radiusConstraint)
73 /// Creates length dimension presentation
74 /// \param theConstraint the constraint
75 /// \param thePlane the current sketch plane
76 GET_CONSTRAINT_PRS(lengthDimensionConstraint)
78 /// Creates mirror constraint presentation
79 /// \param theConstraint the constraint
80 /// \param thePlane the current sketch plane
81 GET_CONSTRAINT_PRS(mirrorConstraint)
83 /// Creates translate constraint presentation
84 /// \param theConstraint the constraint
85 /// \param thePlane the current sketch plane
86 GET_CONSTRAINT_PRS(translateConstraint)
88 /// Creates rotate constraint presentation
89 /// \param theConstraint the constraint
90 /// \param thePlane the current sketch plane
91 GET_CONSTRAINT_PRS(rotateConstraint)
93 /// Creates angle constraint presentation
94 /// \param theConstraint the constraint
95 /// \param thePlane the current sketch plane
96 GET_CONSTRAINT_PRS(angleConstraint)