]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.h
Salome HOME
Copyright update 2021
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_Storage.h
index 3ac8e201e31be774171630d7be1a479b68af647b..a70241192c5acd9d870896f63e1876a795b4bcae 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021  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
@@ -88,7 +88,15 @@ public:
 
   /// \brief Check the storage has constraints
   virtual bool isEmpty() const
-  { return SketchSolver_Storage::isEmpty() && myArcConstraintMap.empty(); }
+  { return SketchSolver_Storage::isEmpty() && myAuxConstraintMap.empty(); }
+
+  /// \brief Make parametrization of arcs consistent.
+  ///        Forward arcs should have the last parameter greater than the first parameter.
+  ///        Reversed arcs should have the last parameter lesser than the first parameter.
+  virtual void adjustParametrizationOfArcs();
+
+  /// \brief Return list of features which are not fully constrained
+  virtual void getUnderconstrainedGeometry(std::set<ObjectPtr>& theFeatures) const;
 
 private:
   /// \brief Convert feature using specified builder.
@@ -99,14 +107,17 @@ private:
   EntityWrapperPtr createAttribute(const AttributePtr&           theAttribute,
                                    PlaneGCSSolver_EntityBuilder* theBuilder);
 
-  void createArcConstraints(const EntityWrapperPtr& theArc);
-  void removeArcConstraints(const EntityWrapperPtr& theArc);
+  /// \brief Create additional constaints:
+  ///        * for arc to fix extra parameters;
+  ///        * for ellipse to keep auxiliary points on their places
+  void createAuxiliaryConstraints(const EntityWrapperPtr& theEntity);
+  void removeAuxiliaryConstraints(const EntityWrapperPtr& theEntity);
 
 private:
   ConstraintID myConstraintLastID;   ///< identifier of last added constraint
 
-  /// additional constraints for correct processing of the arcs
-  std::map<EntityWrapperPtr, ConstraintWrapperPtr> myArcConstraintMap;
+  /// additional constraints for correct processing of the arcs, ellipses, elliptic arcs
+  std::map<EntityWrapperPtr, ConstraintWrapperPtr> myAuxConstraintMap;
 
   /// list of removed constraints to notify solver
   std::list<GCSConstraintPtr> myRemovedConstraints;