Salome HOME
Change icons for chamfer
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Split.h
index 3dc1cac36b9f2c2f56a78cb70ad9e892a3898d90..01d153e76871e51037b29b4a367dc0e3189a365a 100644 (file)
@@ -1,8 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
-// File:    SketchPlugin_Split.h
-// Created: 04 May 2017
-// Author:  Natalia ERMOLAEVA
+// Copyright (C) 2014-2019  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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #ifndef SketchPlugin_Split_H_
 #define SketchPlugin_Split_H_
@@ -114,9 +127,6 @@ class SketchPlugin_Split : public SketchPlugin_Feature, public GeomAPI_IPresenta
   /// Returns the AIS preview
   SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
 
-  /// Moves the feature : Empty
-  SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY) {};
-
   /// Apply information of the message to current object. It fills selected point and object
   virtual std::string processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
@@ -138,11 +148,6 @@ private:
                         std::shared_ptr<GeomDataAPI_Point2D>& theStartPointAttr,
                         std::shared_ptr<GeomDataAPI_Point2D>& theEndPointAttr);
 
-  /// Returns cast of attribute to geometrical point if the attribute is a ref attr attribute
-  /// \param theAttribute an attribute
-  /// \param geom point 2D or NULL
-  std::shared_ptr<GeomDataAPI_Point2D> getPointOfRefAttr(const AttributePtr& theAttribute);
-
   /// Obtains those constraints of the feature that should be modified. output maps contain
   /// point of coincidence and attribute id to be modified after split
   /// \param theFeaturesToDelete [out] constrains that will be deleted after split
@@ -170,12 +175,15 @@ private:
   /// \param theFurtherCoincidences a list of points where coincidences will be build
   /// \param theFeatureResults created results after split where constaint might be connected
   /// \param theSplitFeature feature created by split, new coincidences to points should be created
+  /// \param theFeaturesToDelete the list of removed features (will be updated here by
+  ///                            the coincidences to be removed)
   /// if theCoincidenceToFeature contains equal points
   void updateCoincidenceConstraintsToFeature(
       const std::map<std::shared_ptr<ModelAPI_Feature>, IdToPointPair>& theCoincidenceToFeature,
       const std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theFurtherCoincidences,
       const std::set<ResultPtr>& theFeatureResults,
-      const FeaturePtr& theSplitFeature);
+      const FeaturePtr& theSplitFeature,
+      std::set<FeaturePtr>& theFeaturesToDelete);
 
   /// Move constraints from base feature to given feature
   /// \param theFeature a base feature
@@ -283,22 +291,6 @@ private:
                               const AttributePtr& theFirstPointAttr,
                               const AttributePtr& theSecondPointAttr);
 
-  /// Add feature coincidence constraint between given attributes
-  /// \param theConstraintId a constraint index
-  /// \param theFirstAttribute an attribute of further coincidence
-  /// \param theSecondAttribute an attribute of further coincidence
-  std::shared_ptr<ModelAPI_Feature> createConstraint(const std::string& theConstraintId,
-                        const std::shared_ptr<ModelAPI_Attribute>& theFirstAttribute,
-                        const std::shared_ptr<ModelAPI_Attribute>& theSecondAttribute);
-
-  /// Add feature coincidence constraint between given attributes
-  /// \param theConstraintId a constraint index
-  /// \param theFirstAttribute an attribute of further coincidence
-  /// \param theFirstAttribute an attribute of further coincidence
-  std::shared_ptr<ModelAPI_Feature> createConstraintForObjects(const std::string& theConstraintId,
-                        const std::shared_ptr<ModelAPI_Object>& theFirstObject,
-                        const std::shared_ptr<ModelAPI_Object>& theSecondObject);
-
   /// Add feature coincidence constraint between given attributes
   /// \param theFeaturesToUpdate a constraint index
   void updateFeaturesAfterSplit(const std::set<FeaturePtr>& theFeaturesToUpdate);