-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
* \brief Feature for creation of the new B-spline in Sketch.
*/
class SketchPlugin_MacroBSpline : public SketchPlugin_SketchEntity,
- public GeomAPI_IPresentable,
- public ModelAPI_IReentrant
+ public GeomAPI_IPresentable
{
public:
/// B-spline macro feature kind
SKETCHPLUGIN_EXPORT virtual bool isPreviewNeeded() const {return false;};
- /// Apply information of the message to current object. It fills reference object,
- /// tangent type and tangent point refence in case of tangent arc
- virtual std::string processEvent(const std::shared_ptr<Events_Message>& theMessage);
-
/// Use plugin manager for features creation
SketchPlugin_MacroBSpline();
private:
FeaturePtr createBSplineFeature();
- void createControlPolygon(FeaturePtr theBSpline, std::list<FeaturePtr>& thePoles);
+ /// Create control polygon for the B-spline and returns the list of its poles
+ static void createControlPolygon(FeaturePtr theBSpline,
+ bool thePeriodic,
+ std::list<FeaturePtr>& thePoles);
+
+ /// Create additional coincidences if other features were selected while creating the B-spline
void constraintsForPoles(const std::list<FeaturePtr>& thePoles);
/// Create Point feature coincident with the B-spline pole
const int thePoleIndex1,
const int thePoleIndex2 = -1);
friend class SketchPlugin_BSplineBase;
+ friend class SketchPlugin_CurveFitting;
private:
std::list<double> myKnots;
};
-/**\class SketchPlugin_MacroBSpline
+/**\class SketchPlugin_MacroBSplinePeriodic
* \ingroup Plugins
-* \brief Feature for creation of the new B-spline in Sketch.
+* \brief Feature for creation of the new periodic B-spline in Sketch.
*/
class SketchPlugin_MacroBSplinePeriodic : public SketchPlugin_MacroBSpline
{
/// Returns the kind of a feature
SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
{
- return SketchPlugin_MacroBSpline::ID();
+ return SketchPlugin_MacroBSplinePeriodic::ID();
}
/// Use plugin manager for features creation