]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' into occ/bsplines
authorazv <azv@opencascade.com>
Wed, 29 Jan 2020 10:43:15 +0000 (13:43 +0300)
committerazv <azv@opencascade.com>
Wed, 29 Jan 2020 10:43:15 +0000 (13:43 +0300)
57 files changed:
salomeRun_deb.bat
salomeRun_rel.bat
src/Config/Config_Prop.h
src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp
src/FeaturesAPI/CMakeLists.txt
src/FeaturesAPI/FeaturesAPI.i
src/FeaturesAPI/FeaturesAPI_Copy.h
src/FeaturesAPI/FeaturesAPI_ImportResult.cpp [new file with mode: 0644]
src/FeaturesAPI/FeaturesAPI_ImportResult.h [new file with mode: 0644]
src/FeaturesAPI/FeaturesAPI_swig.h
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_ImportResult.cpp [new file with mode: 0644]
src/FeaturesPlugin/FeaturesPlugin_ImportResult.h [new file with mode: 0644]
src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp
src/FeaturesPlugin/FeaturesPlugin_msg_fr.ts
src/FeaturesPlugin/Test/TestImportResult.py [new file with mode: 0644]
src/FeaturesPlugin/doc/FeaturesPlugin.rst
src/FeaturesPlugin/doc/TUI_importResultFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/import_result.py [new file with mode: 0644]
src/FeaturesPlugin/doc/images/CreatedImportResult.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/ImportResult.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/import_result_btn.png [new file with mode: 0644]
src/FeaturesPlugin/doc/importResultFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/icons/import_result.png [new file with mode: 0644]
src/FeaturesPlugin/import_result_widget.xml [new file with mode: 0644]
src/FeaturesPlugin/plugin-Features.xml
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
src/Model/Model_AttributeReference.cpp
src/Model/Model_AttributeSelection.cpp
src/Model/Model_BodyBuilder.cpp
src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp
src/ModuleBase/ModuleBase_ModelWidget.cpp
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_Preferences.cpp
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/ModuleBase/ModuleBase_ViewerFilters.cpp
src/PartSet/PartSet_MenuMgr.cpp
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherMgr.h
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Tools.h
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PythonAPI/model/features/__init__.py
src/SHAPERGUI/SHAPERGUI.cpp
src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp
src/SketchPlugin/SketchPlugin_msg_fr.ts
src/SketchPlugin/plugin-Sketch.xml
src/SketcherPrs/SketcherPrs_SensitivePoint.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.h
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_ViewerProxy.cpp
src/XGUI/XGUI_pictures.qrc
src/XGUI/pictures/ArrowCursor.png [new file with mode: 0644]
src/XGUI/pictures/CrossCursor.png [new file with mode: 0644]
src/XGUI/pictures/HandCursor.png [new file with mode: 0644]

index 14b69a6bae69db906e26ff02fb6585e92c742ced..17e988d5561f14898566f99b13c4ea519d4ab4fa 100644 (file)
@@ -10,6 +10,9 @@ popd
 @SET OCC_LIB_PREFIX=d
 call env_Salome.bat d
 
+rem Variable which is necessary for launching SALOME
+SET SALOME_PLEASE_SETUP_ENVIRONMENT_AS_BEFORE=1
+
 @SET SHAPER_ROOT_DIR=%ROOT_DIR%\install
 @SET SalomeAppConfig=%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui
 
index 2cfabdae9b283e2d0da722f4532eb33ff314cb79..82717fdb44e9a7bb029e15bba760e2c64d15713a 100644 (file)
@@ -9,6 +9,9 @@ popd
 
 call env_Salome.bat
 
+rem Variable which is necessary for launching SALOME
+SET SALOME_PLEASE_SETUP_ENVIRONMENT_AS_BEFORE=1
+
 @SET SHAPER_ROOT_DIR=%ROOT_DIR%\install
 @SET SalomeAppConfig=%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui
 
index fe97e96756c9990d7c3e6ff6e529b9dd2140492f..050b5d6a6fb45c426bc8c41f95123bc843daa2c4 100644 (file)
@@ -60,7 +60,15 @@ class Config_Prop
     ShortcutTree,
     BiColor,
     Background,
-    Directory
+    Directory,
+    Cursor
+  };
+
+  enum CursorType
+  {
+    ArrowCursor,
+    CrossCursor,
+    HandCursor
   };
 
   /** 
index e4f47673e86a92aa62e55f268e79979a090e03cd..7e8ff1db5d49ba611905bf13954ccf76479a6507 100644 (file)
@@ -64,6 +64,8 @@ ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
     Config_Prop::DblSpin, "1.0");
   Config_PropManager::registerProp(SKETCH_TAB_NAME, "rotate_to_plane",
     "Rotate to plane when selected", Config_Prop::Boolean, "false");
+  Config_PropManager::registerProp(SKETCH_TAB_NAME, "operation_cursor",
+    "Cursor for Sketch operation", Config_Prop::Cursor, "0");
 
   // register this plugin
   ModelAPI_Session::get()->registerPlugin(this);
index dbdb6bc5b388d7926537c898e7f2ac04651da234..921b2eec785f6bdb58b940705b9a2a52ab3c1bcc 100644 (file)
@@ -49,6 +49,7 @@ SET(PROJECT_HEADERS
   FeaturesAPI_Union.h
   FeaturesAPI_FusionFaces.h
   FeaturesAPI_Copy.h
+  FeaturesAPI_ImportResult.h
 )
 
 SET(PROJECT_SOURCES
@@ -80,6 +81,7 @@ SET(PROJECT_SOURCES
   FeaturesAPI_Union.cpp
   FeaturesAPI_FusionFaces.cpp
   FeaturesAPI_Copy.cpp
+  FeaturesAPI_ImportResult.cpp
 )
 
 SET(PROJECT_LIBRARIES
index 9ed6db0d36611bac85dad93aa0d4e611d6535ef5..41999dee9d046104a61c665faa65ee525b38842d 100644 (file)
@@ -78,6 +78,7 @@
 %shared_ptr(FeaturesAPI_FusionFaces)
 %shared_ptr(FeaturesAPI_RemoveResults)
 %shared_ptr(FeaturesAPI_Copy)
+%shared_ptr(FeaturesAPI_ImportResult)
 
 
 %typecheck(SWIG_TYPECHECK_POINTER) std::pair<std::list<ModelHighAPI_Selection>, bool>, const std::pair<std::list<ModelHighAPI_Selection>, bool> & {
 %include "FeaturesAPI_FusionFaces.h"
 %include "FeaturesAPI_RemoveResults.h"
 %include "FeaturesAPI_Copy.h"
+%include "FeaturesAPI_ImportResult.h"
index 92174f9f407e20ce8d8ce4fe936942e684922acf..1fa43de5bc54c5a43db1c72f172528835ddac886 100644 (file)
@@ -44,7 +44,7 @@ public:
   FEATURESAPI_EXPORT
   explicit FeaturesAPI_Copy(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
-                            const int theVersion = 0);
+                            const int theNumber);
 
   /// Destructor.
   FEATURESAPI_EXPORT virtual ~FeaturesAPI_Copy();
diff --git a/src/FeaturesAPI/FeaturesAPI_ImportResult.cpp b/src/FeaturesAPI/FeaturesAPI_ImportResult.cpp
new file mode 100644 (file)
index 0000000..cf72de3
--- /dev/null
@@ -0,0 +1,70 @@
+// 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
+//
+
+#include "FeaturesAPI_ImportResult.h"
+
+#include <ModelHighAPI_Dumper.h>
+#include <ModelHighAPI_Tools.h>
+
+//================================================================================================
+FeaturesAPI_ImportResult::FeaturesAPI_ImportResult(
+  const std::shared_ptr<ModelAPI_Feature>& theFeature) : ModelHighAPI_Interface(theFeature)
+{
+  initialize();
+}
+
+//================================================================================================
+FeaturesAPI_ImportResult::FeaturesAPI_ImportResult(
+  const std::shared_ptr<ModelAPI_Feature>& theFeature,
+  const std::list<ModelHighAPI_Selection>& theObjects) : ModelHighAPI_Interface(theFeature)
+{
+  if(initialize()) {
+    setObjects(theObjects);
+  }
+}
+
+//=================================================================================================
+FeaturesAPI_ImportResult::~FeaturesAPI_ImportResult() {}
+
+//=================================================================================================
+void FeaturesAPI_ImportResult::setObjects(const std::list<ModelHighAPI_Selection>& theObjects)
+{
+  fillAttribute(theObjects, myobjects);
+  execute();
+}
+
+//=================================================================================================
+void FeaturesAPI_ImportResult::dump(ModelHighAPI_Dumper& theDumper) const
+{
+  FeaturePtr aBase = feature();
+  const std::string& aDocName = theDumper.name(aBase->document());
+  AttributeSelectionListPtr anObjects =
+    aBase->selectionList(FeaturesPlugin_ImportResult::OBJECTS());
+
+  theDumper << aBase << " = model.addImportResult("
+            << aDocName << ", " << anObjects << ")" << std::endl;
+}
+
+//=================================================================================================
+ImportResultPtr addImportResult(const std::shared_ptr<ModelAPI_Document>& thePart,
+                                const std::list<ModelHighAPI_Selection>& theObjects)
+{
+  std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_ImportResult::ID());
+  return ImportResultPtr(new FeaturesAPI_ImportResult(aFeature, theObjects));
+}
diff --git a/src/FeaturesAPI/FeaturesAPI_ImportResult.h b/src/FeaturesAPI/FeaturesAPI_ImportResult.h
new file mode 100644 (file)
index 0000000..a461f3d
--- /dev/null
@@ -0,0 +1,71 @@
+// 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 FeaturesAPI_ImportResult_H_
+#define FeaturesAPI_ImportResult_H_
+
+#include "FeaturesAPI.h"
+
+#include <FeaturesPlugin_ImportResult.h>
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+class ModelHighAPI_Dumper;
+class ModelHighAPI_Selection;
+
+/// \class FeaturesAPI_ImportResult
+/// \ingroup CPPHighAPI
+/// \brief Interface for ImportResult feature.
+class FeaturesAPI_ImportResult: public ModelHighAPI_Interface
+{
+public:
+  /// Constructor without values.
+  FEATURESAPI_EXPORT
+  explicit FeaturesAPI_ImportResult(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+  /// Constructor with values.
+  FEATURESAPI_EXPORT
+  explicit FeaturesAPI_ImportResult(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                                    const std::list<ModelHighAPI_Selection>& theBaseObjects);
+
+  /// Destructor.
+  FEATURESAPI_EXPORT virtual ~FeaturesAPI_ImportResult();
+
+  INTERFACE_1(FeaturesPlugin_ImportResult::ID(),
+              objects, FeaturesPlugin_ImportResult::OBJECTS(),
+              ModelAPI_AttributeSelectionList, /** Source objects */)
+
+  /// Modify objects attribute of the feature.
+  FEATURESAPI_EXPORT void setObjects(const std::list<ModelHighAPI_Selection>& theBaseObjects);
+
+  /// Dump wrapped feature
+  FEATURESAPI_EXPORT virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+};
+
+/// Pointer on ImportResult object.
+typedef std::shared_ptr<FeaturesAPI_ImportResult> ImportResultPtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create ImportResult feature.
+FEATURESAPI_EXPORT
+ImportResultPtr addImportResult(const std::shared_ptr<ModelAPI_Document>& thePart,
+                                const std::list<ModelHighAPI_Selection>& theObjects);
+
+#endif // FeaturesAPI_ImportResult_H_
index 767e0966fda6e81afa2a17b84e0e484c8a62d266..ca0d4b6dbdc894c4ab0a1a6a7d86581ea3383a69 100644 (file)
@@ -51,5 +51,6 @@
   #include "FeaturesAPI_FusionFaces.h"
   #include "FeaturesAPI_RemoveResults.h"
   #include "FeaturesAPI_Copy.h"
