20 #ifndef PrimitivesPlugin_Box_H_
21 #define PrimitivesPlugin_Box_H_
23 #include <PrimitivesPlugin.h>
24 #include <ModelAPI_Feature.h>
25 #include <GeomAlgoAPI_Box.h>
43 inline static const std::string&
ID()
45 static const std::string MY_BOX_ID(
"Box");
52 static const std::string MY_CREATION_METHOD_ID(
"CreationMethod");
53 return MY_CREATION_METHOD_ID;
59 static const std::string MY_CREATION_METHOD_ID(
"BoxByDimensions");
60 return MY_CREATION_METHOD_ID;
66 static const std::string MY_CREATION_METHOD_ID(
"BoxByTwoPoints");
67 return MY_CREATION_METHOD_ID;
73 static const std::string MY_CREATION_METHOD_ID(
"BoxByOnePointAndDims");
74 return MY_CREATION_METHOD_ID;
80 static const std::string MY_POINT_FIRST_ID(
"FirstPoint");
81 return MY_POINT_FIRST_ID;
87 static const std::string MY_POINT_SECOND_ID(
"SecondPoint");
88 return MY_POINT_SECOND_ID;
92 inline static const std::string&
DX_ID()
94 static const std::string MY_DX_ID(
"dx");
99 inline static const std::string&
DY_ID()
101 static const std::string MY_DY_ID(
"dy");
106 inline static const std::string&
DZ_ID()
108 static const std::string MY_DZ_ID(
"dz");
113 inline static const std::string&
OX_ID()
115 static const std::string MY_OX_ID(
"ox");
120 inline static const std::string&
OY_ID()
122 static const std::string MY_OY_ID(
"oy");
127 inline static const std::string&
OZ_ID()
129 static const std::string MY_OZ_ID(
"oz");
136 static const std::string MY_HALF_DX_ID(
"half_dx");
137 return MY_HALF_DX_ID;
143 static const std::string MY_HALF_DY_ID(
"half_dy");
144 return MY_HALF_DY_ID;
150 static const std::string MY_HALF_DZ_ID(
"half_dz");
151 return MY_HALF_DZ_ID;
155 PRIMITIVESPLUGIN_EXPORT
virtual const std::string&
getKind()
162 PRIMITIVESPLUGIN_EXPORT
virtual void execute();
172 void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Box> theBoxAlgo,
173 std::shared_ptr<ModelAPI_ResultBody> theResultBox);
176 void createBoxByTwoPoints();
179 void createBoxByDimensions();
182 void createBoxByOnePointAndDims();
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:39
The body (shape) result of a feature.
Definition: ModelAPI_ResultBody.h:43
Feature for creation of a box primitive using various methods.
Definition: PrimitivesPlugin_Box.h:40
static const std::string & OZ_ID()
Attribute name of the third coordinate of the center.
Definition: PrimitivesPlugin_Box.h:127
PrimitivesPlugin_Box()
Use plugin manager for features creation.
Definition: PrimitivesPlugin_Box.cpp:34
static const std::string & OX_ID()
Attribute name of the first coordinate of the center.
Definition: PrimitivesPlugin_Box.h:113
static const std::string & ID()
Box kind.
Definition: PrimitivesPlugin_Box.h:43
static const std::string & CREATION_METHOD()
Attribute name for creation method.
Definition: PrimitivesPlugin_Box.h:50
static const std::string & DY_ID()
Attribute second coordinate.
Definition: PrimitivesPlugin_Box.h:99
static const std::string & CREATION_METHOD_BY_DIMENSIONS()
Attribute name for creation method.
Definition: PrimitivesPlugin_Box.h:57
static const std::string & OY_ID()
Attribute name of the second coordinate of the center.
Definition: PrimitivesPlugin_Box.h:120
static const std::string & DZ_ID()
Attribute third coordinate.
Definition: PrimitivesPlugin_Box.h:106
static const std::string & HALF_DY_ID()
Attribute name of the half-length on Y axis.
Definition: PrimitivesPlugin_Box.h:141
static const std::string & DX_ID()
Attribute first coordinate.
Definition: PrimitivesPlugin_Box.h:92
static const std::string & HALF_DX_ID()
Attribute name of the half-length on X axis.
Definition: PrimitivesPlugin_Box.h:134
static const std::string & CREATION_METHOD_BY_ONE_POINT_AND_DIMS()
Attribute name for creation method.
Definition: PrimitivesPlugin_Box.h:71
virtual PRIMITIVESPLUGIN_EXPORT void execute()
Creates a new part document if needed.
Definition: PrimitivesPlugin_Box.cpp:64
static const std::string & HALF_DZ_ID()
Attribute name of the half-length on Z axis.
Definition: PrimitivesPlugin_Box.h:148
static const std::string & POINT_SECOND_ID()
Attribute name of second point.
Definition: PrimitivesPlugin_Box.h:85
static const std::string & CREATION_METHOD_BY_TWO_POINTS()
Attribute name for creation method.
Definition: PrimitivesPlugin_Box.h:64
virtual PRIMITIVESPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: PrimitivesPlugin_Box.cpp:39
static const std::string & POINT_FIRST_ID()
Attribute name of first point.
Definition: PrimitivesPlugin_Box.h:78
virtual PRIMITIVESPLUGIN_EXPORT const std::string & getKind()
Returns the kind of a feature.
Definition: PrimitivesPlugin_Box.h:155