20 #ifndef SketchAPI_BSpline_H_
21 #define SketchAPI_BSpline_H_
23 #include "SketchAPI.h"
24 #include "SketchAPI_SketchEntity.h"
26 #include <GeomDataAPI_Point2DArray.h>
28 #include <ModelAPI_AttributeDoubleArray.h>
30 #include <SketchPlugin_BSpline.h>
31 #include <SketchPlugin_BSplinePeriodic.h>
33 #include <ModelHighAPI_Double.h>
34 #include <ModelHighAPI_Integer.h>
91 const std::list<
int>& regular = std::list<
int>(),
92 const std::list<
int>&
auxiliary = std::list<
int>()) const;
97 const std::list<
int>& regular = std::list<
int>(),
98 const std::list<
int>&
auxiliary = std::list<
int>()) const;
116 void setStartAndEndPoints();
120 void getDefaultParameters(const std::list<std::shared_ptr<
GeomAPI_Pnt2d> >& thePoles,
127 void checkDefaultParameters(
bool& isDefaultDegree,
128 bool& isDefaultWeights,
129 bool& isDefaultKnotsMults) const;
132 const FeaturePtr& theBSpline,
133 const std::
string& theMethod,
134 const std::map<
int, FeaturePtr>& theAuxFeatures) const;
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36
Attribute that contains array of 2D point coordinates.
Definition: GeomDataAPI_Point2DArray.h:34
Attribute that contains 2D point coordinates.
Definition: GeomDataAPI_Point2D.h:37
API for the attribute that contains several double in the array inside.
Definition: ModelAPI_AttributeDoubleArray.h:32
API for the attribute that contains several integers in the array inside.
Definition: ModelAPI_AttributeIntArray.h:36
API for the attribute that contains integer (int).
Definition: ModelAPI_AttributeInteger.h:34
Attribute that contains reference to the sub-shape of some result, the selected shape.
Definition: ModelAPI_AttributeSelection.h:35
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
Class for filling ModelAPI_AttributeDouble.
Definition: ModelHighAPI_Double.h:37
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Class for filling ModelAPI_AttributeInteger.
Definition: ModelHighAPI_Integer.h:36
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49
Interface for BSplinePeriodic feature.
Definition: SketchAPI_BSpline.h:146
virtual ~SketchAPI_BSplinePeriodic()
Destructor.
Definition: SketchAPI_BSpline.h:154
Interface for BSpline feature.
Definition: SketchAPI_BSpline.h:42
virtual std::shared_ptr< ModelAPI_AttributeSelection > external() const
External.
Definition: SketchAPI_BSpline.h:68
virtual ~SketchAPI_BSpline()
Destructor.
Definition: SketchAPI_BSpline.cpp:58
void setByExternal(const ModelHighAPI_Selection &theExternal)
Set by external.
Definition: SketchAPI_BSpline.cpp:115
void setByParameters(const ModelHighAPI_Integer &theDegree, const std::list< std::shared_ptr< GeomAPI_Pnt2d > > &thePoles, const std::list< ModelHighAPI_Double > &theWeights, const std::list< ModelHighAPI_Double > &theKnots, const std::list< ModelHighAPI_Integer > &theMults)
Initialize by full set of B-spline parameters.
Definition: SketchAPI_BSpline.cpp:83
void setByDegreePolesAndWeights(const ModelHighAPI_Integer &theDegree, const std::list< std::shared_ptr< GeomAPI_Pnt2d > > &thePoles, const std::list< ModelHighAPI_Double > &theWeights)
Set by poles and weights.
Definition: SketchAPI_BSpline.cpp:62
bool insertPole(const int theIndex, const std::shared_ptr< GeomAPI_Pnt2d > &theCoordinates, const ModelHighAPI_Double &theWeight=ModelHighAPI_Double(1.0))
Insert new pole after the pole with the given index.
Definition: SketchAPI_BSpline.cpp:490
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: SketchAPI_BSpline.cpp:393
std::list< std::shared_ptr< SketchAPI_SketchEntity > > controlPolygon(const std::list< int > ®ular=std::list< int >(), const std::list< int > &auxiliary=std::list< int >()) const
Generate control polygon for B-spline curve.
Definition: SketchAPI_BSpline.cpp:235
virtual std::shared_ptr< ModelAPI_AttributeDoubleArray > knots() const
B-spline knots.
Definition: SketchAPI_BSpline.h:68
virtual std::shared_ptr< ModelAPI_AttributeInteger > degree() const
B-spline degree.
Definition: SketchAPI_BSpline.h:68
virtual std::shared_ptr< GeomDataAPI_Point2D > endPoint() const
Last pole of B-spline.
Definition: SketchAPI_BSpline.h:68
virtual std::shared_ptr< ModelAPI_AttributeIntArray > multiplicities() const
Knots multiplicities.
Definition: SketchAPI_BSpline.h:68
std::list< std::shared_ptr< SketchAPI_SketchEntity > > controlPoles(const std::list< int > ®ular=std::list< int >(), const std::list< int > &auxiliary=std::list< int >()) const
Generate list of construction points coincident with B-spline poles.
Definition: SketchAPI_BSpline.cpp:216
virtual std::shared_ptr< ModelAPI_AttributeDoubleArray > weights() const
B-spline weights.
Definition: SketchAPI_BSpline.h:68
virtual std::shared_ptr< GeomDataAPI_Point2D > startPoint() const
First pole of B-spline.
Definition: SketchAPI_BSpline.h:68
virtual std::shared_ptr< GeomDataAPI_Point2DArray > poles() const
B-spline poles.
Definition: SketchAPI_BSpline.h:68
SketchAPI_BSpline(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: SketchAPI_BSpline.cpp:44
Base class for Sketch feature interfaces.
Definition: SketchAPI_SketchEntity.h:38
std::shared_ptr< ModelAPI_AttributeBoolean > auxiliary() const
Auxiliary.
Definition: SketchAPI_SketchEntity.cpp:62
static const std::string & MULTS_ID()
list of B-spline multiplicities
Definition: SketchPlugin_BSplineBase.h:62
static const std::string & DEGREE_ID()
attribute to store the degree of B-spline
Definition: SketchPlugin_BSplineBase.h:48
static const std::string & WEIGHTS_ID()
list of B-spline weights
Definition: SketchPlugin_BSplineBase.h:41
static const std::string & POLES_ID()
list of B-spline poles
Definition: SketchPlugin_BSplineBase.h:34
static const std::string & KNOTS_ID()
list of B-spline knots
Definition: SketchPlugin_BSplineBase.h:55
static const std::string & ID()
B-spline feature kind.
Definition: SketchPlugin_BSplinePeriodic.h:33
static const std::string & END_ID()
end point of B-spline curve
Definition: SketchPlugin_BSpline.h:46
static const std::string & ID()
B-spline feature kind.
Definition: SketchPlugin_BSpline.h:33
static const std::string & START_ID()
start point of B-spline curve
Definition: SketchPlugin_BSpline.h:40
static const std::string & EXTERNAL_ID()
Reference to the external edge or vertex as a AttributeSelection.
Definition: SketchPlugin_SketchEntity.h:55