+  #include "FeaturesAPI_ImportResult.h"
 
 #endif // FeaturesAPI_swig_H_
index 913a83aff1bd71a27cb4b307822a6d3f49f7fe82..b5b856d714d9b48314dbdbc8b9aa8b643c86838a 100644 (file)
@@ -62,6 +62,7 @@ SET(PROJECT_HEADERS
     FeaturesPlugin_RemoveResults.h
     FeaturesPlugin_Chamfer.h
     FeaturesPlugin_Copy.h
+    FeaturesPlugin_ImportResult.h
 )
 
 SET(PROJECT_SOURCES
@@ -105,6 +106,7 @@ SET(PROJECT_SOURCES
     FeaturesPlugin_RemoveResults.cpp
     FeaturesPlugin_Chamfer.cpp
     FeaturesPlugin_Copy.cpp
+    FeaturesPlugin_ImportResult.cpp
 )
 
 SET(XML_RESOURCES
@@ -138,6 +140,7 @@ SET(XML_RESOURCES
   fusion_faces_widget.xml
   chamfer_widget.xml
   copy_widget.xml
+  import_result_widget.xml
 )
 
 SET(TEXT_RESOURCES
@@ -551,4 +554,5 @@ ADD_UNIT_TESTS(TestExtrusion.py
                TestCopyNames.py
                TestCopySubShapes.py
                TestCopyWholeFeature.py
+               TestImportResult.py
 )
diff --git a/src/FeaturesPlugin/FeaturesPlugin_ImportResult.cpp b/src/FeaturesPlugin/FeaturesPlugin_ImportResult.cpp
new file mode 100644 (file)
index 0000000..80e61c0
--- /dev/null
@@ -0,0 +1,117 @@
+// Copyright (C) 2017-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
+//
+
+#include "FeaturesPlugin_ImportResult.h"
+
+#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_ResultBody.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_ResultPart.h>
+#include <Events_InfoMessage.h>
+
+void FeaturesPlugin_ImportResult::initAttributes()
+{
+  data()->addAttribute(OBJECTS(), ModelAPI_AttributeSelectionList::typeId());
+}
+
+void FeaturesPlugin_ImportResult::execute()
+{
+  AttributeSelectionListPtr aList = selectionList(OBJECTS());
+  int aResultIndex = 0;
+  for (int aSelIndex = 0; aSelIndex < aList->size(); aSelIndex++) {
+    AttributeSelectionPtr aSel = aList->value(aSelIndex);
+    ResultPtr aContext = aSel->context();
+    if (!aContext.get())
+      continue;
+    GeomShapePtr aShape = aContext->shape();
+    if (!aShape.get() || aShape->isNull())
+      continue;
+    std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data(), aResultIndex);
+    aResultBody->store(aShape);
+    aResultBody->loadFirstLevel(aShape, "ImportResult");
+    setResult(aResultBody, aResultIndex++);
+  }
+  removeResults(aResultIndex);
+}
+
+bool FeaturesPlugin_ValidatorImportResults::isValid(const AttributePtr& theAttribute,
+  const std::list<std::string>&, Events_InfoMessage& theError) const
+{
+  AttributeSelectionListPtr aList =
+    std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
+  if (aList->size() == 0) {
+    // LCOV_EXCL_START
+    theError = "Please select sources.";
+    return false;
+    // LCOV_EXCL_STOP
+  }
+  // store documents in the Part-fesatures in order to check
+  // the selection is located in the previous documents
+  std::map<DocumentPtr, int> aDocIndices;
+  DocumentPtr aRoot = ModelAPI_Session::get()->moduleDocument();
+  int aNum = aRoot->size(ModelAPI_Feature::group());
+  for (int a = 0; a < aNum; a++) {
+    FeaturePtr aFeat = std::dynamic_pointer_cast<ModelAPI_Feature>(
+      aRoot->object(ModelAPI_Feature::group(), a));
+    if (aFeat.get() && aFeat->data() && aFeat->data()->isValid() && aFeat->getKind() == "Part" &&
+      aFeat->results().size()) {
+      ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aFeat->firstResult());
+      if (aPart.get() && aPart->partDoc()) {
+        aDocIndices[aPart->partDoc()] = a;
+      }
+    }
+  }
+  int aThisIndex = aDocIndices[aList->owner()->document()];
+  for (int aSelIndex = 0; aSelIndex < aList->size(); aSelIndex++) {
+    AttributeSelectionPtr aSel = aList->value(aSelIndex);
+    ResultPtr aContext = aSel->context();
+    if (!aContext.get()) {
+      // LCOV_EXCL_START
+      theError = "Empty context.";
+      return false;
+      // LCOV_EXCL_STOP
+    }
+    GeomShapePtr aShape = aSel->value();
+    if (aShape.get() && !aShape->isNull() && !aShape->isSame(aContext->shape())) {
+      // LCOV_EXCL_START
+      theError = "Import results does not support selection of sub-shapes";
+      return false;
+      // LCOV_EXCL_STOP
+    }
+    ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aContext);
+    if (!aBody.get()) {
+      // LCOV_EXCL_START
+      theError = "Only results may be selected.";
+      return false;
+      // LCOV_EXCL_STOP
+    }
+    if (!aBody->shape()) {
+      // LCOV_EXCL_START
+      theError = "Result is empty.";
+      return false;
+      // LCOV_EXCL_STOP
+    }
+    int aBodyIndex = aDocIndices[aBody->document()];
+    if (aBodyIndex >= aThisIndex) {
+      theError = "The selected result must be located in earlier part.";
+      return false;
+    }
+  }
+  return true;
+}
diff --git a/src/FeaturesPlugin/FeaturesPlugin_ImportResult.h b/src/FeaturesPlugin/FeaturesPlugin_ImportResult.h
new file mode 100644 (file)
index 0000000..4b5df61
--- /dev/null
@@ -0,0 +1,82 @@
+// Copyright (C) 2017-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 FeaturesPlugin_ImportResult_H_
+#define FeaturesPlugin_ImportResult_H_
+
+#include "FeaturesPlugin.h"
+
+#include <ModelAPI_Feature.h>
+#include <ModelAPI_AttributeValidator.h>
+
+/// \class FeaturesPlugin_ImportResult
+/// \ingroup Plugins
+/// \brief The Import Result feature allows the user to import one or several results
+///        from another Part.
+
+class FeaturesPlugin_ImportResult : public ModelAPI_Feature
+{
+public:
+  /// Feature kind.
+  inline static const std::string& ID()
+  {
+    static const std::string MY_ID("ImportResult");
+    return MY_ID;
+  }
+
+  /// \return the kind of a feature.
+  FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
+  {
+    static std::string MY_KIND = FeaturesPlugin_ImportResult::ID();
+    return MY_KIND;
+  }
+
+  /// Selection list attribute that contains all copied shapes selection.
+  inline static const std::string& OBJECTS()
+  {
+    static const std::string MY_OBJECTS("objects");
+    return MY_OBJECTS;
+  }
+
+  /// Performs the algorithm and stores results it in the data structure.
+  FEATURESPLUGIN_EXPORT virtual void execute();
+
+  /// Request for initialization of data model of the feature: adding all attributes.
+  FEATURESPLUGIN_EXPORT virtual void initAttributes();
+
+  /// Use plugin manager for features creation.
+  FeaturesPlugin_ImportResult() {}
+};
+
+/// \class FeaturesPlugin_ValidatorImportResults
+/// \ingroup Validators
+/// \brief A validator for selection of objects that may be imported:
+///        from another part, result bodies.
+class FeaturesPlugin_ValidatorImportResults : public ModelAPI_AttributeValidator
+{
+public:
+  //! \return True if selection is valid.
+  //! \param[in] theAttribute the checked attribute.
+  //! \param[in] theArguments arguments of the attribute.
+  //! \param[out] theError error message.
+  virtual bool isValid(const AttributePtr& theAttribute,
+    const std::list<std::string>& theArguments, Events_InfoMessage& theError) const;
+};
+
+#endif
index 5a2ff7c5c99ab3c69b6a166de124e61d46966ac6..8ade62615bd4d976d6a43b051f9306c6c5d614a3 100644 (file)
@@ -49,6 +49,7 @@
 #include <FeaturesPlugin_FusionFaces.h>
 #include <FeaturesPlugin_RemoveResults.h>
 #include <FeaturesPlugin_Copy.h>
