1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: FeaturesPlugin_ExtrusionSketch.h
4 // Created: 11 September 2015
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesPlugin_ExtrusionSketch_H_
8 #define FeaturesPlugin_ExtrusionSketch_H_
10 #include <FeaturesPlugin_CompositeSketch.h>
12 /** \class FeaturesPlugin_ExtrusionSketch
14 * \brief This feature allows to create sketch and extrude faces from this sketch
15 * in a single operation.
17 class FeaturesPlugin_ExtrusionSketch : public FeaturesPlugin_CompositeSketch
21 inline static const std::string& ID()
23 static const std::string MY_EXTRUSION_ID("ExtrusionSketch");
24 return MY_EXTRUSION_ID;
27 /// \return the kind of a feature
28 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
30 static std::string MY_KIND = FeaturesPlugin_ExtrusionSketch::ID();
34 /// attribute name for creation method
35 inline static const std::string& CREATION_METHOD()
37 static const std::string METHOD_ATTR("CreationMethod");
41 /// attribute name of extrusion size
42 inline static const std::string& TO_SIZE_ID()
44 static const std::string MY_TO_SIZE_ID("to_size");
48 /// attribute name of extrusion size
49 inline static const std::string& FROM_SIZE_ID()
51 static const std::string MY_FROM_SIZE_ID("from_size");
52 return MY_FROM_SIZE_ID;
55 /// attribute name of an object to which the extrusion grows.
56 inline static const std::string& TO_OBJECT_ID()
58 static const std::string MY_TO_OBJECT_ID("to_object");
59 return MY_TO_OBJECT_ID;
62 /// attribute name of extrusion offset
63 inline static const std::string& TO_OFFSET_ID()
65 static const std::string MY_TO_OFFSET_ID("to_offset");
66 return MY_TO_OFFSET_ID;
69 /// Attribute name of an object from which the extrusion grows.
70 inline static const std::string& FROM_OBJECT_ID()
72 static const std::string MY_FROM_OBJECT_ID("from_object");
73 return MY_FROM_OBJECT_ID;
76 /// attribute name of extrusion offset
77 inline static const std::string& FROM_OFFSET_ID()
79 static const std::string MY_FROM_OFFSET_ID("from_offset");
80 return MY_FROM_OFFSET_ID;
84 /// Init attributes for extrusion.
85 virtual void initMakeSolidsAttributes();
87 /// Create solid from face with extrusion.
88 virtual void makeSolid(const std::shared_ptr<GeomAPI_Shape> theFace,
89 std::shared_ptr<GeomAPI_Shape>& theResult,
90 ListOfShape& theFromFaces,
91 ListOfShape& theToFaces,
92 std::shared_ptr<GeomAlgoAPI_MakeShape>& theMakeShape,
93 std::shared_ptr<GeomAPI_DataMapOfShapeShape>& theDataMap);
96 /// Use plugin manager for features creation.
97 FeaturesPlugin_ExtrusionSketch();