Salome HOME
FIx for the issue #2399 : optimization of the Intersection feature results (better...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Split.h
index 3dc1cac36b9f2c2f56a78cb70ad9e892a3898d90..363db36458a37f3051af9524741a864d2d490eec 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
-// File:    SketchPlugin_Split.h
-// Created: 04 May 2017
-// Author:  Natalia ERMOLAEVA
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef SketchPlugin_Split_H_
 #define SketchPlugin_Split_H_
@@ -114,9 +128,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);
 
@@ -170,12 +181,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 +297,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);