+#include <FeaturesPlugin_ImportResult.h>
 #include <FeaturesPlugin_ValidatorTransform.h>
 #include <FeaturesPlugin_Validators.h>
 
@@ -115,6 +116,8 @@ FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()
                               new FeaturesPlugin_ValidatorBooleanCommonSelection);
   aFactory->registerValidator("FeaturesPlugin_ValidatorBooleanCommonArguments",
                               new FeaturesPlugin_ValidatorBooleanCommonArguments);
+  aFactory->registerValidator("FeaturesPlugin_ValidatorImportResults",
+                              new FeaturesPlugin_ValidatorImportResults);
 
   // register this plugin
   ModelAPI_Session::get()->registerPlugin(this);
@@ -182,6 +185,8 @@ FeaturePtr FeaturesPlugin_Plugin::createFeature(std::string theFeatureID)
     return FeaturePtr(new FeaturesPlugin_Chamfer);
   } else if (theFeatureID == FeaturesPlugin_Copy::ID()) {
     return FeaturePtr(new FeaturesPlugin_Copy);
+  } else if (theFeatureID == FeaturesPlugin_ImportResult::ID()) {
+    return FeaturePtr(new FeaturesPlugin_ImportResult);
   }
 
 
index 1a043413bbe5ded849c2ae1f481d21515f0d4cae..df8d45ad1f03249b7da4f1e1311ad6a2f7e20771 100644 (file)
       <source>Copy</source>
       <translation>Copie</translation>
     </message>
+    <message>
+      <source>Import Result</source>
+      <translation>Importer le résultat</translation>
+    </message>
     <message>
       <source>Remove Sub-Shapes</source>
       <translation>Supprimer les sous-formes</translation>
     </message>
   </context>
 
+  <!-- Import result -->
+  <context>
+    <name>ImportResult</name>
+    <message>
+      <source>ImportResult</source>
+      <translation>Importer le résultat</translation>
+    </message>
+    <message>
+      <source>Copies results from other parts</source>
+      <translation>Copie les résultats d'autres pièces</translation>
+    </message>
+  </context>
+  <context>
+    <name>ImportResult:objects</name>
+    <message>
+      <source>Sources:</source>
+      <translation>Sources:</translation>
+    </message>
+    <message>
+      <source>Select copied results</source>
+      <translation>Sélectionnez les résultats copiés</translation>
+    </message>
+  </context>
+
   <!-- Remove_SubShapes -->
   <context>
     <name>Remove_SubShapes</name>
