-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#ifndef SketchPlugin_BSpline_H_
#define SketchPlugin_BSpline_H_
-#include <SketchPlugin.h>
-#include <SketchPlugin_SketchEntity.h>
+#include <SketchPlugin_BSplineBase.h>
/**\class SketchPlugin_BSpline
* \ingroup Plugins
* \brief Feature for creation of the B-spline curve in the sketch.
*/
-class SketchPlugin_BSpline : public SketchPlugin_SketchEntity
+class SketchPlugin_BSpline : public SketchPlugin_BSplineBase
{
public:
- /// Ellipse feature kind
+ /// B-spline feature kind
inline static const std::string& ID()
{
static const std::string ID("SketchBSpline");
return ID;
}
- /// list of B-spline poles
- inline static const std::string& POLES_ID()
+ /// start point of B-spline curve
+ inline static const std::string& START_ID()
{
- static const std::string ID("poles");
+ static const std::string ID("start_point");
return ID;
}
-
- /// list of B-spline weights
- inline static const std::string& WEIGHTS_ID()
- {
- static const std::string ID("weights");
- return ID;
- }
-
- /// attribute to store the degree of B-spline
- inline static const std::string& DEGREE_ID()
- {
- static const std::string ID("degree");
- return ID;
- }
-
- /// list of B-spline knots
- inline static const std::string& KNOTS_ID()
- {
- static const std::string ID("knots");
- return ID;
- }
-
- /// list of B-spline multiplicities
- inline static const std::string& MULTS_ID()
+ /// end point of B-spline curve
+ inline static const std::string& END_ID()
{
- static const std::string ID("multiplicities");
+ static const std::string ID("end_point");
return ID;
}
return MY_KIND;
}
- /// Returns true is sketch element is under the rigid constraint
- SKETCHPLUGIN_EXPORT virtual bool isFixed();
-
/// Called on change of any argument-attribute of this object
SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
- /// Creates a new part document if needed
- SKETCHPLUGIN_EXPORT virtual void execute();
-
/// Use plugin manager for features creation
SketchPlugin_BSpline();
protected:
/// \brief Initializes attributes of derived class.
virtual void initDerivedClassAttributes();
+
+ virtual bool isPeriodic() const { return false; }
};
#endif