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
15 class FeaturesPlugin_ExtrusionSketch : public FeaturesPlugin_CompositeSketch
19 inline static const std::string& ID()
21 static const std::string MY_EXTRUSION_ID("ExtrusionSketch");
22 return MY_EXTRUSION_ID;
25 /// \return the kind of a feature
26 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
28 static std::string MY_KIND = FeaturesPlugin_ExtrusionSketch::ID();
32 /// attribute name for creation method
33 inline static const std::string& CREATION_METHOD()
35 static const std::string METHOD_ATTR("CreationMethod");
39 /// attribute name of extrusion size
40 inline static const std::string& TO_SIZE_ID()
42 static const std::string MY_TO_SIZE_ID("to_size");
46 /// attribute name of extrusion size
47 inline static const std::string& FROM_SIZE_ID()
49 static const std::string MY_FROM_SIZE_ID("from_size");
50 return MY_FROM_SIZE_ID;
53 /// attribute name of an object to which the extrusion grows.
54 inline static const std::string& TO_OBJECT_ID()
56 static const std::string MY_TO_OBJECT_ID("to_object");
57 return MY_TO_OBJECT_ID;
60 /// attribute name of extrusion offset
61 inline static const std::string& TO_OFFSET_ID()
63 static const std::string MY_TO_OFFSET_ID("to_offset");
64 return MY_TO_OFFSET_ID;
67 /// Attribute name of an object from which the extrusion grows.
68 inline static const std::string& FROM_OBJECT_ID()
70 static const std::string MY_FROM_OBJECT_ID("from_object");
71 return MY_FROM_OBJECT_ID;
74 /// attribute name of extrusion offset
75 inline static const std::string& FROM_OFFSET_ID()
77 static const std::string MY_FROM_OFFSET_ID("from_offset");
78 return MY_FROM_OFFSET_ID;
82 /// Init attributes for extrusion.
83 virtual void initMakeSolidsAttributes();
85 /// Create solid from face with extrusion.
86 virtual void makeSolid(const std::shared_ptr<GeomAPI_Shape> theFace,
87 std::shared_ptr<GeomAPI_Shape>& theResult,
88 ListOfShape& theFromFaces,
89 ListOfShape& theToFaces,
90 std::shared_ptr<GeomAlgoAPI_MakeShape>& theMakeShape,
91 std::shared_ptr<GeomAPI_DataMapOfShapeShape>& theDataMap);
94 /// Use plugin manager for features creation.
95 FeaturesPlugin_ExtrusionSketch();