diff --git a/src/FeaturesPlugin/Test/TestImportResult.py b/src/FeaturesPlugin/Test/TestImportResult.py
new file mode 100644 (file)
index 0000000..bd6a0c0
--- /dev/null
@@ -0,0 +1,84 @@
+# 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
+#
+
+from salome.shaper import model
+from ModelAPI import *
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(15, 13, 11)
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")], model.selection(), 10, 0)
+model.do()
+
+Part_2 = model.addPart(partSet)
+Part_2_doc = Part_2.document()
+Sketch_2 = model.addSketch(Part_2_doc, model.defaultPlane("XOZ"))
+SketchCircle_2 = Sketch_2.addCircle(-13, -9, 5)
+model.do()
+Extrusion_2 = model.addExtrusion(Part_2_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")], model.selection(), 10, 0)
+ImportResult_1 = model.addImportResult(Part_2_doc, [model.selection("SOLID", "Part_1/Extrusion_1_1")])
+model.do()
+
+Part_3 = model.addPart(partSet)
+Part_3_doc = Part_3.document()
+Extrusion_3 = model.addExtrusion(Part_3_doc, [], model.selection(), 1, 0)
+Sketch_3 = model.addSketch(Part_3_doc, model.defaultPlane("XOZ"))
+SketchCircle_3 = Sketch_3.addCircle(-4, 2, 5)
+Extrusion_3.setNestedSketch(Sketch_3)
+model.do()
+
+model.end()
+
+# check Part_2 is ok and contains 2 solids in result
+assert(Part_2.feature().results().size() == 1)
+aPartShape = Part_2.feature().firstResult().shape()
+assert(aPartShape.shapeTypeStr() == "COMPOUND")
+aShapeExplorer = GeomAPI_ShapeExplorer(aPartShape, GeomAPI_Shape.SOLID)
+assert(aShapeExplorer.more())
+aShapeExplorer.next()
+assert(aShapeExplorer.more())
+
+# check that selection of this part and the lower part is impossible (by validator)
+model.begin()
+aSel = ImportResult_1.feature().selectionList("objects").value(0)
+aSel.selectSubShape("SOLID", "Part_2/Extrusion_1_1")
+model.end()
+aFactory = ModelAPI_Session.get().validators()
+assert(not aFactory.validate(ImportResult_1.feature()))
+
+model.begin()
+aSel = ImportResult_1.feature().selectionList("objects").value(0)
+aSel.selectSubShape("SOLID", "Part_3/Extrusion_1_1")
+model.end()
+assert(not aFactory.validate(ImportResult_1.feature()))
+
+# back to correct value
+model.begin()
+aSel = ImportResult_1.feature().selectionList("objects").value(0)
+aSel.selectSubShape("SOLID", "Part_1/Extrusion_1_1")
+model.end()
+assert(aFactory.validate(ImportResult_1.feature()))
+
+# TODO: implement for GEOMOETRICAL also
+assert(model.checkPythonDump(model.ModelHighAPI.CHECK_NAMING))
index 6298dd1f885239c969bcc99f8085fb6dbb5f4fb4..4d4a52d77d842318766e55784c102f6d22fa4a4c 100644 (file)
@@ -21,6 +21,7 @@ Features plug-in provides a set of common topological operations. It implements
    filletFeature.rst
    fuseFeature.rst
    fuseFeatureFaces.rst
+   importResult.rst
    intersectionFeature.rst
    linearCopyFeature.rst
    measurementFeature.rst
diff --git a/src/FeaturesPlugin/doc/TUI_importResultFeature.rst b/src/FeaturesPlugin/doc/TUI_importResultFeature.rst
new file mode 100644 (file)
index 0000000..5d27dbe
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_import_result:
+
+Create Import Result
+============
+
+.. literalinclude:: examples/import_result.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/import_result.py>` 
+   
diff --git a/src/FeaturesPlugin/doc/examples/import_result.py b/src/FeaturesPlugin/doc/examples/import_result.py
new file mode 100644 (file)
index 0000000..b0293b4
--- /dev/null
@@ -0,0 +1,15 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(21, 16, 6)
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")], model.selection(), 10, 0)
+model.do()
+Part_2 = model.addPart(partSet)
+Part_2_doc = Part_2.document()
+ImportResult_1 = model.addImportResult(Part_2_doc, [model.selection("SOLID", "Part_1/Extrusion_1_1")])
+model.end()
diff --git a/src/FeaturesPlugin/doc/images/CreatedImportResult.png b/src/FeaturesPlugin/doc/images/CreatedImportResult.png
new file mode 100644 (file)
index 0000000..3c35440
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedImportResult.png differ
diff --git a/src/FeaturesPlugin/doc/images/ImportResult.png b/src/FeaturesPlugin/doc/images/ImportResult.png
new file mode 100644 (file)
index 0000000..3ade302
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/ImportResult.png differ
diff --git a/src/FeaturesPlugin/doc/images/import_result_btn.png b/src/FeaturesPlugin/doc/images/import_result_btn.png
new file mode 100644 (file)
index 0000000..2bdd0be
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/import_result_btn.png differ
diff --git a/src/FeaturesPlugin/doc/importResultFeature.rst b/src/FeaturesPlugin/doc/importResultFeature.rst
new file mode 100644 (file)
index 0000000..28741a3
--- /dev/null
@@ -0,0 +1,54 @@
+.. |import_result_btn.icon|    image:: images/import_result_btn.png
+
+Import Result
+=====
+
+The Import Result feature allows the user to import one or several results from another Part. If the result of the source-part is
+changed, the part and part result that contains the copy-results will be updated. The feature keeps the
+copy-shape, so, even the document was opened and the source-part was not activated (loaded), the part with copy-feature works well
+with this result-shape.
+
+It may be necessary for the user to load the other parts before using this feature otherwise the content of the **Results** folders will be empty.
+
+To create a Copy in the active part:
+
+#. select in the Main Menu *Features - > Import Result* item  or
+#. click |import_result_btn.icon| **Import Result** button in the toolbar
+
+
+The following property panel will be opened:
+
+.. image:: images/ImportResult.png
+  :align: center
+
+.. centered::
+   **Import result operation**
+
+Here it is necessary to select one or several objects. It is only possible to import results from Parts placed before the
+current Part where the import is done. Only results from the **Results** folder of previously created parts may be selected.
+
+
+**Apply** button creates a copy.
+  
+**Cancel** button cancels the operation.
+
+**TUI Command**:
+
+.. py:function:: model.addImportResult(Part_doc, results)
+
+    :param part: The current part object.
+    :param results: A list of results from another part.
+    :return: Result feature Import Result.
+
+Result
+""""""
+
+The Result of the operation will be copy of one or several results selected in another part located in the same place:
+
+.. image:: images/CreatedImportResult.png
+          :align: center
+
+.. centered::
+   **Import result created**
+
+**See Also** a sample TUI Script of :ref:`tui_create_import_result` operation.
diff --git a/src/FeaturesPlugin/icons/import_result.png b/src/FeaturesPlugin/icons/import_result.png
new file mode 100644 (file)
index 0000000..2bdd0be
Binary files /dev/null and b/src/FeaturesPlugin/icons/import_result.png differ
diff --git a/src/FeaturesPlugin/import_result_widget.xml b/src/FeaturesPlugin/import_result_widget.xml
new file mode 100644 (file)
index 0000000..94d1f5e
--- /dev/null
@@ -0,0 +1,11 @@
+<source>
+  <multi_selector id="objects"
+                  label="Sources:"
+                  tooltip="Select copied results"
+                  shape_types="objects"
+                  use_choice="false"
+                  concealment="false"
+                  allow_parts_content="true">
+    <validator id="FeaturesPlugin_ValidatorImportResults"/>
+  </multi_selector>
+</source>
index a61e26b672425c2b8ef74f5271ab313b1028869a..3477954d1e4987982a59579aaa3724cfee276cfa 100644 (file)
         helpfile="copyFeature.html">
         <source path="copy_widget.xml"/>
       </feature>
+      <feature id="ImportResult"
+        title="Import Result"
+        tooltip="Copies results from other parts"
+        icon="icons/Features/import_result.png"
+        helpfile="importResultFeature.html">
+        <source path="import_result_widget.xml"/>
+      </feature>
       <feature id="RemoveResults" title="Remove results" tooltip="Internal feature for results removal" internal="1">
         <multi_selector id="results" concealment="true"/>
       </feature>
index cfed1f1992a766cb871a625e2ffa467da73ddaed..496ec907949479afe454c09898d307042a47e32c 100644 (file)
@@ -23,7 +23,6 @@
 #include <GeomAlgoAPI_DFLoader.h>
 #include <GeomAlgoAPI_ShapeTools.h>
 
-#include <ShapeUpgrade_UnifySameDomain.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS_Shape.hxx>
 #include <Precision.hxx>
@@ -31,6 +30,7 @@
 #include <TopoDS_Edge.hxx>
 #include <Bnd_Box.hxx>
 #include <BRepBndLib.hxx>
+#include <ShapeUpgrade_UnifySameDomain.hxx>
 
 //==================================================================================================
 GeomAlgoAPI_UnifySameDomain::GeomAlgoAPI_UnifySameDomain(const ListOfShape& theShapes)
index 0b2d2869a3ed7f120f5f1449c405a21d598d94d9..be0964ef5ccaf3fb4f432620472a182303edbfea 100644 (file)
@@ -82,11 +82,13 @@ ObjectPtr Model_AttributeReference::value()
       Handle(TDataStd_AsciiString) anEntry;
       if (myRef->Label().FindAttribute(TDataStd_AsciiString::GetID(), anEntry)) {
         std::shared_ptr<Model_Document> aDR = std::dynamic_pointer_cast<Model_Document>(aRefDoc);
-        TDF_Label aRefLab;
-        TDF_Tool::Label(aDR->objects()->featuresLabel().Data(),
-          anEntry->Get().ToCString(), aRefLab);
-        if (!aRefLab.IsNull()) {
-          return aDR->objects()->object(aRefLab);
+        if (aDR.get() && aDR->objects()) {
+          TDF_Label aRefLab;
+          TDF_Tool::Label(aDR->objects()->featuresLabel().Data(),
+            anEntry->Get().ToCString(), aRefLab);
+          if (!aRefLab.IsNull()) {
+            return aDR->objects()->object(aRefLab);
+          }
         }
       }
     }
index 48a42bd8908aa24dde7046b28741e70826de0739..10dfe84b296c08413ce33958f1bf576bd0711ab9 100644 (file)
@@ -875,7 +875,8 @@ void Model_AttributeSelection::selectSubShape(
       if (aPartName == aRootDoc->kind()) {
         aDoc = std::dynamic_pointer_cast<Model_Document>(aRootDoc);
         aSubShapeName = aSubShapeName.substr(aPartEnd + 1);
-      } else {
+      }
+      else {
         ObjectPtr aFound =
           owner()->document()->objectByName(ModelAPI_ResultPart::group(), aPartName);
         if (aFound.get()) { // found such part, so asking it for the name
@@ -894,11 +895,28 @@ void Model_AttributeSelection::selectSubShape(
                 continue;
               std::shared_ptr<GeomAPI_Edge> aSelectedEdge(new GeomAPI_Edge(aSelected));
               setValueCenter(aPart, aSelectedEdge, aCenterType);
-            } else
+            }
+            else
               setValue(aPart, aSelected);
             TDataStd_Integer::Set(selectionLabel(), anIndex);
             return;
           }
+        } else { // for the ImportResult feature Objects widget this may be a result in other part
+       // result may be hidden (like, tranlsatiomn of part) in PartSet, so iterate Part-features
+          int aNum = aRootDoc->size(ModelAPI_Feature::group());
+          for (int a = 0; a < aNum; a++) {
+            FeaturePtr aFeat = std::dynamic_pointer_cast<ModelAPI_Feature>(
+              aRootDoc->object(ModelAPI_Feature::group(), a));
+            if (aFeat.get() && aFeat->data() && aFeat->data()->isValid() &&
+              aFeat->getKind() == "Part" && aFeat->results().size()) {
+              ResultPartPtr aPart =
+                std::dynamic_pointer_cast<ModelAPI_ResultPart>(aFeat->firstResult());
+              if (aPart.get() && aPart->partDoc().get() && aPart->data()->name() == aPartName) {
+                aDoc = std::dynamic_pointer_cast<Model_Document>(aPart->partDoc());
+                aSubShapeName = aSubShapeName.substr(aPartEnd + 1);
+              }
+            }
+          }
         }
       }
     }
index be65e0f403d277b5533790ffec305f4f7cf55a11..2c5c5c38187c29e3b3d63b96730e679d3294dd82 100644 (file)
@@ -183,7 +183,9 @@ void Model_BodyBuilder::store(const GeomShapePtr& theShape,
       return;  // null shape inside
 
     if(!theIsStoreSameShapes) {
-      Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(aShape, aShapeLab);
+      Handle(TNaming_NamedShape) aNS;
+      if (TNaming_Tool::HasLabel(aShapeLab, aShape))
+        aNS = TNaming_Tool::NamedShape(aShape, aShapeLab);
       // the last condition is for the issue 2751 : existing shape may be found in compound-NS
       if(!aNS.IsNull() && !aNS->IsEmpty() && aNS->Get().IsSame(aShape)) {
         // This shape is already in document, store reference instead of shape;
@@ -386,7 +388,9 @@ void Model_BodyBuilder::storeModified(const std::list<GeomShapePtr>& theOldShape
     if (aData.get()) {
       TDF_Label aShapeLab = aData->shapeLab();
       TopoDS_Shape aShapeNew = theNewShape->impl<TopoDS_Shape>();
-      Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(aShapeNew, aShapeLab);
+      Handle(TNaming_NamedShape) aNS;
+      if (TNaming_Tool::HasLabel(aShapeLab, aShapeNew))
+        aNS = TNaming_Tool::NamedShape(aShapeNew, aShapeLab);
       // the last condition is for the issue 2751 : existing shape may be found in compound-NS
       if (!aNS.IsNull() && !aNS->IsEmpty() && aNS->Get().IsSame(aShapeNew)) {
         // This shape is already in document, store reference instead of shape;
index 7565c59132f87a31e6b619f65b3215a768f58e4e..509377003ce149c98d535a0ca4ae84d77741f61e 100644 (file)
@@ -148,7 +148,7 @@ static void dumpArray(std::ostringstream& theOutput, const double theArray[],
   for (int i = 0; i < theSize; ++i) {
     if (i > 0)
       theOutput << " ";
-    theOutput << std::fixed << setprecision(thePrecision)
+    theOutput << std::fixed << std::setprecision(thePrecision)
               << (fabs(theArray[i]) < TOLERANCE ? 0.0 : theArray[i]);
   }
 }
@@ -409,9 +409,9 @@ std::string ModelHighAPI_FeatureStore::dumpShape(std::shared_ptr<GeomAPI_Shape>&
     aResult<<"Volume: ";
     // volumes of too huge shapes write in the scientific format
     if (aVolume >= 1.e5)
-      aResult<<std::scientific<<setprecision(7);
+      aResult<<std::scientific<<std::setprecision(7);
     else
-      aResult<<std::fixed<<setprecision(3);
+      aResult<<std::fixed<<std::setprecision(3);
     aResult<<aVolume<<std::endl;
   }
   std::shared_ptr<GeomAPI_Pnt> aCenter = GeomAlgoAPI_ShapeTools::centreOfMass(theShape);
index de9582a5f86b32eb7c960bfb775d0ba447c2aa7c..3254241d2fa6028b063d48d68a34597d48ceaf34 100644 (file)
@@ -65,6 +65,7 @@ ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent,
   myFeatureId = theData->featureId();
 
   myIsInternal = theData->getBooleanAttribute(ATTR_INTERNAL, false);
+  myUseExternalParts = theData->getBooleanAttribute("allow_parts_content", false);
 
   myIsModifiedInEdit = theData->getProperty(ATTR_MODIFIED_IN_EDIT);
 
index f2187ee771d36e8815cd013247b3f9c90d067794..f4d864d51192a7940bc344a825d361473fa562a1 100644 (file)
@@ -317,6 +317,9 @@ Q_OBJECT
 
   virtual bool isReadOnly() const { return !isEnabled(); }
 
+  /// Returns true if the widget should have access to external parts
+  bool canUseExternalParts() const { return myUseExternalParts; }
+
 signals:
   /// The signal about widget values are to be changed
   void beforeValuesChanged();
@@ -461,6 +464,9 @@ private:
   bool myFlushUpdateBlocked;
 
   bool myUpdateVisualAttributes;
+
+  /// A flag which indicates that current widget should have access to external parts
+  bool myUseExternalParts;
 };
 
 #endif
index 68e275d213504e78b2adf87a9fdbfe3bdc53328f..4d5f2a1c50d0f84b5912425809543a06540c30e5 100644 (file)
@@ -176,18 +176,26 @@ void ModuleBase_Preferences::createCustomPage(ModuleBase_IPrefMgr* thePref, int
       // Add item
       if (aProp->type() != Config_Prop::Disabled) {
         SUIT_PreferenceMgr::PrefItemType aPrefType = SUIT_PreferenceMgr::Auto;
-        if (aProp->type() == Config_Prop::Directory) {
+        switch (aProp->type()) {
+        case Config_Prop::Directory:
           aPrefType = SUIT_PreferenceMgr::File;
-        } else {
+          break;
+        case Config_Prop::Cursor:
+          aPrefType = SUIT_PreferenceMgr::Selector;
+          break;
+        default:
           aPrefType = (SUIT_PreferenceMgr::PrefItemType) aProp->type();
         }
+
         int anId = thePref->addPreference(QObject::tr(aProp->title().c_str()), aTab, aPrefType,
                                           QString::fromStdString(aProp->section()),
                                           QString::fromStdString(aProp->name()));
-        if(aProp->type() == Config_Prop::Directory) {
+
+        switch (aProp->type()) {
+        case Config_Prop::Directory:
           thePref->setItemProperty("path_type", Qtx::PT_Directory, anId);
-        }
-        if (aPrefType == SUIT_PreferenceMgr::DblSpin) {
+          break;
+        case SUIT_PreferenceMgr::DblSpin:
           if (aProp->min() != "") {
             double aMin = QString(aProp->min().c_str()).toDouble();
             thePref->setItemProperty("min", aMin, anId);
@@ -196,8 +204,8 @@ void ModuleBase_Preferences::createCustomPage(ModuleBase_IPrefMgr* thePref, int
             double aMax = QString(aProp->max().c_str()).toDouble();
             thePref->setItemProperty("max", aMax, anId);
           }
-        }
-        if (aPrefType == SUIT_PreferenceMgr::IntSpin) {
+          break;
+        case SUIT_PreferenceMgr::IntSpin:
           if (aProp->min() != "") {
             int aMin = QString(aProp->min().c_str()).toInt();
             thePref->setItemProperty("min", aMin, anId);
@@ -206,6 +214,20 @@ void ModuleBase_Preferences::createCustomPage(ModuleBase_IPrefMgr* thePref, int
             int aMax = QString(aProp->max().c_str()).toInt();
             thePref->setItemProperty("max", aMax, anId);
           }
+          break;
+        case Config_Prop::Cursor:
+          {
+            QList<QVariant> aIndicesList;
+            QList<QVariant> aIconsList;
+            aIndicesList << 0 << 1 << 2;
+            aIconsList << QPixmap(":pictures/ArrowCursor.png") <<
+              QPixmap(":pictures/CrossCursor.png") <<
+              QPixmap(":pictures/HandCursor.png");
+
+            thePref->setItemProperty("indexes", aIndicesList, anId);
+            thePref->setItemProperty("icons", aIconsList, anId);
+          }
+          break;
         }
       }
     }
index 9bf101d3ffffb9612aa9310509d56485afcf38c0..9e2fca11082fe81252cc060dc906511f0d780be7 100644 (file)
@@ -18,6 +18,7 @@
 //
 
 #include "ModuleBase_ResultPrs.h"
+#include "ModuleBase_IViewer.h"
 
 #include <GeomAPI_PlanarEdges.h>
 
@@ -81,11 +82,26 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult)
     new Prs3d_LineAspect(Quantity_NOC_GREEN, Aspect_TOL_SOLID, 1);
   aDrawer->SetFreeBoundaryAspect(aFreeBndAspect);
 
+  aDrawer->VIsoAspect()->SetNumber(0);
+  aDrawer->UIsoAspect()->SetNumber(0);
+
   if (aDrawer->HasOwnPointAspect())
     aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS);
   else
     aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.));
 
+  aDrawer = DynamicHilightAttributes();
+  if (aDrawer.IsNull()) {
+    if (!ModuleBase_IViewer::DefaultHighlightDrawer.IsNull()) {
+      aDrawer = new Prs3d_Drawer(*ModuleBase_IViewer::DefaultHighlightDrawer);
+      aDrawer->VIsoAspect()->SetNumber(0);
+      aDrawer->UIsoAspect()->SetNumber(0);
+      SetDynamicHilightAttributes(aDrawer);
+    }
+  } else {
+    aDrawer->VIsoAspect()->SetNumber(0);
+    aDrawer->UIsoAspect()->SetNumber(0);
+  }
   myHiddenSubShapesDrawer = new AIS_ColoredDrawer(myDrawer);
   Handle(Prs3d_ShadingAspect) aShadingAspect = new Prs3d_ShadingAspect();
   aShadingAspect->SetMaterial(Graphic3d_NOM_BRASS); //default value of context material
index 70b885f451047bdd8fe1d487169c19824e0a2443..c28b2eaa9b2ce1713e89c6ece76ac17e0b7773cc 100644 (file)
@@ -20,6 +20,9 @@
 #include "ModuleBase_ViewerFilters.h"
 #include "ModuleBase_IWorkshop.h"
 #include "ModuleBase_IModule.h"
+#include "ModuleBase_Operation.h"
+#include "ModuleBase_IPropertyPanel.h"
+#include "ModuleBase_ModelWidget.h"
 
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Document.h>
@@ -76,7 +79,12 @@ Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk(
     if (aObj) {
       DocumentPtr aDoc = aObj->document();
       SessionPtr aMgr = ModelAPI_Session::get();
-      aValid = (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument());
+
+      ModuleBase_ModelWidget* aWidget = anOperation->propertyPanel()->activeWidget();
+      if (aWidget && aWidget->canUseExternalParts())
+        aValid = Standard_True;
+      else
+        aValid = (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument());
     }
     else {
       // This object is not controlled by the filter
index 0ea7aa78d4efeafc27614cefd638c72bb8f6cb80..63e88207e7b4ea6f170fb8fc4972a07468ef67bd 100644 (file)
@@ -37,6 +37,7 @@
 #include <ModuleBase_Operation.h>
 #include <ModuleBase_OperationFeature.h>
 #include <ModuleBase_ViewerPrs.h>
+#include <ModuleBase_IViewer.h>
 #include <ModuleBase_Tools.h>
 
 #include <XGUI_ModuleConnector.h>
@@ -522,6 +523,7 @@ void PartSet_MenuMgr::activatePartSet() const
     aMgr->finishOperation();
 
   myModule->workshop()->updateCommandStatus();
+  myModule->workshop()->viewer()->update();
 }
 
 void PartSet_MenuMgr::grantedOperationIds(ModuleBase_Operation* theOperation,
index 24070e7a7e180221c133e238fcfe7e16b1ce0e2f..75fa7c49c2a7f1900c932942fa1505bb8566ef49 100644 (file)
@@ -461,9 +461,9 @@ void PartSet_Module::updateSketcherOnStart(ModuleBase_Operation* theOperation)
   }
   // It is switched off because of
   // Task #3067: 5.2.2 Drawing in the sketcher: change the mouse cursor arrow
-  //else if (sketchMgr()->isNestedSketchOperation(theOperation)) {
-  //  mySketchMgr->startNestedSketch(theOperation);
-  //}
+  else if (sketchMgr()->isNestedSketchOperation(theOperation)) {
+    mySketchMgr->startNestedSketch(theOperation);
+  }
 }
 
 //******************************************************
index 78237ef7f3bbc8e885da514f5ba9a9f9223e3ec8..c57929240857943f38c965c34d622b7ffe75466f 100644 (file)
@@ -227,15 +227,15 @@ void PartSet_SketcherMgr::onEnterViewPort()
 
   // It is switched off because of
   // Task #3067: 5.2.2 Drawing in the sketcher: change the mouse cursor arrow
-  //  if (canChangeCursor(getCurrentOperation())) {
-  //    QCursor* aCurrentCursor = QApplication::overrideCursor();
-  //    if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) {
-  //      QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));
+    if (canChangeCursor(getCurrentOperation())) {
+      QCursor* aCurrentCursor = QApplication::overrideCursor();
+      if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) {
+        QApplication::setOverrideCursor(PartSet_Tools::getOperationCursor());
   //#ifdef DEBUG_CURSOR
   //      qDebug("onEnterViewPort() : Qt::CrossCursor");
   //#endif
-  //    }
-  //  }
+      }
+    }
 
   if (!isNestedCreateOperation(getCurrentOperation(), activeSketch()))
     return;
@@ -267,12 +267,12 @@ void PartSet_SketcherMgr::onLeaveViewPort()
   return;
   #endif
 
-//  if (canChangeCursor(getCurrentOperation())) {
-//    QApplication::restoreOverrideCursor();
+  if (canChangeCursor(getCurrentOperation())) {
+    QApplication::restoreOverrideCursor();
 //#ifdef DEBUG_CURSOR
 //    qDebug("onLeaveViewPort() : None");
 //#endif
-//  }
+  }
 
   if (!isNestedCreateOperation(getCurrentOperation(), activeSketch()))
     return;
@@ -457,9 +457,10 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
           }
         }
       }
-      else
-        isRelaunchEditing = !myCurrentSelection.contains(aSPFeature);
-
+      else {
+        if (myCurrentSelection.size() > 1)
+          isRelaunchEditing = !myCurrentSelection.contains(aSPFeature);
+      }
       if (isRelaunchEditing)
         aFOperation->commit();
 
@@ -1217,30 +1218,30 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation)
   workshop()->viewer()->set2dMode(false);
 }
 
-//void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation)
-//{
-//  if (canChangeCursor(theOperation) && myIsMouseOverWindow) {
-//    QCursor* aCurrentCursor = QApplication::overrideCursor();
-//    if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) {
-//      QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));
+void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation)
+{
+  if (canChangeCursor(theOperation) && myIsMouseOverWindow) {
+    QCursor* aCurrentCursor = QApplication::overrideCursor();
+    if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) {
+      QApplication::setOverrideCursor(PartSet_Tools::getOperationCursor());
 //#ifdef DEBUG_CURSOR
 //      qDebug("startNestedSketch() : Qt::CrossCursor");
 //#endif
-//    }
-//  }
-//}
+    }
+  }
+}
 
 void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOperation)
 {
   myIsMouseOverViewProcessed = true;
   operationMgr()->onValidateOperation();
   // when sketch nested operation is stopped the cursor should be restored unconditionally
-  //if (canChangeCursor(theOperation)) {
-    //QApplication::restoreOverrideCursor();
+  if (canChangeCursor(theOperation)) {
+    QApplication::restoreOverrideCursor();
 #ifdef DEBUG_CURSOR
     qDebug("stopNestedSketch() : None");
 #endif
-  //}
+  }
   /// improvement to deselect automatically all eventual selected objects, when
   // returning to the neutral point of the Sketcher
   bool isClearSelectionPossible = true;
@@ -2271,8 +2272,9 @@ void PartSet_SketcherMgr::customizeSketchPresentation(const ObjectPtr& theObject
   if (aShapeType != 6/*an edge*/ && aShapeType != 7/*a vertex*/ && aShapeType != 0/*compound*/)
     return;
 
+  int aWidth = Config_PropManager::integer("Visualization", "sketch_line_width");
   if (isExternal(aFeature)) {
-    thePrs->setWidth(1);
+    thePrs->setWidth(isIncludeToResult(aFeature)? aWidth : 1);
     return;
   }
   std::string aKind = aFeature->getKind();
@@ -2286,7 +2288,6 @@ void PartSet_SketcherMgr::customizeSketchPresentation(const ObjectPtr& theObject
       thePrs->setLineStyle(SketchPlugin_SketchEntity::SKETCH_LINE_STYLE_AUXILIARY());
     }
     else {
-      int aWidth = Config_PropManager::integer("Visualization", "sketch_line_width");
       thePrs->setWidth(aWidth);
       thePrs->setLineStyle(SketchPlugin_SketchEntity::SKETCH_LINE_STYLE());
     }
index defc3465b54fc4de24a16549679d8635f7d88b42..97fb2c720cf77533f3e58e33f6975d1e4f957e38 100644 (file)
@@ -220,7 +220,7 @@ public:
 
   /// Starts sketch operation, connects to the opeation property panel
   /// \param theOperation a committed operation
-  //void startNestedSketch(ModuleBase_Operation* theOperation);
+  void startNestedSketch(ModuleBase_Operation* theOperation);
 
   /// Stop sketch operation, disconnects from the opeation property panel
   /// \param theOperation a stopped operation
index 50f9efa2ed9c28950849098bb5d1127e0e585085..09f2e143726776d661a379a62fd906eacffb590c 100644 (file)
@@ -905,3 +905,17 @@ double PartSet_Tools::getDefaultTransparency()
 {
   return Config_PropManager::integer("Visualization", "shaper_default_transparency") / 100.;
 }
+
+QCursor PartSet_Tools::getOperationCursor()
+{
+  int aId = Config_PropManager::integer(SKETCH_TAB_NAME, "operation_cursor");
+  switch (aId) {
+  case 0:
+    return QCursor(Qt::ArrowCursor);
+  case 1:
+    return QCursor(Qt::CrossCursor);
+  case 2:
+    return QCursor(Qt::PointingHandCursor);
+  }
+  return QCursor();
+}
index 4e82cb45182a29a30bf370ffabda33d684047c9c..574ecc5b4221c00a379af6b1f7e5f9b3961cf04d 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <QPoint>
 #include <QList>
+#include <QCursor>
 
 #include <ModelAPI_CompositeFeature.h>
 #include <ModelAPI_Object.h>
@@ -329,6 +330,11 @@ public:
   * Returns default transparency value
   */
   static double getDefaultTransparency();
+
+  /**
+  * Returns cursor according to (SKETCH_TAB_NAME, "operation_cursor") property value
+  */
+  static QCursor getOperationCursor();
 };
 
 #endif
index 0185172b98c85ec4669e203a6f8c3bf5cf101c7d..577689a6cca2ca6e5fe8ea304b8f510f773d30f4 100644 (file)
@@ -451,6 +451,15 @@ void PartSet_WidgetSketchLabel::restoreAttributeValue(const AttributePtr& theAtt
     GeomShapePtr anEmptyShape;
     aSelAttr->setValue(anEmptyResult, anEmptyShape);
   }
+  std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast<GeomDataAPI_Point>(
+    aData->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
+  anOrigin->reset();
+  std::shared_ptr<GeomDataAPI_Dir> aNormal = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
+    aData->attribute(SketchPlugin_Sketch::NORM_ID()));
+  aNormal->reset();
+  std::shared_ptr<GeomDataAPI_Dir> aDirX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
+    aData->attribute(SketchPlugin_Sketch::DIRX_ID()));
+  aDirX->reset();
 }
 
 bool PartSet_WidgetSketchLabel::setSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs)
index b5afae0d06a957c5ac9253c7661b55dae2132c0f..74d9637b97ed5d218b36bdb914ec258cb49f3a04 100644 (file)
@@ -31,4 +31,4 @@ from FeaturesAPI import addFillet, addChamfer
 from FeaturesAPI import addFusionFaces
 from FeaturesAPI import measureLength, measureDistance, measureRadius, measureAngle
 from FeaturesAPI import addRemoveResults
-from FeaturesAPI import addCopy
+from FeaturesAPI import addCopy, addImportResult
index 8577d8da136970b014b0e89103155d4cb52cc702..e9e7c0c0fddcea68b262c31c391c3977330e9f70 100644 (file)
@@ -74,7 +74,9 @@
 #include <QMenu>
 #include <QToolBar>
 
-#define SALOME_PATCH_FOR_CTRL_WHEEL
+#if OCC_VERSION_HEX < 0x070400
+  #define SALOME_PATCH_FOR_CTRL_WHEEL
+#endif
 
 extern "C" {
 SHAPERGUI_EXPORT CAM_Module* createModule()
@@ -415,6 +417,14 @@ bool SHAPERGUI::deactivateModule(SUIT_Study* theStudy)
     //}
     myWorkshop->displayer()->setSelectionColor(myOldSelectionColor);
     myProxyViewer->setSelector(0);
+
+    LightApp_SelectionMgr* aMgr = getApp()->selectionMgr();
+    QList<SUIT_Selector*> aList;
+    aMgr->selectors(aList);
+    foreach(SUIT_Selector* aSel, aList) {
+      aSel->setEnabled(aSel != mySelector);
+    }
+
     delete mySelector;
     mySelector = 0;
   }
index 1f0d054f491c861650d04b4d833b68c8a6739529..12776d98c79d7330680358749e708f6daa7be148 100644 (file)
@@ -33,7 +33,9 @@
 #include <QMouseEvent>
 #include <QContextMenuEvent>
 
-#define SALOME_PATCH_FOR_CTRL_WHEEL
+#if OCC_VERSION_HEX < 0x070400
+  #define SALOME_PATCH_FOR_CTRL_WHEEL
+#endif
 
 SHAPERGUI_SalomeView::SHAPERGUI_SalomeView(OCCViewer_Viewer* theViewer)
 : ModuleBase_IViewWindow(), myCurrentView(0)
@@ -405,7 +407,7 @@ void SHAPERGUI_SalomeViewer::setViewProjection(double theX, double theY,
       aView3d->SetProj(theX, theY, theZ);
       aView3d->SetTwist( theTwist );
       aView3d->FitAll(0.01, false);
-      aView3d->SetZSize(0.);
+      //aView3d->SetZSize(0.);
       if (aView3d->Depth() < 0.1)
         aView3d->DepthFitAll();
     }
index c54a4092c4332fb368cf731ba1e9aa0b5b7dcd73..2c6c284e770bc86fb34bbe7ac68c5906aa30dc6b 100644 (file)
       <translation>Type d&apos;angle</translation>
     </message>
     <message>
-      <source>Complementary</source>
-      <translation>Complémentaire</translation>
+      <source>Supplementary</source>
+      <translation>Supplémentaire</translation>
     </message>
     <message>
       <source>Direct</source>
index 0acbf60d136742ede354b17bd4212e0b26e0bf1c..d12e746ea1616956c50296e468de8480baaec6c0 100644 (file)
           buttons_dir="horizontal"
           label="Angle type"
           tooltip="Type of angle"
-          string_list="Direct Complementary Additional"
+          string_list="Direct Supplementary Additional"
           icons_list="icons/Sketch/angle_direct.png icons/Sketch/angle_complementary.png icons/Sketch/angle_backward.png"
           default="0"
           />
index 753cff52ddb87012102ed44529acf4b593bfc0fe..d1d5e08a5d666124da16c0f8fe6ac08f58a0c03c 100644 (file)
 //
 
 #include "SketcherPrs_SensitivePoint.h"
+#include "SketcherPrs_SymbolPrs.h"
 
 #include <Graphic3d_ArrayOfPoints.hxx>
-#include "SketcherPrs_SymbolPrs.h"
+#include <Standard_Version.hxx>
 
 #define DEBUG_SENSITIVE_TO_BE_CORRECTED
 
@@ -36,18 +37,25 @@ SketcherPrs_SensitivePoint::SketcherPrs_SensitivePoint(
 Standard_Boolean SketcherPrs_SensitivePoint::Matches(SelectBasics_SelectingVolumeManager& theMgr,
                                                    SelectBasics_PickResult& thePickResult)
 {
-  Standard_Real aDepth      = RealLast();
-  Standard_Real aDistToCOG  = RealLast();
-  gp_Pnt aPnt = Point();
-  if (!theMgr.Overlaps (aPnt, aDepth))
-  {
-    thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
-    return Standard_False;
-  }
+#if OCC_VERSION_HEX < 0x070400
+       Standard_Real aDepth = RealLast();
+       Standard_Real aDistToCOG = RealLast();
+       gp_Pnt aPnt = Point();
+       if (!theMgr.Overlaps(aPnt, aDepth))
+       {
+               thePickResult = SelectBasics_PickResult(aDepth, aDistToCOG);
+               return Standard_False;
+       }
 
-  aDistToCOG = aDepth;
-  thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
-  return Standard_True;
+       aDistToCOG = aDepth;
+       thePickResult = SelectBasics_PickResult(aDepth, aDistToCOG);
+       return Standard_True;
+#else
+  gp_Pnt aPnt = Point();
+  if (theMgr.Overlaps (aPnt, thePickResult))
+         return Standard_True;
+  return Standard_False;
+#endif
 }
 
 gp_Pnt SketcherPrs_SensitivePoint::Point() const
index e4e0a8bcd1979b1a909902bb30cfc9dba67ea0a9..f7edd6d982cfd9475eb7786a6855f4dc29a63c36 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef SketcherPrs_SensitivePoint_H
 #define SketcherPrs_SensitivePoint_H
 
+#include <SelectBasics_EntityOwner.hxx>
 #include <Select3D_SensitiveEntity.hxx>
 #include <Standard_DefineHandle.hxx>
 
index e10434cf9e3f024f5ee28610480786d44dc8e377..f52a48c5dff67ffdeebcad64edd8d918ddd73637 100644 (file)
@@ -195,7 +195,7 @@ Handle(Image_AlienPixMap) SketcherPrs_SymbolPrs::icon()
   }
   // The icon for constraint is not found
   static const char aMsg[] = "Error! constraint images are not found";
-  cout<<aMsg<<endl;
+  std::cout<<aMsg<<std::endl;
   Events_InfoMessage("SketcherPrs_SymbolPrs", aMsg).send();
   myIconsMap[iconName()] = Handle(Image_AlienPixMap)();
   return Handle(Image_AlienPixMap)();
index a84c76a0868c9d8729ffc11d2acb07552c053c09..d93f159c7a7cd6385ab663c1197eab6beea39253 100644 (file)
@@ -105,7 +105,11 @@ const int MOUSE_SENSITIVITY_IN_PIXEL = 10;
 void displayedObjects(const Handle(AIS_InteractiveContext)& theAIS, AIS_ListOfInteractive& theList)
 {
   // Get from null point
-  theAIS->DisplayedObjects(theList, true);
+#if OCC_VERSION_HEX < 0x070400
+       theAIS->DisplayedObjects(theList, true);
+#else
+       theAIS->DisplayedObjects(theList);
+#endif
 }
 
 QString qIntListInfo(const QIntList& theValues, const QString& theSeparator = QString(", "))
@@ -621,15 +625,16 @@ Handle(AIS_InteractiveContext) XGUI_Displayer::AISContext() const
     myContextId = aContext.get();
     if (!myWorkshop->selectionActivate()->isTrihedronActive())
       selectionActivate()->deactivateTrihedron(true);
-    aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0);
-    aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0);
+    // Do not modify default drawer. The same is done in ModuleBase_ResultPrs
+    //aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0);
+    //aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0);
 
     //Handle(AIS_Trihedron) aTrihedron = myWorkshop->viewer()->trihedron();
     //aTrihedron->getHighlightPointAspect()->SetScale(2.0);
     //aTrihedron->getHighlightPointAspect()->SetTypeOfMarker(Aspect_TOM_O_STAR);
 
     // Commented out according to discussion in bug #2825
-    //ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle();
+    ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle();
     //Handle(Prs3d_Drawer) aSelStyle = aContext->SelectionStyle();
     //double aDeflection =
     //  QString(ModelAPI_ResultConstruction::DEFAULT_DEFLECTION().c_str()).toDouble();
index fbff53c41f2180237f277379746c294925d51237..82154a769367c2167bca85c0aa9ede133f73834a 100644 (file)
@@ -122,7 +122,7 @@ void XGUI_ViewerProxy::setViewProjection(double theX, double theY, double theZ,
     aView3d->SetProj(theX, theY, theZ);
     aView3d->SetTwist( theTwist );
     aView3d->FitAll(0.01, false);
-    aView3d->SetZSize(0.);
+    //aView3d->SetZSize(0.);
     if (aView3d->Depth() < 0.1)
       aView3d->DepthFitAll();
   }
index 9b958d9e758cde5347d49338cc273f11ccf7af60..2178d9dda21d4ebf86037792b770e8fcd2f5c9c2 100644 (file)
@@ -92,5 +92,8 @@
      <file>pictures/normal-view.png</file>
      <file>pictures/move_to_end.png</file>
      <file>pictures/move_to_end_split.png</file>
+     <file>pictures/ArrowCursor.png</file>
+     <file>pictures/CrossCursor.png</file>
+     <file>pictures/HandCursor.png</file>
  </qresource>
  </RCC>
diff --git a/src/XGUI/pictures/ArrowCursor.png b/src/XGUI/pictures/ArrowCursor.png
new file mode 100644 (file)
index 0000000..de53b10
Binary files /dev/null and b/src/XGUI/pictures/ArrowCursor.png differ
diff --git a/src/XGUI/pictures/CrossCursor.png b/src/XGUI/pictures/CrossCursor.png
new file mode 100644 (file)
index 0000000..230d586
Binary files /dev/null and b/src/XGUI/pictures/CrossCursor.png differ
diff --git a/src/XGUI/pictures/HandCursor.png b/src/XGUI/pictures/HandCursor.png
new file mode 100644 (file)
index 0000000..0d66435
Binary files /dev/null and b/src/XGUI/pictures/HandCursor.png differ