-// 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_
/// 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);
/// \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
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);