20 #ifndef FeaturesPlugin_Extrusion_H_
21 #define FeaturesPlugin_Extrusion_H_
23 #include "FeaturesPlugin.h"
25 #include "FeaturesPlugin_CompositeSketch.h"
27 #include <GeomAlgoAPI_MakeShape.h>
43 inline static const std::string&
ID()
45 static const std::string MY_ID(
"Extrusion");
52 static const std::string MY_CREATION_METHOD_ID(
"CreationMethod");
53 return MY_CREATION_METHOD_ID;
59 static const std::string MY_CREATION_METHOD_BY_SIZES(
"BySizes");
60 return MY_CREATION_METHOD_BY_SIZES;
66 static const std::string MY_CREATION_METHOD_BY_PLANES(
"ByPlanesAndOffsets");
67 return MY_CREATION_METHOD_BY_PLANES;
73 static const std::string MY_CREATION_METHOD_THROUGH_ALL(
"ThroughAll");
74 return MY_CREATION_METHOD_THROUGH_ALL;
80 static const std::string MY_DIRECTION_OBJECT_ID(
"direction_object");
81 return MY_DIRECTION_OBJECT_ID;
87 static const std::string MY_TO_SIZE_ID(
"to_size");
94 static const std::string MY_FROM_SIZE_ID(
"from_size");
95 return MY_FROM_SIZE_ID;
101 static const std::string MY_TO_OBJECT_ID(
"to_object");
102 return MY_TO_OBJECT_ID;
108 static const std::string MY_TO_OFFSET_ID(
"to_offset");
109 return MY_TO_OFFSET_ID;
115 static const std::string MY_FROM_OBJECT_ID(
"from_object");
116 return MY_FROM_OBJECT_ID;
122 static const std::string MY_FROM_OFFSET_ID(
"from_offset");
123 return MY_FROM_OFFSET_ID;
127 FEATURESPLUGIN_EXPORT
virtual const std::string&
getKind()
137 FEATURESPLUGIN_EXPORT
virtual void execute();
146 ListOfShape& theBoundaryShapes,
147 ListOfMakeShape& theMakeShapes);
151 const ListOfShape& theBoundaryShapes,
152 const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape,
153 const int theIndex = 0);
156 void getDirection(std::shared_ptr<GeomAPI_Dir>& theDir);
159 virtual void getSizes(
double& theToSize,
double& theFromSize);
Interface for the composite sketch feature.
Definition: FeaturesPlugin_CompositeSketch.h:33
Feature for creation of extrusion from the planar face.
Definition: FeaturesPlugin_Extrusion.h:37
void storeResultWithBoundaries(const GeomShapePtr theBaseShape, const ListOfShape &theBoundaryShapes, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape, const int theIndex=0)
Stores result of generation.
Definition: FeaturesPlugin_Extrusion.cpp:166
static const std::string & CREATION_METHOD()
Attribute name for creation method.
Definition: FeaturesPlugin_Extrusion.h:50
virtual void getSizes(double &theToSize, double &theFromSize)
Retrieve or calculate prism sizes.
Definition: FeaturesPlugin_Extrusion.cpp:218
virtual void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: FeaturesPlugin_Extrusion.cpp:43
static const std::string & FROM_SIZE_ID()
Attribute name of extrusion from size.
Definition: FeaturesPlugin_Extrusion.h:92
static const std::string & CREATION_METHOD_BY_PLANES()
Attribute name for creation method.
Definition: FeaturesPlugin_Extrusion.h:64
static const std::string & TO_SIZE_ID()
Attribute name of extrusion to size.
Definition: FeaturesPlugin_Extrusion.h:85
static const std::string & TO_OBJECT_ID()
Attribute name of an object to which the extrusion grows.
Definition: FeaturesPlugin_Extrusion.h:99
FeaturesPlugin_Extrusion()
Use plugin manager for features creation.
Definition: FeaturesPlugin_Extrusion.cpp:38
virtual const std::string & getKind()
Definition: FeaturesPlugin_Extrusion.h:127
static const std::string & FROM_OBJECT_ID()
Attribute name of an object from which the extrusion grows.
Definition: FeaturesPlugin_Extrusion.h:113
static const std::string & DIRECTION_OBJECT_ID()
Attribute name of an object to which the extrusion grows.
Definition: FeaturesPlugin_Extrusion.h:78
static const std::string & ID()
Feature kind.
Definition: FeaturesPlugin_Extrusion.h:43
static const std::string & CREATION_METHOD_THROUGH_ALL()
Attribute name for creation method.
Definition: FeaturesPlugin_Extrusion.h:71
bool makeExtrusions(ListOfShape &theBaseShapes, ListOfShape &theBoundaryShapes, ListOfMakeShape &theMakeShapes)
Generates extrusions.
Definition: FeaturesPlugin_Extrusion.cpp:94
static const std::string & TO_OFFSET_ID()
Attribute name of extrusion offset.
Definition: FeaturesPlugin_Extrusion.h:106
void getDirection(std::shared_ptr< GeomAPI_Dir > &theDir)
Retrieve direction argument.
Definition: FeaturesPlugin_Extrusion.cpp:186
virtual void execute()
Performs the algorithm and stores results it in the data structure.
Definition: FeaturesPlugin_Extrusion.cpp:68
static const std::string & CREATION_METHOD_BY_SIZES()
Attribute name for creation method.
Definition: FeaturesPlugin_Extrusion.h:57
static const std::string & FROM_OFFSET_ID()
Attribute name of extrusion offset.
Definition: FeaturesPlugin_Extrusion.h:120