20 #ifndef BuildPlugin_Filling_H_
21 #define BuildPlugin_Filling_H_
23 #include "BuildPlugin.h"
25 #include <ModelAPI_Feature.h>
45 inline static const std::string&
ID()
47 static const std::string MY_ID(
"Filling");
52 BUILDPLUGIN_EXPORT
virtual const std::string&
getKind()
61 static const std::string MY_BASE_OBJECTS_ID(
"base_objects");
62 return MY_BASE_OBJECTS_ID;
68 static const std::string MY_ADVANCED_OPTIONS_ID(
"advanced_options");
69 return MY_ADVANCED_OPTIONS_ID;
75 static const std::string MY_METHOD_ID(
"orientation");
81 inline static const std::string& AUTO_CORRECT_ORIENTATION()
83 static const std::string MY_AUTO_CORRECT_ORIENTATION(
"auto_correct");
84 return MY_AUTO_CORRECT_ORIENTATION;
86 inline static const std::string& USE_CURVE_INFORMATION()
88 static const std::string MY_USE_CURVE_INFORMATION(
"curve_info");
89 return MY_USE_CURVE_INFORMATION;
91 inline static const std::string& USE_EDGES_ORIENTATION()
93 static const std::string MY_USE_EDGES_ORIENTATION(
"edge_orient");
94 return MY_USE_EDGES_ORIENTATION;
101 static const std::string MY_MINIMAL_DEGREE_ID(
"min_degree");
102 return MY_MINIMAL_DEGREE_ID;
108 static const std::string MY_MAXIMAL_DEGREE_ID(
"max_degree");
109 return MY_MAXIMAL_DEGREE_ID;
115 static const std::string MY_NUMBER_OF_ITERATIONS_ID(
"nb_iter");
116 return MY_NUMBER_OF_ITERATIONS_ID;
122 static const std::string MY_TOLERANCE_2D_ID(
"tol_2d");
123 return MY_TOLERANCE_2D_ID;
129 static const std::string MY_TOLERANCE_3D_ID(
"tol_3d");
130 return MY_TOLERANCE_3D_ID;
136 static const std::string MY_APPROXIMATION_ID(
"approximation");
137 return MY_APPROXIMATION_ID;
141 inline static const std::string&
METHOD_DEFAULT() {
return Method::AUTO_CORRECT_ORIENTATION(); }
159 BUILDPLUGIN_EXPORT
virtual void execute();
167 std::shared_ptr<GeomAPI_Edge> toEdge(
const std::shared_ptr<GeomAPI_Shape>& theShape,
168 const std::string& theMethod);
171 void restoreDefaultParameters();
174 std::shared_ptr<GeomAPI_Edge> myLastEdge;
Feature for creation of face from list of edges (1D objects).
Definition: BuildPlugin_Filling.h:39
static const std::string & TOLERANCE_3D_ID()
Attribute name of 3D tolerance.
Definition: BuildPlugin_Filling.h:127
static const std::string & ID()
Feature kind.
Definition: BuildPlugin_Filling.h:45
static const std::string & APPROXIMATION_ID()
Attribute name of approximation.
Definition: BuildPlugin_Filling.h:134
static const std::string & MINIMAL_DEGREE_ID()
Attribute name of minimal degree.
Definition: BuildPlugin_Filling.h:99
static double TOLERANCE_3D_DEFAULT()
Default value of 3D tolerance.
Definition: BuildPlugin_Filling.h:151
static const std::string & BASE_OBJECTS_ID()
Attribute name of base objects.
Definition: BuildPlugin_Filling.h:59
static const std::string & ADVANCED_OPTIONS_ID()
Attribute name of advanced options.
Definition: BuildPlugin_Filling.h:66
static const std::string & METHOD_ID()
Attribute name of method of edge orientation.
Definition: BuildPlugin_Filling.h:73
static int MAXIMAL_DEGREE_DEFAULT()
Default value of maximal degree.
Definition: BuildPlugin_Filling.h:145
static int MINIMAL_DEGREE_DEFAULT()
Default value of minimal degree.
Definition: BuildPlugin_Filling.h:143
virtual const std::string & getKind()
Definition: BuildPlugin_Filling.h:52
BuildPlugin_Filling()
Use plugin manager for features creation.
Definition: BuildPlugin_Filling.cpp:65
static bool APPROXIMATION_DEFAULT()
Default value of the approximation attribute.
Definition: BuildPlugin_Filling.h:153
virtual void attributeChanged(const std::string &theID)
Called on change of any argument-attribute of this object.
Definition: BuildPlugin_Filling.cpp:148
static double TOLERANCE_2D_DEFAULT()
Default value of 2D tolerance.
Definition: BuildPlugin_Filling.h:149
static const std::string & TOLERANCE_2D_ID()
Attribute name of 2D tolerance.
Definition: BuildPlugin_Filling.h:120
static int NUMBER_OF_ITERATIONS_DEFAULT()
Default value of number of iterations.
Definition: BuildPlugin_Filling.h:147
static const std::string & MAXIMAL_DEGREE_ID()
Attribute name of maximal degree.
Definition: BuildPlugin_Filling.h:106
virtual void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: BuildPlugin_Filling.cpp:70
virtual void execute()
Creates a new part document if needed.
Definition: BuildPlugin_Filling.cpp:87
static const std::string & METHOD_DEFAULT()
Default value of the orientation.
Definition: BuildPlugin_Filling.h:141
static const std::string & NUMBER_OF_ITERATIONS_ID()
Attribute name of number of iterations.
Definition: BuildPlugin_Filling.h:113
Interface to the edge object.
Definition: GeomAPI_Edge.h:38
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Interface to the root class of all topological shapes constructions.
Definition: GeomAlgoAPI_MakeShape.h:35
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
Supported methods for edge orientation correction.
Definition: BuildPlugin_Filling.h:80