]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_ExternalObjectsMgr.h
Salome HOME
updated copyright message
[modules/shaper.git] / src / PartSet / PartSet_ExternalObjectsMgr.h
old mode 100755 (executable)
new mode 100644 (file)
index 4cc3696..5d210f0
@@ -1,9 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        PartSet_ExternalObjectsMgr.h
-// Created:     15 Apr 2015
-// Author:      Natalia Ermolaeva
-
+// Copyright (C) 2014-2023  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 PartSet_ExternalObjectsMgr_H
 #define PartSet_ExternalObjectsMgr_H
@@ -19,6 +31,7 @@
 #include <string>
 
 class ModuleBase_IWorkshop;
+class ModuleBase_ViewerPrs;
 class XGUI_Workshop;
 
 /**
@@ -60,6 +73,19 @@ class PARTSET_EXPORT PartSet_ExternalObjectsMgr
   ObjectPtr externalObject(const ObjectPtr& theSelectedObject, const GeomShapePtr& theShape,
                            const CompositeFeaturePtr& theSketch, const bool theTemporary = false);
 
+  /// Finds or create and external object by selected circle center (PartSet_CenterPrs)
+  /// \param thePrs a selection
+  /// \param theSketch a current sketch
+  /// \param theTemporary the created external object is temporary, execute is not performed for it
+  /// \return the object
+  ObjectPtr externalCenterObject(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs,
+                                 const CompositeFeaturePtr& theSketch,
+                                 const bool theTemporary);
+
+  /// Returns created external object or NULL
+  /// \return an object instance
+  ObjectPtr getExternalObjectValidated() const { return myExternalObjectValidated; }
+
   // Removes the external presentation from the model
   /// \param theSketch a current sketch
   /// \param theFeature a current feature
@@ -70,6 +96,17 @@ class PARTSET_EXPORT PartSet_ExternalObjectsMgr
                       ModuleBase_IWorkshop* theWorkshop,
                       const bool theTemporary);
 
+  /// Return an object and geom shape by the viewer presentation
+  /// \param thePrs a selection
+  /// \param theObject an output object
+  /// \param theShape a shape of the selection
+  virtual void getGeomSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs,
+                                ObjectPtr& theObject,
+                                GeomShapePtr& theShape,
+                                ModuleBase_IWorkshop* theWorkshop,
+                                const CompositeFeaturePtr& theSketch,
+                                const bool isInValidate);
+
 protected:
   /// Delete from the document the feature of the object. It deletes all objects, which refers to
   /// the deleted one. The parameter feature is ignored even it refer to the deleted object.