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
14 * \brief This feature allows to create sketch and revol faces from this sketch
15 * in a single operation.
17 class FeaturesPlugin_RevolutionSketch : public FeaturesPlugin_CompositeSketch
21 inline static const std::string& ID()
23 static const std::string MY_REVOLUTION_ID("RevolutionSketch");
24 return MY_REVOLUTION_ID;
27 /// \return the kind of a feature
28 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
30 static std::string MY_KIND = FeaturesPlugin_RevolutionSketch::ID();
34 /// Attribute name of an revolution axis.
35 inline static const std::string& AXIS_OBJECT_ID()
37 static const std::string MY_AXIS_ID("axis_object");
41 /// attribute name for creation method
42 inline static const std::string& CREATION_METHOD()
44 static const std::string METHOD_ATTR("CreationMethod");
48 /// Attribute name of revolution to angle.
49 inline static const std::string& TO_ANGLE_ID()
51 static const std::string MY_TO_ANGLE_ID("to_angle");
52 return MY_TO_ANGLE_ID;
55 /// Attribute name of revolution from angle.
56 inline static const std::string& FROM_ANGLE_ID()
58 static const std::string MY_FROM_ANGLE_ID("from_angle");
59 return MY_FROM_ANGLE_ID;
62 /// Attribute name of an object to which the revolution grows.
63 inline static const std::string& TO_OBJECT_ID()
65 static const std::string MY_TO_OBJECT_ID("to_object");
66 return MY_TO_OBJECT_ID;
69 /// Attribute name of extrusion offset.
70 inline static const std::string& TO_OFFSET_ID()
72 static const std::string MY_TO_OFFSET_ID("to_offset");
73 return MY_TO_OFFSET_ID;
76 /// Attribute name of an object from which the revolution grows.
77 inline static const std::string& FROM_OBJECT_ID()
79 static const std::string MY_FROM_OBJECT_ID("from_object");
80 return MY_FROM_OBJECT_ID;
83 /// Attribute name of extrusion offset.
84 inline static const std::string& FROM_OFFSET_ID()
86 static const std::string MY_FROM_OFFSET_ID("from_offset");
87 return MY_FROM_OFFSET_ID;
91 /// Init attributes for revolution.
92 virtual void initMakeSolidsAttributes();
94 /// Create solids from faces with revolution.
95 virtual void makeSolid(const std::shared_ptr<GeomAPI_Shape> theFace,
96 std::shared_ptr<GeomAlgoAPI_MakeShape>& theMakeShape);
99 /// Use plugin manager for features creation.
100 FeaturesPlugin_RevolutionSketch();