Salome HOME
updated copyright message
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_BSpline.h
index 303dc1f0b09ccf13dc81bf9208486045011a2935..5e503d03f24056e8fe615a5677e3bb887cd00e86 100644 (file)
@@ -1,4 +1,4 @@
-// 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()
+  /// end point of B-spline curve
+  inline static const std::string& END_ID()
   {
-    static const std::string ID("degree");
+    static const std::string ID("end_point");
     return ID;
   }
 
@@ -65,21 +56,17 @@ public:
     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