1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: FeaturesPlugin_RevolutionSketch.h
4 // Created: 11 September 2015
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesPlugin_RevolutionSketch_H_
8 #define FeaturesPlugin_RevolutionSketch_H_
10 #include <FeaturesPlugin_CompositeSketch.h>
12 /** \class FeaturesPlugin_RevolutionSketch
15 class FeaturesPlugin_RevolutionSketch : public FeaturesPlugin_CompositeSketch
19 inline static const std::string& ID()
21 static const std::string MY_REVOLUTION_ID("RevolutionSketch");
22 return MY_REVOLUTION_ID;
25 /// \return the kind of a feature
26 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
28 static std::string MY_KIND = FeaturesPlugin_RevolutionSketch::ID();
32 /// Attribute name of an revolution axis.
33 inline static const std::string& AXIS_OBJECT_ID()
35 static const std::string MY_AXIS_ID("axis_object");
39 /// attribute name for creation method
40 inline static const std::string& CREATION_METHOD()
42 static const std::string METHOD_ATTR("CreationMethod");
46 /// Attribute name of revolution to angle.
47 inline static const std::string& TO_ANGLE_ID()
49 static const std::string MY_TO_ANGLE_ID("to_angle");
50 return MY_TO_ANGLE_ID;
53 /// Attribute name of revolution from angle.
54 inline static const std::string& FROM_ANGLE_ID()
56 static const std::string MY_FROM_ANGLE_ID("from_angle");
57 return MY_FROM_ANGLE_ID;
60 /// Attribute name of an object to which the revolution grows.
61 inline static const std::string& TO_OBJECT_ID()
63 static const std::string MY_TO_OBJECT_ID("to_object");
64 return MY_TO_OBJECT_ID;
67 /// Attribute name of extrusion offset.
68 inline static const std::string& TO_OFFSET_ID()
70 static const std::string MY_TO_OFFSET_ID("to_offset");
71 return MY_TO_OFFSET_ID;
74 /// Attribute name of an object from which the revolution grows.
75 inline static const std::string& FROM_OBJECT_ID()
77 static const std::string MY_FROM_OBJECT_ID("from_object");
78 return MY_FROM_OBJECT_ID;
81 /// Attribute name of extrusion offset.
82 inline static const std::string& FROM_OFFSET_ID()
84 static const std::string MY_FROM_OFFSET_ID("from_offset");
85 return MY_FROM_OFFSET_ID;
89 /// Init attributes for revolution.
90 virtual void initMakeSolidsAttributes();
92 /// Create solids from faces with revolution.
93 virtual void makeSolid(const std::shared_ptr<GeomAPI_Shape> theFace,
94 std::shared_ptr<GeomAPI_Shape>& theResult,
95 ListOfShape& theFromFaces,
96 ListOfShape& theToFaces,
97 std::shared_ptr<GeomAlgoAPI_MakeShape>& theMakeShape,
98 std::shared_ptr<GeomAPI_DataMapOfShapeShape>& theDataMap);
101 /// Use plugin manager for features creation.
102 FeaturesPlugin_RevolutionSketch();