Salome HOME
Dump Python in the High Level Parameterized Geometry API (issue #1648)
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintFillet.h
index 5b7cd49468fc496a6f04990d0c38fcc7b314ce41..b1199bcb89c5f3e3b12aad061884138127cdcc98 100644 (file)
 class SketchPlugin_ConstraintFillet : public SketchPlugin_ConstraintBase
 {
  public:
+   struct FilletFeatures {
+    std::list<std::pair<FeaturePtr, bool>> baseEdgesState; ///< list of objects the fillet is based and its states
+    std::list<FeaturePtr> resultEdges; ///< list of result edges
+    std::list<FeaturePtr> resultConstraints; ///< list of constraints provided by the fillet
+   };
+
   /// Fillet constraint kind
   inline static const std::string& ID()
   {
@@ -44,11 +50,36 @@ class SketchPlugin_ConstraintFillet : public SketchPlugin_ConstraintBase
   /// \brief Request for initialization of data model of the feature: adding all attributes
   SKETCHPLUGIN_EXPORT virtual void initAttributes();
 
+  /// Called on change of any argument-attribute of this object
+  /// \param theID identifier of changed attribute
+  SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
   /// Returns the AIS preview
   SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
 
+  /// Reimplemented from ModelAPI_Feature::isMacro().
+  /// \returns true
+  SKETCHPLUGIN_EXPORT virtual bool isMacro() const;
+
   /// \brief Use plugin manager for features creation
   SketchPlugin_ConstraintFillet();
+
+  /// \return map of base points and features;
+  SKETCHPLUGIN_EXPORT const std::map<AttributePtr, FilletFeatures> pointsFeaturesMap() const {
+    return myPointFeaturesMap;
+  };
+
+private:
+  /// \ Removes all produced features and restore base edges.
+  void clearResults();
+
+private:
+  std::set<AttributePtr> myNewPoints; ///< set of new points
+  std::map<AttributePtr, FilletFeatures> myPointFeaturesMap; ///< map of point and features for fillet
+  bool myListOfPointsChangedInCode; ///< flag to track that list of points changed in code
+  bool myRadiusChangedByUser; ///< flag to track that radius changed by user
+  bool myRadiusChangedInCode; ///< flag to track that radius changed in code
+  bool myRadiusInitialized; /// < flag to track that radius initialized
 };
 
 #endif