ADD_SUBDIRECTORY (src/ConstructionPlugin)
ADD_SUBDIRECTORY (src/BuildPlugin)
ADD_SUBDIRECTORY (src/PrimitivesPlugin)
+ADD_SUBDIRECTORY (src/OperaPlugin)
ADD_SUBDIRECTORY (src/GDMLPlugin)
ADD_SUBDIRECTORY (src/FeaturesPlugin)
ADD_SUBDIRECTORY (src/CollectionPlugin)
<plugin library="ConstructionPlugin" configuration="plugin-Construction.xml"/>
<plugin library="BuildPlugin" configuration="plugin-Build.xml"/>
<plugin library="PrimitivesPlugin" configuration="plugin-Primitives.xml"/>
+ <plugin library="OperaPlugin" configuration="plugin-Opera.xml"/>
<!--<plugin library="GDMLPlugin" configuration="plugin-GDML.xml"/>-->
<plugin library="FeaturesPlugin" configuration="plugin-Features.xml"/>
<plugin library="CollectionPlugin" configuration="plugin-Collection.xml"/>
--- /dev/null
+# Copyright (C) 2014-2021 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(Common)
+
+SET(PROJECT_HEADERS
+ OperaAPI.h
+ OperaAPI_addVolume.h
+)
+
+SET(PROJECT_SOURCES
+ OperaAPI_addVolume.cpp
+)
+
+SET(PROJECT_LIBRARIES
+ ModelAPI
+ ModelHighAPI
+)
+
+INCLUDE_DIRECTORIES(
+ ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
+)
+
+# Plugin headers dependency
+INCLUDE_DIRECTORIES(
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/PrimitivesPlugin
+)
+
+ADD_DEFINITIONS(-DOperaAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+ADD_LIBRARY(OperaAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+TARGET_LINK_LIBRARIES(OperaAPI ${PROJECT_LIBRARIES})
+
+# SWIG wrapper
+
+INCLUDE(PythonAPI)
+
+SET_SOURCE_FILES_PROPERTIES(OperaAPI.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(OperaAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
+SET(SWIG_LINK_LIBRARIES
+ OperaAPI
+ ModelHighAPI
+ ModelAPI
+ ${PYTHON_LIBRARIES}
+)
+SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+
+SET(SWIG_MODULE_OperaAPI_EXTRA_DEPS ${SWIG_MODULE_OperaAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
+ doxyhelp.i
+ ${PROJECT_HEADERS}
+)
+
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ SWIG_ADD_LIBRARY(OperaAPI LANGUAGE python SOURCES OperaAPI.i ${PROJECT_HEADERS})
+ELSE()
+ SWIG_ADD_MODULE(OperaAPI python OperaAPI.i ${PROJECT_HEADERS})
+ENDIF()
+SWIG_LINK_LIBRARIES(OperaAPI ${SWIG_LINK_LIBRARIES})
+
+IF(WIN32)
+ SET_TARGET_PROPERTIES(_OperaAPI PROPERTIES DEBUG_OUTPUT_NAME _OperaAPI_d)
+ENDIF(WIN32)
+
+INSTALL(TARGETS _OperaAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+INSTALL(TARGETS OperaAPI DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/OperaAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
--- /dev/null
+// Copyright (C) 2014-2021 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 OPERAAPI_H
+#define OPERAAPI_H
+
+#if defined OPERAAPI_EXPORTS
+#if defined WIN32
+#define OPERAAPI_EXPORT __declspec( dllexport )
+#else
+#define OPERAAPI_EXPORT
+#endif
+#else
+#if defined WIN32
+#define OPERAAPI_EXPORT __declspec( dllimport )
+#else
+#define OPERAAPI_EXPORT
+#endif
+#endif
+
+#endif //PRIMITIVESAPI_H
--- /dev/null
+// Copyright (C) 2014-2021 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 "OperaAPI_addVolume.h"
+
+#include <ModelHighAPI_Dumper.h>
+#include <ModelHighAPI_Tools.h>
+
+//==================================================================================================
+OperaAPI_addVolume::OperaAPI_addVolume(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+: ModelHighAPI_Interface(theFeature)
+{
+ initialize();
+}
+
+//==================================================================================================
+OperaAPI_addVolume::OperaAPI_addVolume(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Double& theMedium,
+ const std::list<ModelHighAPI_Selection>& theObjectList)
+: ModelHighAPI_Interface(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(OperaPlugin_Volume::MEDIUM(), medium());
+ setObjectList(theObjectList);
+ }
+}
+
+//==================================================================================================
+OperaAPI_addVolume::~OperaAPI_addVolume() {}
+
+//==================================================================================================
+void OperaAPI_addVolume::setMedium(const ModelHighAPI_Double& theMedium)
+{
+ fillAttribute(OperaPlugin_Volume::MEDIUM(), medium());
+
+ execute();
+}
+
+//==================================================================================================
+void OperaAPI_addVolume::setObjectList(const std::list<ModelHighAPI_Selection>& theObjectList)
+{
+ fillAttribute(theObjectList, myvolumeList);
+
+ execute();
+}
+
+//==================================================================================================
+void OperaAPI_addVolume::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+
+ AttributeStringPtr anAttrMedium = aBase->string(OperaPlugin_Volume::MEDIUM());
+ theDumper << aBase << " = model.addVolume(" << aDocName << ", " << anAttrMedium << ", ";
+
+ AttributeSelectionListPtr anAttrList = aBase->selectionList(OperaPlugin_Volume::VOLUME_LIST_ID());
+ if (anAttrList->isWholeResultAllowed() && !anAttrList->selectionType().empty())
+ theDumper<<"\""<<anAttrList->selectionType()<<"\", ";
+ theDumper << anAttrList;
+ if (anAttrList->isGeometricalSelection())
+ theDumper <<", True";
+ theDumper << ")" << std::endl;
+}
+
+//==================================================================================================
+VolumePtr addVolume(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Double& theMedium,
+ const std::list<ModelHighAPI_Selection>& theObjectList)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(OperaAPI_addVolume::ID());
+ aFeature->selectionList(OperaPlugin_Volume::VOLUME_LIST_ID())->setGeometricalSelection(true);
+ return VolumePtr(new OperaAPI_addVolume(aFeature, theMedium, theObjectList));
+}
--- /dev/null
+// Copyright (C) 2014-2021 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 OPERAAPI_ADDVOLUME_H_
+#define OPERAAPI_ADDVOLUME_H_
+
+#include "OperaAPI.h"
+#include <OperaPlugin_Volume.h>
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+class ModelHighAPI_Double;
+class ModelHighAPI_Selection;
+
+/// \class OperaAPI_addVolume
+/// \ingroup CPPHighAPI
+/// \brief Interface for primitive Box feature.
+class OperaAPI_addVolume: public ModelHighAPI_Interface
+{
+public:
+ /// Constructor without values.
+ OPERAAPI_EXPORT
+ explicit OperaAPI_addVolume(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+ /// Constructor with values.
+ OPERAAPI_EXPORT
+ OperaAPI_addVolume(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Double& theMedium,
+ const std::list<ModelHighAPI_Selection>& theObjectList);
+
+ /// Destructor.
+ OPERAAPI_EXPORT
+ virtual ~OperaAPI_addVolume();
+
+ INTERFACE_2(OperaPlugin_Volume::ID(),
+ medium, OperaPlugin_Volume::MEDIUM(),
+ ModelAPI_AttributeString, /** Volume medium */,
+ volumeList, OperaPlugin_Volume::VOLUME_LIST_ID(),
+ ModelAPI_AttributeSelectionList, /** Group list*/)
+
+ /// Set medium
+ OPERAAPI_EXPORT
+ void setMedium(const ModelHighAPI_Double& theMedium);
+
+ /// Set main objects list.
+ OPERAAPI_EXPORT
+ void setObjectList(const std::list<ModelHighAPI_Selection>& theObjectList);
+
+ /// Dump wrapped feature
+ OPERAAPI_EXPORT
+ virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+};
+
+/// Pointer addVolume feature
+typedef std::shared_ptr<OperaAPI_addVolume> VolumePtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create addVolume feature.
+OPERAAPI_EXPORT
+VolumePtr addVolume(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Double& theMedium,
+ const std::list<ModelHighAPI_Selection>& theObjectList);
+
+#endif // OperaAPI_addVolume_H_
--- /dev/null
+# Copyright (C) 2014-2021 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
+#
+
+SET(PROJECT_HEADERS
+ OperaPlugin.h
+ OperaPlugin_Plugin.h
+ OperaPlugin_Volume.h
+)
+
+SET(PROJECT_SOURCES
+ OperaPlugin_Plugin.cpp
+ OperaPlugin_Volume.cpp
+
+)
+
+SET(XML_RESOURCES
+ plugin-Opera.xml
+ addvolume_widget.xml
+)
+
+SET(TEXT_RESOURCES
+ OperaPlugin_msg_fr.ts
+)
+
+SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
+SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
+
+INCLUDE_DIRECTORIES(
+ ../ModelAPI
+ ../GeomAPI
+ ../GeomAlgoAPI
+ ../Events
+)
+
+SET(PROJECT_LIBRARIES
+ Events
+ ModelAPI
+ GeomAPI
+ GeomAlgoAPI
+)
+
+ADD_DEFINITIONS(-DOPERAPLUGIN_EXPORTS)
+ADD_LIBRARY(OperaPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
+TARGET_LINK_LIBRARIES(OperaPlugin ${PROJECT_LIBRARIES})
+
+INSTALL(TARGETS OperaPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Opera)
+
+
--- /dev/null
+// Copyright (C) 2014-2021 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 OPERAPLUGIN_H
+#define OPERAPLUGIN_H
+
+#if defined OPERAPLUGIN_EXPORTS
+#if defined WIN32
+#define OPERAPLUGIN_EXPORT __declspec( dllexport )
+#else
+#define OPERAPLUGIN_EXPORT
+#endif
+#else
+#if defined WIN32
+#define OPERAPLUGIN_EXPORT __declspec( dllimport )
+#else
+#define OPERAPLUGIN_EXPORT
+#endif
+#endif
+
+#endif
--- /dev/null
+// Copyright (C) 2014-2021 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 <OperaPlugin_Plugin.h>
+#include <OperaPlugin_Volume.h>
+
+#include <ModelAPI_Session.h>
+
+#include <string>
+#include <memory>
+#include <iostream>
+
+// the only created instance of this plugin
+static OperaPlugin_Plugin* MY_PRIMITIVES_INSTANCE = new OperaPlugin_Plugin();
+
+OperaPlugin_Plugin::OperaPlugin_Plugin()
+{
+ // register this plugin
+ ModelAPI_Session::get()->registerPlugin(this);
+}
+
+FeaturePtr OperaPlugin_Plugin::createFeature(std::string theFeatureID)
+{
+ if (theFeatureID == OperaPlugin_Volume::ID()) {
+ return FeaturePtr(new OperaPlugin_Volume);
+ } else {
+ // else if (theFeatureID == OperaPlugin_addNode::ID()){
+ // return FeaturePtr(new OperaPlugin_addNode);
+ return FeaturePtr();
+ }
+}
--- /dev/null
+// Copyright (C) 2014-2021 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 OperaPlugin_Plugin_H_
+#define OperaPlugin_Plugin_H_
+
+#include "OperaPlugin.h"
+#include <ModelAPI_Plugin.h>
+#include <ModelAPI_Feature.h>
+
+/**\class OperaPlugin_Plugin
+ * \ingroup Plugins
+ * \brief The main class managing Primitive Features as plugins.
+ */
+class OPERAPLUGIN_EXPORT OperaPlugin_Plugin : public ModelAPI_Plugin
+{
+ public:
+ /// Creates the feature object of this plugin by the feature string ID
+ virtual FeaturePtr createFeature(std::string theFeatureID);
+
+ public:
+ /// Default constructor
+ OperaPlugin_Plugin();
+
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2014-2021 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 <OperaPlugin_Volume.h>
+
+#include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeIntArray.h>
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Document.h>
+#include <ModelAPI_ResultBody.h>
+#include <ModelAPI_Tools.h>
+
+#include <GeomAlgoAPI_Copy.h>
+#include <GeomAlgoAPI_Tools.h>
+
+#include <sstream>
+#include <memory>
+#include <iostream>
+
+//=================================================================================================
+OperaPlugin_Volume::OperaPlugin_Volume() // Nothing to do during instantiation
+{
+}
+
+//=================================================================================================
+static GeomShapePtr shapeOfSelection(AttributeSelectionPtr theSel) {
+ GeomShapePtr aResult;
+ FeaturePtr aSelFeature = theSel->contextFeature();
+ if (aSelFeature.get()) {
+ if (aSelFeature->results().empty()) // if selected feature has no results, make nothing
+ return aResult;
+ if (aSelFeature->results().size() == 1) { // for one sub-result don't make compound
+ aResult = aSelFeature->firstResult()->shape();
+ }
+ }
+ if (!aResult.get())
+ aResult = theSel->value();
+ if (!aResult.get()) {
+ if (theSel->context().get())
+ aResult = theSel->context()->shape();
+ }
+ return aResult;
+}
+
+//=================================================================================================
+void OperaPlugin_Volume::initAttributes()
+{
+ //Get Medium
+ data()->addAttribute(MEDIUM(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(VOLUME_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+
+ // // //Get Objects
+ // AttributeSelectionListPtr aList = std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(
+ // data()->addAttribute(LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
+ // aList->setWholeResultAllowed(true); // allow to select the whole result
+}
+
+//=================================================================================================
+void OperaPlugin_Volume::execute()
+{
+ std::string aCopiesMedium = string(MEDIUM())->value();
+ if (aCopiesMedium.empty())
+ {
+ setError("Error: Medium cannot be empty.");
+ return;
+ }
+
+ AttributeSelectionListPtr aList = selectionList(VOLUME_LIST_ID());
+ int aResultIndex = 0;
+ std::set<std::wstring> anExistingNames; // to avoid names duplication
+ for (int aSelIndex = 0; aSelIndex < aList->size(); aSelIndex++) {
+ AttributeSelectionPtr aSel = aList->value(aSelIndex);
+ GeomShapePtr aResult = shapeOfSelection(aSel);
+ if (!aResult.get())
+ continue;
+ // std::shared_ptr<GeomAlgoAPI_Copy> aCopyBuilder(new GeomAlgoAPI_Copy(aShape, false, false));
+ // std::string anError;
+ // if (GeomAlgoAPI_Tools::AlgoError::isAlgorithmFailed(aCopyBuilder, getKind(), anError)) {
+ // setError(anError);
+ // return;
+ // }
+ // GeomShapePtr aResult = aCopyBuilder->shape();
+
+ std::wstring aBaseName = aSel->context() ? aSel->context()->data()->name() :
+ aSel->contextFeature()->firstResult()->data()->name();
+ std::wstring aName;
+ int anInd = 0;
+ do {
+ anInd++;
+ std::wostringstream aNameStr;
+ aNameStr << "Volume_" << aBaseName;
+ aName = aNameStr.str();
+ } while (anExistingNames.count(aName));
+ anExistingNames.insert(aName);
+
+ std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data(), aResultIndex);
+ aResultBody->data()->setName(aName);
+ // to make sub-results also names with a similar name temporarily rename the feature
+ // std::wstring anOrigName = name();
+ // data()->setName(aBaseName);
+ aResultBody->store(aResult);
+ // data()->setName(anOrigName);
+ // aResultBody->loadFirstLevel(aResult, "Copy");
+ setResult(aResultBody, aResultIndex++);
+ }
+ removeResults(aResultIndex);
+}
--- /dev/null
+// Copyright (C) 2014-2021 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 OperaPlugin_Volume_H_
+#define OperaPlugin_Volume_H_
+
+#include <OperaPlugin.h>
+#include <ModelAPI_Feature.h>
+#include <GeomAlgoAPI_Box.h>
+
+class GeomAPI_Shape;
+class ModelAPI_ResultBody;
+
+/**\class OperaPlugin_Volume
+ * \ingroup Plugins
+ * \brief Feature for creation of a box primitive using various methods.
+ *
+ * Box creates a cuboid - Parallelepiped with 6 rectangular faces. It can be built via three
+ * methods : using two points that define a diagonal, a point that define a center and 3 lengths
+ * that define the half-lengths on X, Y and Z-axes, or using 3 lengths that define the
+ * rectangular dimensions.
+ */
+class OperaPlugin_Volume : public ModelAPI_Feature
+{
+ public:
+ /// Box kind
+ inline static const std::string& ID()
+ {
+ static const std::string MY_VOLUME_ID("addVolume");
+ return MY_VOLUME_ID;
+ }
+ inline static const std::string& MEDIUM()
+ {
+ static const std::string MY_MEDIUM_ID("medium");
+ return MY_MEDIUM_ID;
+ }
+ /// attribute name of selected entities list
+ inline static const std::string& VOLUME_LIST_ID()
+ {
+ static const std::string MY_VOLUME_LIST_ID("volume_list");
+ return MY_VOLUME_LIST_ID;
+ }
+
+ // Creates a new part document if needed
+ OPERAPLUGIN_EXPORT virtual void execute();
+
+ /// Request for initialization of data model of the feature: adding all attributes
+ OPERAPLUGIN_EXPORT virtual void initAttributes();
+
+ /// Returns the kind of a feature
+ OPERAPLUGIN_EXPORT virtual const std::string& getKind()
+ {
+ static std::string MY_KIND = OperaPlugin_Volume::ID();
+ return MY_KIND;
+ }
+
+ /// Use plugin manager for features creation
+ OperaPlugin_Volume();
+
+ private:
+ //
+ void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Box> theBoxAlgo,
+ std::shared_ptr<ModelAPI_ResultBody> theResultBox);
+};
+
+#endif
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+
+ <context>
+ <name>workshop</name>
+ <message>
+ <source>Primitives</source>
+ <translation>Primitives</translation>
+ </message>
+ <message>
+ <source>Box</source>
+ <translation>Boîte</translation>
+ </message>
+ <message>
+ <source>Cone</source>
+ <translation>Cône</translation>
+ </message>
+ <message>
+ <source>Cylinder</source>
+ <translation>Cylindre</translation>
+ </message>
+ <message>
+ <source>Sphere</source>
+ <translation>Sphère</translation>
+ </message>
+ <message>
+ <source>Torus</source>
+ <translation>Tore</translation>
+ </message>
+ </context>
+
+ <context>
+ <name>Box</name>
+ <message>
+ <source>Box</source>
+ <translation>Boîte</translation>
+ </message>
+ <message>
+ <source>Create a box</source>
+ <translation>Créer une boîte</translation>
+ </message>
+ </context>
+ <context>
+ <name>Box:CreationMethod</name>
+ <message>
+ <source>By dimensions</source>
+ <translation>Par dimensions</translation>
+ </message>
+ <message>
+ <source>By two points</source>
+ <translation>Par deux points</translation>
+ </message>
+ </context>
+ <context>
+ <name>Box:FirstPoint</name>
+ <message>
+ <source>First point</source>
+ <translation>Premier point</translation>
+ </message>
+ <message>
+ <source>Select a first point</source>
+ <translation>Sélectionnez un premier point</translation>
+ </message>
+ </context>
+ <context>
+ <name>Box:FirstPoint</name>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez un premier point.</translation>
+ </message>
+ </context>
+ <context>
+ <name>Box:SecondPoint</name>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez un deuxième point.</translation>
+ </message>
+ </context>
+ <context>
+ <name>Box:SecondPoint</name>
+ <message>
+ <source>Second point</source>
+ <translation>Deuxième point</translation>
+ </message>
+ <message>
+ <source>Select a second point</source>
+ <translation>Sélectionnez un deuxième point</translation>
+ </message>
+ </context>
+ <context>
+ <name>Box:dx</name>
+ <message>
+ <source>DX</source>
+ <translation>DX</translation>
+ </message>
+ <message>
+ <source>Dimension in X</source>
+ <translation>Dimension en X</translation>
+ </message>
+ </context>
+ <context>
+ <name>Box:dy</name>
+ <message>
+ <source>DY</source>
+ <translation>DY</translation>
+ </message>
+ <message>
+ <source>Dimension in Y</source>
+ <translation>Dimension en Y</translation>
+ </message>
+ </context>
+ <context>
+ <name>Box:dz</name>
+ <message>
+ <source>DZ</source>
+ <translation>DZ</translation>
+ </message>
+ <message>
+ <source>Dimension in Z</source>
+ <translation>Dimension en Z</translation>
+ </message>
+ </context>
+
+ <context>
+ <name>Cone</name>
+ <message>
+ <source>Cone</source>
+ <translation>Cône</translation>
+ </message>
+ <message>
+ <source>Create a Cone</source>
+ <translation>Créer un cône</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cone:axis</name>
+ <message>
+ <source>Select the axis of the cone</source>
+ <translation>Sélectionnez l'axe du cône</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez l'axe du cône</translation>
+ </message>
+ <message>
+ <source>axis</source>
+ <translation>axe</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cone:base_point</name>
+ <message>
+ <source>Select the center of the base of the cone</source>
+ <translation>Sélectionnez le centre de la base du cône</translation>
+ </message>
+ <message>
+ <source>base_point</source>
+ <translation>point de base</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cone:base_radius</name>
+ <message>
+ <source>Base radius</source>
+ <translation>Rayon de la base</translation>
+ </message>
+ <message>
+ <source>Enter the base radius of the cone</source>
+ <translation>Entrez le rayon de base du cône</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cone:height</name>
+ <message>
+ <source>Enter the height of the cone</source>
+ <translation>Entrez la hauteur du cône</translation>
+ </message>
+ <message>
+ <source>height</source>
+ <translation>hauteur</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cone:top_radius</name>
+ <message>
+ <source>Enter the top radius of the cone</source>
+ <translation>Entrez le rayon supérieur du cône</translation>
+ </message>
+ <message>
+ <source>Top radius</source>
+ <translation>Rayon supérieur</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cone:base_point</name>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez le centre de la base du cône.</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cone:base_point:GeomValidators_ConstructionComposite</name>
+ <message>
+ <source>The result is empty</source>
+ <translation>Le résultat est vide</translation>
+ </message>
+ </context>
+
+ <context>
+ <name>Cylinder</name>
+ <message>
+ <source>Create a cylinder</source>
+ <translation>Créer un cylindre</translation>
+ </message>
+ <message>
+ <source>Cylinder</source>
+ <translation>Cylindre</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cylinder:CreationMethod</name>
+ <message>
+ <source>Cylinder</source>
+ <translation>Cylindre</translation>
+ </message>
+ <message>
+ <source>Portion of cylinder</source>
+ <translation>Portion de cylindre</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cylinder:angle</name>
+ <message>
+ <source>Enter the angle of the portion of the cylinder</source>
+ <translation>Entrez l'angle de la portion du cylindre</translation>
+ </message>
+ <message>
+ <source>angle</source>
+ <translation>angle</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cylinder:axis</name>
+ <message>
+ <source>Select the axis of the cylinder</source>
+ <translation>Sélectionnez l'axe du cylindre.</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez l'axe du cylindre.</translation>
+ </message>
+ <message>
+ <source>axis</source>
+ <translation>axe</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cylinder:base_point</name>
+ <message>
+ <source>Select the center of the base of the cylinder</source>
+ <translation>Sélectionnez le centre de la base du cylindre</translation>
+ </message>
+ <message>
+ <source>base_point</source>
+ <translation>point de base</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cylinder:height</name>
+ <message>
+ <source>Enter the height of the cylinder</source>
+ <translation>Entrez la hauteur du cylindre</translation>
+ </message>
+ <message>
+ <source>height</source>
+ <translation>hauteur</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cylinder:radius</name>
+ <message>
+ <source>Enter the radius of the cylinder</source>
+ <translation>Entrez le rayon du cylindre</translation>
+ </message>
+ <message>
+ <source>radius</source>
+ <translation>rayon</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cylinder:base_point</name>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez le centre de la base du cylindre.</translation>
+ </message>
+ </context>
+ <context>
+ <name>Cylinder:base_point:GeomValidators_ConstructionComposite</name>
+ <message>
+ <source>The result is empty</source>
+ <translation>Le résultat est vide</translation>
+ </message>
+ </context>
+
+ <context>
+ <name>Sphere</name>
+ <message>
+ <source>Create a sphere</source>
+ <translation>Créer une sphère</translation>
+ </message>
+ <message>
+ <source>Sphere</source>
+ <translation>Sphère</translation>
+ </message>
+ </context>
+ <context>
+ <name>Sphere:center_point</name>
+ <message>
+ <source>Center point</source>
+ <translation>Point central</translation>
+ </message>
+ <message>
+ <source>Select a center point</source>
+ <translation>Sélectionnez un point central.</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez un point central.</translation>
+ </message>
+ </context>
+ <context>
+ <name>Sphere:radius</name>
+ <message>
+ <source>Enter a radius</source>
+ <translation>Entrez un rayon</translation>
+ </message>
+ <message>
+ <source>Radius</source>
+ <translation>Rayon</translation>
+ </message>
+ </context>
+
+ <context>
+ <name>Torus</name>
+ <message>
+ <source>Create a Torus</source>
+ <translation>Créer un tore</translation>
+ </message>
+ <message>
+ <source>Torus</source>
+ <translation>Tore</translation>
+ </message>
+ </context>
+ <context>
+ <name>Torus:axis</name>
+ <message>
+ <source>Select the axis of the torus</source>
+ <translation>Sélectionnez l'axe du tore.</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez l'axe du tore.</translation>
+ </message>
+ <message>
+ <source>axis</source>
+ <translation>axe</translation>
+ </message>
+ </context>
+ <context>
+ <name>Torus:base_point</name>
+ <message>
+ <source>Select the center of the torus</source>
+ <translation>Sélectionnez le centre du tore.</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Sélectionnez le centre du tore.</translation>
+ </message>
+ <message>
+ <source>base_point</source>
+ <translation>point de base</translation>
+ </message>
+ </context>
+ <context>
+ <name>Torus:radius</name>
+ <message>
+ <source>Enter the radius of the torus</source>
+ <translation>Entrez le rayon du tore</translation>
+ </message>
+ <message>
+ <source>Radius</source>
+ <translation>Rayon</translation>
+ </message>
+ </context>
+ <context>
+ <name>Torus:ring_radius</name>
+ <message>
+ <source>Enter the ring radius of the torus</source>
+ <translation>Entrez le rayon de l'anneau du tore</translation>
+ </message>
+ <message>
+ <source>Ring radius</source>
+ <translation>Rayon de l'anneau</translation>
+ </message>
+ </context>
+
+</TS>
--- /dev/null
+# Copyright (C) 2014-2021 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
+#
+
+"""
+ TestAddVolume.py
+ Test case of OperaPlugin_addVolume
+"""
+#=========================================================================
+# Initialization of the test
+#=========================================================================
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+#=========================================================================
+# Create a Box, a Torus and a Cylinder
+#=========================================================================
+Box_1 = model.addBox(Part_1_doc, 10, 20, 10)
+Torus_1 = model.addTorus(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 15, 3)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+
+#=========================================================================
+# Create one Volume
+#=========================================================================
+
+Volume_1 = model.addVolume(Part_1_doc, "Test_medium", [model.selection("SOLID", "Box_1")])
+
+#=========================================================================
+# Check results
+#=========================================================================
+
+from GeomAPI import GeomAPI_Shape
+
+# TODO : Check this
+# TODO : Do I need a testNbVolume ??
+model.testNbResults(Volume_1, 1)
+model.testNbSubResults(Volume_1, [0])
+model.testNbSubShapes(Volume_1, GeomAPI_Shape.SOLID, [1])
+model.testNbSubShapes(Volume_1, GeomAPI_Shape.FACE, [6])
+model.testHaveNamingFaces(Volume_1, model, Part_1_doc)
+
+#=========================================================================
+# Create two volumes at once
+#=========================================================================
+
+Volume_2 = model.addVolume(Part_1_doc, "Test_medium_2", [model.selection("SOLID", "Torus_1"),
+ model.selection("SOLID", "Cylinder_1")])
+
+#=========================================================================
+# Check results
+#=========================================================================
+
+# TODO : Check this
+
+model.testNbResults(Volume_2, 2)
+model.testNbSubResults(Volume_2, [0])
+model.testNbSubShapes(Volume_2, GeomAPI_Shape.SOLID, [2])
+
+#=========================================================================
+# End of test
+#=========================================================================
+
+from salome.shaper import model
+assert(model.checkPythonDump())
--- /dev/null
+<source>
+ <stringvalue id="medium"
+ label="Medium"
+ tooltip="Please input the volumes medium">
+ </stringvalue>
+ <multi_selector id="volume_list"
+ label="Select solids"
+ tooltip="Select solid objects"
+ shape_types="solids">
+ <validator id="GeomValidators_ShapeType" parameters="solid"/>
+ </multi_selector>
+</source>
--- /dev/null
+.. |Box_button.icon| image:: images/Box_button.png
+
+Box
+===
+
+Box feature creates a box solid.
+
+To create a Box in the active part:
+
+#. select in the Main Menu *Primitives - > Box* item or
+#. click |Box_button.icon| **Box** button in the toolbar:
+
+There are 3 algorithms for creation of a Box:
+
+.. figure:: images/box_dxyz_32x32.png
+ :align: left
+ :height: 24px
+
+**By dimensions**
+
+.. figure:: images/box_2pt_32x32.png
+ :align: left
+ :height: 24px
+
+**By two points**
+
+.. figure:: images/box_pt_dxyz_32x32.png
+ :align: left
+ :height: 24px
+
+**By coordinates of a point and dimensions**
+
+--------------------------------------------------------------------------------
+
+By dimensions
+-------------
+
+Box is created by dimensions along X, Y, Z axis starting from the origin.
+
+.. figure:: images/Box_dimensions.png
+ :align: center
+
+Input fields:
+
+- **DX**, **DY**, **DZ** define dimensions of the box along the corresponding coordinate axes.
+
+**TUI Command**:
+
+.. py:function:: model.addBox(Part_doc, DX, DY, DZ)
+
+ :param part: The current part object.
+ :param real: Size along X.
+ :param real: Size along Y.
+ :param real: Size along Z.
+ :return: Result object.
+
+Result
+""""""
+
+A solid box based on the origin of coordinates and with edges parallel to the coordinate axes.
+
+.. figure:: images/Box1.png
+ :align: center
+
+**See Also** a sample TUI Script of a :ref:`tui_create_boxdim` operation.
+
+By two points
+-------------
+
+Box is created by two points of the box diagonal.
+
+.. figure:: images/Box_2points.png
+ :align: center
+
+Input fields:
+
+- **Point 1** and **Point 2** define diagonal points of the box selected in 3D OCC viewer or object browser.
+
+**TUI Command**:
+
+.. py:function:: model.addBox(Part_doc, point1, point2)
+
+ :param part: The current part object.
+ :param object: First vertex of diagonal.
+ :param object: Second vertex of diagonal.
+ :return: Result object.
+
+Result
+""""""
+
+A solid box based on two points and with edges parallel to the coordinate axes.
+
+.. figure:: images/Box2.png
+ :align: center
+
+ Created boxes
+
+**See Also** a sample TUI Script of :ref:`tui_create_boxpnt` operation.
+
+By coordinates of a point and dimensions
+----------------------------------------
+
+Box is created by dimensions along X, Y, Z axis starting from the point of coordinates (x,y,z).
+
+.. figure:: images/Box_ptAndDims.png
+ :align: center
+
+Input fields:
+
+- **OX**, **OY**, **OZ** define coordinates of the center of box.
+- **DX**, **DY**, **DZ** define dimensions (hafl length) of the box along the corresponding coordinate axes.
+
+**TUI Command**:
+
+.. py:function:: model.addBox(Part_doc, OX, OY, OZ, DX, DY, DZ)
+
+ :param part: The current part object.
+ :param real: X coordinate of the center point
+ :param real: Y coordinate of the center point
+ :param real: Z coordinate of the center point
+ :param real: Half size along X.
+ :param real: Half size along Y.
+ :param real: Half size along Z.
+ :return: Result object.
+
+Result
+""""""
+
+A solid box whose point coordinates are the center and the dimensions are half lengths on one side and the other on the axes relative to the center.
+
+.. figure:: images/Box3.png
+ :align: center
+
+ Created boxes
+
+**See Also** a sample TUI Script of :ref:`tui_create_boxptdim` operation.
--- /dev/null
+<plugin>
+ <workbench id="Opera" document="Part">
+ <group id="Opera">
+ <feature id="addVolume" title="addVolume" tooltip="Create a volume" icon="icons/Opera/addVolume.png"
+ helpfile="addvolumeFeature.html">
+ <source path="addvolume_widget.xml"/>
+ </feature>
+ </group>
+ </workbench>
+</plugin>
--- /dev/null
+# Copyright (C) 2021 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
+#
+
+SET(TEST_NAMES
+ TestAddVolume.py
+)
from .parameter import *
from .partset import *
from .primitives import *
+from .opera import *
from .gdml import *
from .tests import *
--- /dev/null
+# Copyright (C) 2016-2021 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
+#
+"""Package for Opera plugin for SHAPER Opera.
+"""
+
+from OperaAPI import addVolume