20 #ifndef SketchPlugin_CurveFitting_H_
21 #define SketchPlugin_CurveFitting_H_
23 #include <SketchPlugin.h>
24 #include <SketchPlugin_SketchEntity.h>
26 #include <GeomAPI_IPresentable.h>
40 inline static const std::string&
ID()
42 static const std::string
ID(
"SketchCurveFitting");
49 static const std::string
ID(
"points");
56 static const std::string
ID(
"periodic");
63 static const std::string
ID(
"closed");
70 static const std::string
ID(
"need_control_poly");
75 inline static const std::string&
TYPE_ID()
77 static const std::string
ID(
"type");
84 static const std::string
ID(
"interpolation_type");
91 static const std::string
ID(
"approximation_type");
98 static const std::string
ID(
"precision");
105 static const std::string
ID(
"reorder_points");
110 SKETCHPLUGIN_EXPORT
virtual const std::string&
getKind()
117 virtual AISObjectPtr
getAISObject(AISObjectPtr thePrevious);
120 SKETCHPLUGIN_EXPORT
virtual void execute();
124 SKETCHPLUGIN_EXPORT
virtual bool isMacro()
const {
return true;};
131 SKETCHPLUGIN_EXPORT
virtual bool customAction(
const std::string& theActionId);
142 FeaturePtr createBSplineFeature();
145 void createConstraints(FeaturePtr theProducedFeature);
148 void reorderPoints();
151 std::shared_ptr<GeomAPI_Edge> myTransientResult;
Interface to the edge object.
Definition: GeomAPI_Edge.h:38
A class which defines an interface of object which is able to create its own presentation.
Definition: GeomAPI_IPresentable.h:29
Feature for creation of the new B-spline curve in sketch as an interpolation or an approximation of a...
Definition: SketchPlugin_CurveFitting.h:37
static const std::string & PRECISION_ID()
attribute for the precision of the approximation
Definition: SketchPlugin_CurveFitting.h:96
virtual SKETCHPLUGIN_EXPORT const std::string & getKind()
Returns the kind of a feature.
Definition: SketchPlugin_CurveFitting.h:110
static const std::string & NEED_CONTROL_POLYGON_ID()
attribute for the flag of creation a control polygon
Definition: SketchPlugin_CurveFitting.h:68
static const std::string & CLOSED_ID()
attribute for the closed flag
Definition: SketchPlugin_CurveFitting.h:61
virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious)
Returns the AIS preview.
Definition: SketchPlugin_CurveFitting.cpp:287
static const std::string & POINTS_ID()
list of selected points
Definition: SketchPlugin_CurveFitting.h:47
virtual void initDerivedClassAttributes()
Initializes attributes of derived class.
Definition: SketchPlugin_CurveFitting.cpp:70
static const std::string & PERIODIC_ID()
attribute for the periodic flag
Definition: SketchPlugin_CurveFitting.h:54
static const std::string & TYPE_APPROXIMATION_ID()
value for the type of operation
Definition: SketchPlugin_CurveFitting.h:89
static const std::string & ID()
Interpolation macro feature kind.
Definition: SketchPlugin_CurveFitting.h:40
static const std::string & TYPE_INTERPOLATION_ID()
value for the type of operation
Definition: SketchPlugin_CurveFitting.h:82
static const std::string & TYPE_ID()
attribute for the type of the operation
Definition: SketchPlugin_CurveFitting.h:75
virtual SKETCHPLUGIN_EXPORT bool isMacro() const
Reimplemented from ModelAPI_Feature::isMacro().
Definition: SketchPlugin_CurveFitting.h:124
virtual SKETCHPLUGIN_EXPORT bool isPreviewNeeded() const
Returns true if preview update during the edition needed.
Definition: SketchPlugin_CurveFitting.h:126
virtual SKETCHPLUGIN_EXPORT void execute()
Creates a new part document if needed.
Definition: SketchPlugin_CurveFitting.cpp:87
virtual SKETCHPLUGIN_EXPORT bool customAction(const std::string &theActionId)
Performs some functionality by action id.
Definition: SketchPlugin_CurveFitting.cpp:238
static const std::string & REORDER_POINTS_ACTION_ID()
attribute for the closed flag
Definition: SketchPlugin_CurveFitting.h:103
SketchPlugin_CurveFitting()
Use plugin manager for features creation.
Definition: SketchPlugin_CurveFitting.cpp:65
Sketch Entity for creation of the new feature in PartSet.
Definition: SketchPlugin_SketchEntity.h:45