From ee6034427d4adc3b83cad729e641537382576ab4 Mon Sep 17 00:00:00 2001 From: dbv Date: Fri, 23 Dec 2016 11:13:19 +0300 Subject: [PATCH] Issue #803: Put all the python modules in the same python package newgeom --- CMakeCommon/UnitTest.cmake | 4 ++-- CMakeLists.txt | 7 +++---- env_Salome.bat | 3 ++- salomeRun_deb.bat | 1 + src/BuildPlugin/Test/TestEdge.py | 2 +- src/BuildPlugin/Test/TestFace.py | 2 +- src/BuildPlugin/Test/TestShell.py | 2 +- src/BuildPlugin/Test/TestSubShapes.py | 2 +- src/BuildPlugin/Test/TestVertex.py | 2 +- src/BuildPlugin/Test/TestWire.py | 2 +- src/CollectionPlugin/Test/TestField.py | 2 +- src/CollectionPlugin/Test/TestGroup.py | 2 +- src/ConnectorAPI/Test/TestExportToGEOM.py | 2 +- src/ConstructionAPI/Test/TestAxis.py | 2 +- src/ConstructionAPI/Test/TestPoint.py | 2 +- src/ConstructionPlugin/Test/TestAxisCreation.py | 3 +-- src/ConstructionPlugin/Test/TestPlane.py | 3 +-- src/ConstructionPlugin/Test/TestPoint.py | 2 +- src/ConstructionPlugin/Test/TestPointName.py | 2 +- src/ConstructionPlugin/Test/UnitTestAxis.py | 2 +- src/ExchangeAPI/Test/TestExchange.py | 2 +- src/ExchangePlugin/ExchangePlugin_Dump.cpp | 2 +- src/ExchangePlugin/Test/TestExport.py | 2 +- src/ExchangePlugin/Test/TestImport.py | 2 +- src/FeaturesAPI/Test/APIParam_Translation.py | 2 +- src/FeaturesPlugin/Test/TestBoolean.py | 2 +- src/FeaturesPlugin/Test/TestBooleanCompSolids.py | 2 +- src/FeaturesPlugin/Test/TestBooleanFill.py | 2 +- src/FeaturesPlugin/Test/TestBooleanSmash.py | 2 +- .../Test/TestCompositeFeaturesOnCompSolids.py | 2 +- src/FeaturesPlugin/Test/TestExtrusion.py | 2 +- src/FeaturesPlugin/Test/TestExtrusionCut.py | 2 +- src/FeaturesPlugin/Test/TestExtrusionFuse.py | 2 +- src/FeaturesPlugin/Test/TestIntersection.py | 2 +- src/FeaturesPlugin/Test/TestMultiBoolean.py | 2 +- src/FeaturesPlugin/Test/TestPartition.py | 2 +- src/FeaturesPlugin/Test/TestPipe.py | 2 +- src/FeaturesPlugin/Test/TestPlacement.py | 2 +- src/FeaturesPlugin/Test/TestRecover.py | 2 +- src/FeaturesPlugin/Test/TestRecover1798.py | 2 +- src/FeaturesPlugin/Test/TestRemoveSubShapes.py | 2 +- src/FeaturesPlugin/Test/TestRevolution.py | 2 +- src/FeaturesPlugin/Test/TestRevolutionCut.py | 2 +- src/FeaturesPlugin/Test/TestRevolutionFuse.py | 2 +- src/FeaturesPlugin/Test/TestRotation.py | 2 +- src/FeaturesPlugin/Test/TestSerialBoolean.py | 2 +- src/FeaturesPlugin/Test/TestTranslation.py | 2 +- src/FeaturesPlugin/Test/TestUnion.py | 2 +- src/ModelAPI/Test/Test1064.py | 2 +- src/ModelAPI/Test/Test1512.py | 2 +- src/ModelAPI/Test/Test1757.py | 2 +- src/ModelAPI/Test/TestDocument.py | 2 +- src/ModelAPI/Test/TestResults.py | 2 +- src/ModelAPI/Test/TestUndoRedo.py | 2 +- src/ModelGeomAlgo/Test/TestPoint2D.py | 2 +- src/ModelHighAPI/ModelHighAPI_Dumper.cpp | 2 +- src/ModelHighAPI/Test/TestDeflectionDump.py | 2 +- src/ModelHighAPI/Test/TestRefAttr.py | 2 +- src/ModelHighAPI/Test/TestReference.py | 2 +- src/ParametersPlugin/Test/Test1806.py | 2 +- src/ParametersPlugin/Test/TestParameterChangeValue.py | 2 +- src/ParametersPlugin/Test/TestParameterCreation.py | 2 +- src/ParametersPlugin/Test/TestParameterRename.py | 2 +- src/PartSetAPI/Test/TestRemoveDuplicate.py | 2 +- src/PrimitivesPlugin/Test/TestBox.py | 2 +- src/PythonAPI/CMakeLists.txt | 2 +- src/PythonAPI/Test/TestFeatures.py | 2 +- src/PythonAPI/Test/TestFeaturesExtrusion.py | 2 +- src/PythonAPI/Test/TestFeaturesRevolution.py | 2 +- src/PythonAPI/Test/TestMakeBrick1.py | 2 +- src/PythonAPI/Test/TestMakeBrick2.py | 2 +- src/PythonAPI/Test/TestModel.py | 2 +- src/PythonAPI/Test/TestPlatine.py | 2 +- src/PythonAPI/Test/TestPrimitivesBox.py | 2 +- src/PythonAPI/Test/TestPythonAPI.py | 4 ++-- src/PythonAPI/Test/TestSketcher.py | 2 +- src/PythonAPI/Test/TestSketcherAddArc.py | 4 ++-- src/PythonAPI/Test/TestSketcherAddCircle.py | 2 +- src/PythonAPI/Test/TestSketcherAddLine.py | 2 +- src/PythonAPI/Test/TestSketcherAddMirror.py | 2 +- src/PythonAPI/Test/TestSketcherAddPoint.py | 2 +- src/PythonAPI/Test/TestSketcherSetAngle.py | 2 +- src/PythonAPI/Test/TestSketcherSetCoincident.py | 2 +- src/PythonAPI/Test/TestSketcherSetEqual.py | 2 +- src/PythonAPI/Test/TestSketcherSetFillet.py | 2 +- src/PythonAPI/Test/TestSketcherSetFixed.py | 2 +- src/PythonAPI/Test/TestSketcherSetHorizontal.py | 2 +- src/PythonAPI/Test/TestSketcherSetLength.py | 2 +- src/PythonAPI/Test/TestSketcherSetParallel.py | 2 +- src/PythonAPI/Test/TestSketcherSetPerpendicular.py | 2 +- src/PythonAPI/Test/TestSketcherSetRadius.py | 2 +- src/PythonAPI/Test/TestSketcherSetTangent.py | 2 +- src/PythonAPI/Test/TestSketcherSetVertical.py | 2 +- src/PythonAPI/__init__.py | 0 src/PythonAPI/doc/source/index.rst | 2 +- src/PythonAPI/doc/source/model/extrusion.rst | 2 +- src/PythonAPI/examples/MakeBrick1.py | 2 +- src/PythonAPI/examples/MakeBrick2.py | 4 ++-- src/PythonAPI/examples/Platine.py | 4 ++-- src/PythonAPI/shaper.py | 7 ------- src/PythonAddons/Test/TestRectangle.py | 4 ++-- src/PythonAddons/macros/box/feature.py | 4 ++-- src/PythonAddons/macros/rectangle/feature.py | 2 +- src/SketchPlugin/Test/TestConstraintAngle.py | 2 +- src/SketchPlugin/Test/TestConstraintCoincidence.py | 2 +- src/SketchPlugin/Test/TestConstraintCollinear.py | 2 +- src/SketchPlugin/Test/TestConstraintDistance.py | 2 +- src/SketchPlugin/Test/TestConstraintEqual.py | 2 +- src/SketchPlugin/Test/TestConstraintHorizontal.py | 2 +- src/SketchPlugin/Test/TestConstraintLength.py | 2 +- src/SketchPlugin/Test/TestConstraintMiddlePoint.py | 2 +- src/SketchPlugin/Test/TestConstraintMirror.py | 2 +- src/SketchPlugin/Test/TestConstraintParallel.py | 2 +- src/SketchPlugin/Test/TestConstraintPerpendicular.py | 2 +- src/SketchPlugin/Test/TestConstraintRadius.py | 2 +- src/SketchPlugin/Test/TestConstraintRigid.py | 2 +- src/SketchPlugin/Test/TestConstraintTangent.py | 2 +- src/SketchPlugin/Test/TestConstraintVertical.py | 2 +- src/SketchPlugin/Test/TestFillet.py | 2 +- src/SketchPlugin/Test/TestHighload.py | 2 +- src/SketchPlugin/Test/TestMultiRotation.py | 2 +- src/SketchPlugin/Test/TestMultiTranslation.py | 2 +- src/SketchPlugin/Test/TestProjection.py | 2 +- src/SketchPlugin/Test/TestRectangle.py | 2 +- src/SketchPlugin/Test/TestSketchArcCircle.py | 2 +- src/SketchPlugin/Test/TestSketchPointLine.py | 2 +- src/SketchPlugin/Test/TestSnowflake.py | 2 +- src/SketchPlugin/Test/TestSplit.py | 2 +- 128 files changed, 136 insertions(+), 144 deletions(-) create mode 100644 src/PythonAPI/__init__.py delete mode 100644 src/PythonAPI/shaper.py diff --git a/CMakeCommon/UnitTest.cmake b/CMakeCommon/UnitTest.cmake index 010d52f7c..626769505 100644 --- a/CMakeCommon/UnitTest.cmake +++ b/CMakeCommon/UnitTest.cmake @@ -30,12 +30,12 @@ MACRO(ADD_UNIT_TESTS) SET(_JUSTPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${SUIT_LIB_DIR};$ENV{PATH}") STRING(REPLACE "\\" "/" _JUSTPATH "${_JUSTPATH}") STRING(REPLACE ";" "\\;" _JUSTPATH "${_JUSTPATH}") - SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PYTHON_API};$ENV{PYTHONPATH}") + SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};$ENV{PYTHONPATH}") STRING(REPLACE "\\" "/" _PYTHONPATH "${_PYTHONPATH}") STRING(REPLACE ";" "\\;" _PYTHONPATH "${_PYTHONPATH}") else() SET(_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${SUIT_LIB_DIR}:$ENV{LD_LIBRARY_PATH}") - SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PYTHON_API}:$ENV{PYTHONPATH}") + SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}") endif() foreach(eachFileName ${ARGN}) diff --git a/CMakeLists.txt b/CMakeLists.txt index 487d77156..2d419ae1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,14 +36,15 @@ ENDIF() # It could be called only once FIND_PACKAGE(LibXml2 REQUIRED) +SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome) +SET(SHAPER_INSTALL_PYTHON_API ${_pydir}/salome/shaper CACHE INTERNAL "" FORCE) +SET(SHAPER_INSTALL_SWIG ${_pydir} CACHE INTERNAL "" FORCE) IF(${HAVE_SALOME}) SET(SHAPER_INSTALL_ADDONS bin/salome CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_BIN lib/salome CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_PLUGIN_FILES lib/salome CACHE INTERNAL "" FORCE) - SET(SHAPER_INSTALL_PYTHON_API bin/salome CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_PYTHON_FILES bin/salome CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE) - SET(SHAPER_INSTALL_SWIG bin/salome CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_QM_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_XML_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_GUI_DOC share/doc/salome/gui/SHAPER CACHE INTERNAL "" FORCE) @@ -54,10 +55,8 @@ ELSE(${HAVE_SALOME}) SET(SHAPER_INSTALL_ADDONS addons CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_BIN bin CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_PLUGIN_FILES plugins CACHE INTERNAL "" FORCE) - SET(SHAPER_INSTALL_PYTHON_API PythonAPI CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_PYTHON_FILES plugins CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_RESOURCES resources CACHE INTERNAL "" FORCE) - SET(SHAPER_INSTALL_SWIG swig CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_QM_RESOURCES bin CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_XML_RESOURCES plugins CACHE INTERNAL "" FORCE) SET(SHAPER_INSTALL_GUI_DOC doc CACHE INTERNAL "" FORCE) diff --git a/env_Salome.bat b/env_Salome.bat index 26ef1f6d7..996b0c07c 100644 --- a/env_Salome.bat +++ b/env_Salome.bat @@ -101,6 +101,7 @@ IF "%ARCH%" == "Win64" ( @SET SHAPER_ROOT_DIR=%ROOT_DIR%\install @SET PATH=%SHAPER_ROOT_DIR%\lib\salome;%PATH% -@SET PYTHONPATH=%SHAPER_ROOT_DIR%\bin\salome;%PYTHONPATH% +REM @SET PYTHONPATH=%SHAPER_ROOT_DIR%\lib\python2.7\site-packages\salome\salome;%PYTHONPATH% +REM @SET PYTHONPATH=%SHAPER_ROOT_DIR%\bin\salome;%PYTHONPATH% @SET LightAppConfig=%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui diff --git a/salomeRun_deb.bat b/salomeRun_deb.bat index 75015844b..85fcc0fd2 100644 --- a/salomeRun_deb.bat +++ b/salomeRun_deb.bat @@ -6,4 +6,5 @@ call env_Salome.bat d @SET SHAPER_ROOT_DIR=%ROOT_DIR%\install @SET SalomeAppConfig=%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui +echo %PYTHONPATH% start %PYTHONBIN% "%KERNEL_ROOT_DIR%\bin\salome\envSalome.py" "%PYTHONBIN%" "%KERNEL_ROOT_DIR%\bin\salome\runSalome.py" %* diff --git a/src/BuildPlugin/Test/TestEdge.py b/src/BuildPlugin/Test/TestEdge.py index 648aa57d8..527358d3e 100644 --- a/src/BuildPlugin/Test/TestEdge.py +++ b/src/BuildPlugin/Test/TestEdge.py @@ -55,5 +55,5 @@ aSession.finishOperation() # Test results assert (len(anEdgeFeature.results()) == aNumOfLines) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/BuildPlugin/Test/TestFace.py b/src/BuildPlugin/Test/TestFace.py index 9f4b9e828..e4f6bd58a 100644 --- a/src/BuildPlugin/Test/TestFace.py +++ b/src/BuildPlugin/Test/TestFace.py @@ -63,5 +63,5 @@ aSession.finishOperation() # Test results assert (len(aFaceFeature.results()) > 0) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/BuildPlugin/Test/TestShell.py b/src/BuildPlugin/Test/TestShell.py index 2406a93b5..24c6cb9ff 100644 --- a/src/BuildPlugin/Test/TestShell.py +++ b/src/BuildPlugin/Test/TestShell.py @@ -78,5 +78,5 @@ aSession.finishOperation() # Test results assert (len(aShellFeature.results()) > 0) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/BuildPlugin/Test/TestSubShapes.py b/src/BuildPlugin/Test/TestSubShapes.py index dbe6d695d..1453d8af7 100644 --- a/src/BuildPlugin/Test/TestSubShapes.py +++ b/src/BuildPlugin/Test/TestSubShapes.py @@ -127,7 +127,7 @@ aSession.finishOperation() # Test results assert (len(aSubShapesFeature.results()) > 0) -import model +from salome.shaper import model model.begin() partSet = model.moduleDocument() diff --git a/src/BuildPlugin/Test/TestVertex.py b/src/BuildPlugin/Test/TestVertex.py index d292e6aaf..be6c50e79 100644 --- a/src/BuildPlugin/Test/TestVertex.py +++ b/src/BuildPlugin/Test/TestVertex.py @@ -56,5 +56,5 @@ aSession.finishOperation() # Test results assert (len(aVertexFeature.results()) == aNumOfPoints) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/BuildPlugin/Test/TestWire.py b/src/BuildPlugin/Test/TestWire.py index 8598eac57..06ce34192 100644 --- a/src/BuildPlugin/Test/TestWire.py +++ b/src/BuildPlugin/Test/TestWire.py @@ -63,7 +63,7 @@ aSession.finishOperation() # Test results assert (len(aWireFeature.results()) > 0) -import model +from salome.shaper import model model.begin() partSet = model.moduleDocument() diff --git a/src/CollectionPlugin/Test/TestField.py b/src/CollectionPlugin/Test/TestField.py index d6ae47a56..722575fdf 100644 --- a/src/CollectionPlugin/Test/TestField.py +++ b/src/CollectionPlugin/Test/TestField.py @@ -174,5 +174,5 @@ aSession.finishOperation() aFieldResult = aField.firstResult() assert(aFieldResult) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/CollectionPlugin/Test/TestGroup.py b/src/CollectionPlugin/Test/TestGroup.py index 139d41208..4c21a570a 100644 --- a/src/CollectionPlugin/Test/TestGroup.py +++ b/src/CollectionPlugin/Test/TestGroup.py @@ -243,5 +243,5 @@ assert(aGroupResult.shape()) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ConnectorAPI/Test/TestExportToGEOM.py b/src/ConnectorAPI/Test/TestExportToGEOM.py index 5ae5996bd..d616057c8 100644 --- a/src/ConnectorAPI/Test/TestExportToGEOM.py +++ b/src/ConnectorAPI/Test/TestExportToGEOM.py @@ -1,4 +1,4 @@ -import model +from salome.shaper import model model.begin() partSet = model.moduleDocument() diff --git a/src/ConstructionAPI/Test/TestAxis.py b/src/ConstructionAPI/Test/TestAxis.py index ddce01998..94a093171 100644 --- a/src/ConstructionAPI/Test/TestAxis.py +++ b/src/ConstructionAPI/Test/TestAxis.py @@ -2,7 +2,7 @@ import unittest import ModelAPI import ConstructionAPI -import model +from salome.shaper import model class AxisTestCase(unittest.TestCase): diff --git a/src/ConstructionAPI/Test/TestPoint.py b/src/ConstructionAPI/Test/TestPoint.py index 929610f57..1217d16ea 100644 --- a/src/ConstructionAPI/Test/TestPoint.py +++ b/src/ConstructionAPI/Test/TestPoint.py @@ -2,7 +2,7 @@ import unittest import ModelAPI import ConstructionAPI -import model +from salome.shaper import model class PointTestCase(unittest.TestCase): diff --git a/src/ConstructionPlugin/Test/TestAxisCreation.py b/src/ConstructionPlugin/Test/TestAxisCreation.py index 61b3dfd7f..f9ef91118 100644 --- a/src/ConstructionPlugin/Test/TestAxisCreation.py +++ b/src/ConstructionPlugin/Test/TestAxisCreation.py @@ -8,7 +8,7 @@ from GeomAPI import * import math from ModelAPI import * -import model +from salome.shaper import model aSession = ModelAPI_Session.get() aDocument = aSession.moduleDocument() @@ -189,5 +189,4 @@ anAxis = model.addAxis(aPart, aPlane1.result(), 50, False, aPlane2.result(), 100 aSession.finishOperation() assert (len(anAxis.results()) > 0) -import model assert(model.checkPythonDump()) diff --git a/src/ConstructionPlugin/Test/TestPlane.py b/src/ConstructionPlugin/Test/TestPlane.py index 6669c2d1b..87839997e 100644 --- a/src/ConstructionPlugin/Test/TestPlane.py +++ b/src/ConstructionPlugin/Test/TestPlane.py @@ -4,7 +4,7 @@ Test case for Construction Plane feature. Written on High API. from ModelAPI import * from GeomAPI import * -import model +from salome.shaper import model # Get session aSession = ModelAPI_Session.get() @@ -83,5 +83,4 @@ aPlane = model.addPlane(aDocument, aCoincidentPlane.result(), aPlane.result()) aSession.finishOperation() assert (len(aPlane.results()) > 0) -import model assert(model.checkPythonDump()) diff --git a/src/ConstructionPlugin/Test/TestPoint.py b/src/ConstructionPlugin/Test/TestPoint.py index 2614281bc..c33cba37c 100644 --- a/src/ConstructionPlugin/Test/TestPoint.py +++ b/src/ConstructionPlugin/Test/TestPoint.py @@ -4,7 +4,7 @@ Test case for Construction Point feature. Written on High API. from ModelAPI import * from GeomAPI import * -import model +from salome.shaper import model # Get session aSession = ModelAPI_Session.get() diff --git a/src/ConstructionPlugin/Test/TestPointName.py b/src/ConstructionPlugin/Test/TestPointName.py index 9d17c2294..a46f46ee7 100644 --- a/src/ConstructionPlugin/Test/TestPointName.py +++ b/src/ConstructionPlugin/Test/TestPointName.py @@ -21,5 +21,5 @@ aFeature1Name = aFeature1.data().name() assert (aFeatureName == aFeature1Name) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ConstructionPlugin/Test/UnitTestAxis.py b/src/ConstructionPlugin/Test/UnitTestAxis.py index c626e6de0..17c1db355 100644 --- a/src/ConstructionPlugin/Test/UnitTestAxis.py +++ b/src/ConstructionPlugin/Test/UnitTestAxis.py @@ -75,5 +75,5 @@ aSession.finishOperation() # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ExchangeAPI/Test/TestExchange.py b/src/ExchangeAPI/Test/TestExchange.py index d628d4f01..df49a15de 100644 --- a/src/ExchangeAPI/Test/TestExchange.py +++ b/src/ExchangeAPI/Test/TestExchange.py @@ -2,7 +2,7 @@ import unittest import ModelAPI import ExchangeAPI -import model +from salome.shaper import model class ExchangeTestCase(unittest.TestCase): diff --git a/src/ExchangePlugin/ExchangePlugin_Dump.cpp b/src/ExchangePlugin/ExchangePlugin_Dump.cpp index 168e9dc19..e81c896aa 100644 --- a/src/ExchangePlugin/ExchangePlugin_Dump.cpp +++ b/src/ExchangePlugin/ExchangePlugin_Dump.cpp @@ -43,7 +43,7 @@ void ExchangePlugin_Dump::execute() void ExchangePlugin_Dump::dump(const std::string& theFileName) { // load DumpAssistant from Python side - Config_ModuleReader::loadScript("model.dump"); + Config_ModuleReader::loadScript("salome.shaper.model.dump"); ModelHighAPI_Dumper* aDumper = ModelHighAPI_Dumper::getInstance(); aDumper->clear(); diff --git a/src/ExchangePlugin/Test/TestExport.py b/src/ExchangePlugin/Test/TestExport.py index ffd7f04c0..fd590cbe3 100644 --- a/src/ExchangePlugin/Test/TestExport.py +++ b/src/ExchangePlugin/Test/TestExport.py @@ -12,7 +12,7 @@ from ModelAPI import * from TestImport import testImport -import model +from salome.shaper import model __updated__ = "2015-05-22" diff --git a/src/ExchangePlugin/Test/TestImport.py b/src/ExchangePlugin/Test/TestImport.py index 63e364baa..1f5b39dad 100644 --- a/src/ExchangePlugin/Test/TestImport.py +++ b/src/ExchangePlugin/Test/TestImport.py @@ -121,5 +121,5 @@ if __name__ == '__main__': # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesAPI/Test/APIParam_Translation.py b/src/FeaturesAPI/Test/APIParam_Translation.py index 6795c25b8..a24515ae6 100644 --- a/src/FeaturesAPI/Test/APIParam_Translation.py +++ b/src/FeaturesAPI/Test/APIParam_Translation.py @@ -5,7 +5,7 @@ Written on High API. from ModelAPI import * from GeomAPI import * -import model +from salome.shaper import model # Get session aSession = ModelAPI_Session.get() diff --git a/src/FeaturesPlugin/Test/TestBoolean.py b/src/FeaturesPlugin/Test/TestBoolean.py index 8c6b67fd2..968263eaa 100644 --- a/src/FeaturesPlugin/Test/TestBoolean.py +++ b/src/FeaturesPlugin/Test/TestBoolean.py @@ -119,7 +119,7 @@ assert (aBooleanResult is not None) # End of test #========================================================================= -import model +from salome.shaper import model model.begin() partSet = model.moduleDocument() diff --git a/src/FeaturesPlugin/Test/TestBooleanCompSolids.py b/src/FeaturesPlugin/Test/TestBooleanCompSolids.py index 8d997e60e..414498fb4 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCompSolids.py +++ b/src/FeaturesPlugin/Test/TestBooleanCompSolids.py @@ -129,5 +129,5 @@ assert (aBooleanResult is not None) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFill.py b/src/FeaturesPlugin/Test/TestBooleanFill.py index 6a29649ca..807032161 100644 --- a/src/FeaturesPlugin/Test/TestBooleanFill.py +++ b/src/FeaturesPlugin/Test/TestBooleanFill.py @@ -4,7 +4,7 @@ Test case for Boolean Fill feature. Written on High API. from ModelAPI import * from GeomAPI import * -import model +from salome.shaper import model # Get session aSession = ModelAPI_Session.get() diff --git a/src/FeaturesPlugin/Test/TestBooleanSmash.py b/src/FeaturesPlugin/Test/TestBooleanSmash.py index 2190346cf..02d0606c7 100644 --- a/src/FeaturesPlugin/Test/TestBooleanSmash.py +++ b/src/FeaturesPlugin/Test/TestBooleanSmash.py @@ -103,5 +103,5 @@ assert (aBooleanResult is not None) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestCompositeFeaturesOnCompSolids.py b/src/FeaturesPlugin/Test/TestCompositeFeaturesOnCompSolids.py index 0e556e5fa..fceb782ff 100644 --- a/src/FeaturesPlugin/Test/TestCompositeFeaturesOnCompSolids.py +++ b/src/FeaturesPlugin/Test/TestCompositeFeaturesOnCompSolids.py @@ -225,5 +225,5 @@ assert (len(anRevolutionFuseFt.results()) > 0) aCurrentResult = modelAPI_ResultBody(anRevolutionFuseFt.firstResult()) assert (aCurrentResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestExtrusion.py b/src/FeaturesPlugin/Test/TestExtrusion.py index ea0865310..527dafeac 100644 --- a/src/FeaturesPlugin/Test/TestExtrusion.py +++ b/src/FeaturesPlugin/Test/TestExtrusion.py @@ -246,5 +246,5 @@ assert (anExtrusionResult is not None) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestExtrusionCut.py b/src/FeaturesPlugin/Test/TestExtrusionCut.py index 72a536f98..e461c50e1 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionCut.py +++ b/src/FeaturesPlugin/Test/TestExtrusionCut.py @@ -118,5 +118,5 @@ assert (len(anExtrusionCutFt.results()) > 0) aCurrentResult = modelAPI_ResultBody(anExtrusionCutFt.firstResult()) assert (aCurrentResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestExtrusionFuse.py b/src/FeaturesPlugin/Test/TestExtrusionFuse.py index e57883994..12693b837 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionFuse.py +++ b/src/FeaturesPlugin/Test/TestExtrusionFuse.py @@ -118,5 +118,5 @@ assert (len(anExtrusionFuseFt.results()) > 0) aCurrentResult = modelAPI_ResultBody(anExtrusionFuseFt.firstResult()) assert (aCurrentResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestIntersection.py b/src/FeaturesPlugin/Test/TestIntersection.py index 2915cff86..d1c0043a6 100644 --- a/src/FeaturesPlugin/Test/TestIntersection.py +++ b/src/FeaturesPlugin/Test/TestIntersection.py @@ -147,5 +147,5 @@ assert (len(anIntersectionFt.results()) > 0) anItersectionResult = modelAPI_ResultBody(anIntersectionFt.firstResult()) assert (anItersectionResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestMultiBoolean.py b/src/FeaturesPlugin/Test/TestMultiBoolean.py index b6a6e742c..aa36d8628 100644 --- a/src/FeaturesPlugin/Test/TestMultiBoolean.py +++ b/src/FeaturesPlugin/Test/TestMultiBoolean.py @@ -193,5 +193,5 @@ aSession.finishOperation() # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestPartition.py b/src/FeaturesPlugin/Test/TestPartition.py index dbc14ed94..127209b2a 100644 --- a/src/FeaturesPlugin/Test/TestPartition.py +++ b/src/FeaturesPlugin/Test/TestPartition.py @@ -130,5 +130,5 @@ assert (len(aPartitionFt.results()) > 0) aPartitionResult = modelAPI_ResultBody(aPartitionFt.firstResult()) assert (aPartitionResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestPipe.py b/src/FeaturesPlugin/Test/TestPipe.py index 57e371274..21ba065e1 100644 --- a/src/FeaturesPlugin/Test/TestPipe.py +++ b/src/FeaturesPlugin/Test/TestPipe.py @@ -164,5 +164,5 @@ aSession.finishOperation() # Test results assert (len(aPipeFeature.results()) > 0) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestPlacement.py b/src/FeaturesPlugin/Test/TestPlacement.py index 24619f217..39249d1ad 100644 --- a/src/FeaturesPlugin/Test/TestPlacement.py +++ b/src/FeaturesPlugin/Test/TestPlacement.py @@ -218,5 +218,5 @@ assert (len(aPlacementFt.results()) > 0) aPlacementResult = modelAPI_ResultBody(aPlacementFt.firstResult()) assert (aPlacementResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestRecover.py b/src/FeaturesPlugin/Test/TestRecover.py index d591a56d6..ab1251a56 100644 --- a/src/FeaturesPlugin/Test/TestRecover.py +++ b/src/FeaturesPlugin/Test/TestRecover.py @@ -1,7 +1,7 @@ # Test made with high level API # ----------------------------- -import model +from salome.shaper import model # Initialisation diff --git a/src/FeaturesPlugin/Test/TestRecover1798.py b/src/FeaturesPlugin/Test/TestRecover1798.py index fafce818f..2e9a23b3d 100644 --- a/src/FeaturesPlugin/Test/TestRecover1798.py +++ b/src/FeaturesPlugin/Test/TestRecover1798.py @@ -1,4 +1,4 @@ -import model +from salome.shaper import model model.begin() partSet = model.moduleDocument() diff --git a/src/FeaturesPlugin/Test/TestRemoveSubShapes.py b/src/FeaturesPlugin/Test/TestRemoveSubShapes.py index 713e7e94e..6227d4580 100644 --- a/src/FeaturesPlugin/Test/TestRemoveSubShapes.py +++ b/src/FeaturesPlugin/Test/TestRemoveSubShapes.py @@ -73,5 +73,5 @@ assert (len(aRemoveSubShapesFeature.results()) > 0) anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aRemoveSubShapesFeature.firstResult())) assert (anUnionResult.numberOfSubs() == 2) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestRevolution.py b/src/FeaturesPlugin/Test/TestRevolution.py index cfac07013..28aba7762 100644 --- a/src/FeaturesPlugin/Test/TestRevolution.py +++ b/src/FeaturesPlugin/Test/TestRevolution.py @@ -207,5 +207,5 @@ assert (len(aRevolFt.results()) > 0) aRevolResult = modelAPI_ResultBody(aRevolFt.firstResult()) assert (aRevolResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestRevolutionCut.py b/src/FeaturesPlugin/Test/TestRevolutionCut.py index 6ec4eb3b5..c9b10c8fe 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionCut.py +++ b/src/FeaturesPlugin/Test/TestRevolutionCut.py @@ -145,5 +145,5 @@ assert (len(anRevolutionCutFt.results()) > 0) aCurrentResult = modelAPI_ResultBody(anRevolutionCutFt.firstResult()) assert (aCurrentResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestRevolutionFuse.py b/src/FeaturesPlugin/Test/TestRevolutionFuse.py index 807a4d443..863d2a6d0 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionFuse.py +++ b/src/FeaturesPlugin/Test/TestRevolutionFuse.py @@ -173,5 +173,5 @@ assert (len(anRevolutionFuseFt.results()) > 0) aCurrentResult = modelAPI_ResultBody(anRevolutionFuseFt.firstResult()) assert (aCurrentResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestRotation.py b/src/FeaturesPlugin/Test/TestRotation.py index 9cd1479c5..3b50fa66c 100644 --- a/src/FeaturesPlugin/Test/TestRotation.py +++ b/src/FeaturesPlugin/Test/TestRotation.py @@ -132,5 +132,5 @@ assert (len(aRotateFt.results()) > 0) aMoveResult = modelAPI_ResultBody(aRotateFt.firstResult()) assert (aMoveResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestSerialBoolean.py b/src/FeaturesPlugin/Test/TestSerialBoolean.py index 9b248edcc..7adf33624 100644 --- a/src/FeaturesPlugin/Test/TestSerialBoolean.py +++ b/src/FeaturesPlugin/Test/TestSerialBoolean.py @@ -193,5 +193,5 @@ aSession.finishOperation() # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestTranslation.py b/src/FeaturesPlugin/Test/TestTranslation.py index 59208b43c..f6d95033d 100644 --- a/src/FeaturesPlugin/Test/TestTranslation.py +++ b/src/FeaturesPlugin/Test/TestTranslation.py @@ -133,5 +133,5 @@ assert (len(aMoveFt.results()) > 0) aMoveResult = modelAPI_ResultBody(aMoveFt.firstResult()) assert (aMoveResult is not None) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestUnion.py b/src/FeaturesPlugin/Test/TestUnion.py index eb4be902a..2b6f931ac 100644 --- a/src/FeaturesPlugin/Test/TestUnion.py +++ b/src/FeaturesPlugin/Test/TestUnion.py @@ -74,5 +74,5 @@ assert (len(aUnionFeature.results()) > 0) anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aUnionFeature.firstResult())) assert (anUnionResult.numberOfSubs() == 0) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ModelAPI/Test/Test1064.py b/src/ModelAPI/Test/Test1064.py index 4f433271e..f0af7ad98 100644 --- a/src/ModelAPI/Test/Test1064.py +++ b/src/ModelAPI/Test/Test1064.py @@ -106,5 +106,5 @@ assert(aPln.direction().z() == 0.) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ModelAPI/Test/Test1512.py b/src/ModelAPI/Test/Test1512.py index 491061c9b..21fce85e8 100755 --- a/src/ModelAPI/Test/Test1512.py +++ b/src/ModelAPI/Test/Test1512.py @@ -150,5 +150,5 @@ assert(aFuse.firstResult().shape().isConnectedTopology() == False) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ModelAPI/Test/Test1757.py b/src/ModelAPI/Test/Test1757.py index ccd4b625e..c67c23339 100644 --- a/src/ModelAPI/Test/Test1757.py +++ b/src/ModelAPI/Test/Test1757.py @@ -7,7 +7,7 @@ """ -import model +from salome.shaper import model #========================================================================= # Initialize a part diff --git a/src/ModelAPI/Test/TestDocument.py b/src/ModelAPI/Test/TestDocument.py index 7ff8a9450..90bcf24cf 100644 --- a/src/ModelAPI/Test/TestDocument.py +++ b/src/ModelAPI/Test/TestDocument.py @@ -89,5 +89,5 @@ aSession.finishOperation() assert(aSession.moduleDocument().size("Parts") == 0) assert(aSession.activeDocument()) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ModelAPI/Test/TestResults.py b/src/ModelAPI/Test/TestResults.py index b7e928d57..c7fa250be 100755 --- a/src/ModelAPI/Test/TestResults.py +++ b/src/ModelAPI/Test/TestResults.py @@ -41,5 +41,5 @@ assert(aColors.value(1) == 200) assert(aColors.value(2) == 250) aSession.finishOperation() -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ModelAPI/Test/TestUndoRedo.py b/src/ModelAPI/Test/TestUndoRedo.py index db93001c3..d4748a02d 100644 --- a/src/ModelAPI/Test/TestUndoRedo.py +++ b/src/ModelAPI/Test/TestUndoRedo.py @@ -33,5 +33,5 @@ assert(aDoc.size("Construction") == 8) assert(aSession.canUndo()) assert(not aSession.canRedo()) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ModelGeomAlgo/Test/TestPoint2D.py b/src/ModelGeomAlgo/Test/TestPoint2D.py index b43279ad5..6d5cf94b9 100755 --- a/src/ModelGeomAlgo/Test/TestPoint2D.py +++ b/src/ModelGeomAlgo/Test/TestPoint2D.py @@ -16,5 +16,5 @@ __updated__ = "2016-07-20" aSession = ModelAPI_Session.get() -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp index 1ea7a1f82..effc2d1d3 100644 --- a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp @@ -367,7 +367,7 @@ bool ModelHighAPI_Dumper::exportTo(const std::string& theFileName) if (!myModules.empty()) aFile << std::endl; - aFile << "import model" << std::endl << std::endl; + aFile << "from salome.shaper import model" << std::endl << std::endl; aFile << "model.begin()" << std::endl; // dump collected data diff --git a/src/ModelHighAPI/Test/TestDeflectionDump.py b/src/ModelHighAPI/Test/TestDeflectionDump.py index 668f7c9e1..d9dac2b06 100644 --- a/src/ModelHighAPI/Test/TestDeflectionDump.py +++ b/src/ModelHighAPI/Test/TestDeflectionDump.py @@ -1,4 +1,4 @@ -import model +from salome.shaper import model model.begin() partSet = model.moduleDocument() diff --git a/src/ModelHighAPI/Test/TestRefAttr.py b/src/ModelHighAPI/Test/TestRefAttr.py index a57ce9224..2aa692e42 100644 --- a/src/ModelHighAPI/Test/TestRefAttr.py +++ b/src/ModelHighAPI/Test/TestRefAttr.py @@ -2,7 +2,7 @@ import unittest import ModelAPI import ModelHighAPI -import model +from salome.shaper import model class FeaturesFixture(unittest.TestCase): diff --git a/src/ModelHighAPI/Test/TestReference.py b/src/ModelHighAPI/Test/TestReference.py index 136894e25..9abee9838 100644 --- a/src/ModelHighAPI/Test/TestReference.py +++ b/src/ModelHighAPI/Test/TestReference.py @@ -2,7 +2,7 @@ import unittest import ModelAPI import ModelHighAPI -import model +from salome.shaper import model class FeaturesFixture(unittest.TestCase): diff --git a/src/ParametersPlugin/Test/Test1806.py b/src/ParametersPlugin/Test/Test1806.py index 096a9657b..2f478e8fa 100644 --- a/src/ParametersPlugin/Test/Test1806.py +++ b/src/ParametersPlugin/Test/Test1806.py @@ -47,5 +47,5 @@ assert(aDistance.real("ConstraintValue").value() == 12.5) #========================================================================= # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ParametersPlugin/Test/TestParameterChangeValue.py b/src/ParametersPlugin/Test/TestParameterChangeValue.py index d9941dad1..3d6d9e230 100644 --- a/src/ParametersPlugin/Test/TestParameterChangeValue.py +++ b/src/ParametersPlugin/Test/TestParameterChangeValue.py @@ -23,7 +23,7 @@ from GeomDataAPI import * from ModelAPI import * import math import unittest -import model +from salome.shaper import model __updated__ = "2015-04-27" diff --git a/src/ParametersPlugin/Test/TestParameterCreation.py b/src/ParametersPlugin/Test/TestParameterCreation.py index e4ac3fee0..ad85bdf51 100644 --- a/src/ParametersPlugin/Test/TestParameterCreation.py +++ b/src/ParametersPlugin/Test/TestParameterCreation.py @@ -164,5 +164,5 @@ assert(aLengthAttr.value() == 250.) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/ParametersPlugin/Test/TestParameterRename.py b/src/ParametersPlugin/Test/TestParameterRename.py index 10f854a3b..414133829 100644 --- a/src/ParametersPlugin/Test/TestParameterRename.py +++ b/src/ParametersPlugin/Test/TestParameterRename.py @@ -23,7 +23,7 @@ from GeomDataAPI import * from ModelAPI import * import math import unittest -import model +from salome.shaper import model __updated__ = "2015-04-27" diff --git a/src/PartSetAPI/Test/TestRemoveDuplicate.py b/src/PartSetAPI/Test/TestRemoveDuplicate.py index 466d310bf..66523e08e 100644 --- a/src/PartSetAPI/Test/TestRemoveDuplicate.py +++ b/src/PartSetAPI/Test/TestRemoveDuplicate.py @@ -1,7 +1,7 @@ # Created a Part Remove/Duplicate API functionality since from low level and python dump it is not # tested: feature history infor is not stored. -import model +from salome.shaper import model # prepare axis created by PartSet and Part points model.begin() diff --git a/src/PrimitivesPlugin/Test/TestBox.py b/src/PrimitivesPlugin/Test/TestBox.py index 3caff58e0..08b2d9f27 100644 --- a/src/PrimitivesPlugin/Test/TestBox.py +++ b/src/PrimitivesPlugin/Test/TestBox.py @@ -5,7 +5,7 @@ Written on High API. from ModelAPI import * from GeomAPI import * -import model +from salome.shaper import model # Get session aSession = ModelAPI_Session.get() diff --git a/src/PythonAPI/CMakeLists.txt b/src/PythonAPI/CMakeLists.txt index a72cecb7f..339fcc396 100644 --- a/src/PythonAPI/CMakeLists.txt +++ b/src/PythonAPI/CMakeLists.txt @@ -1,7 +1,7 @@ ## Copyright (C) 2014-20xx OPEN CASCADE INSTALL(DIRECTORY geom model examples DESTINATION ${SHAPER_INSTALL_PYTHON_API}) -INSTALL(FILES shaper.py DESTINATION ${SHAPER_INSTALL_PYTHON_API}) +INSTALL(FILES __init__.py DESTINATION ${SHAPER_INSTALL_PYTHON_API}) # --------- Unit tests ----------- INCLUDE(UnitTest) diff --git a/src/PythonAPI/Test/TestFeatures.py b/src/PythonAPI/Test/TestFeatures.py index 549d6583b..2354c151c 100644 --- a/src/PythonAPI/Test/TestFeatures.py +++ b/src/PythonAPI/Test/TestFeatures.py @@ -2,7 +2,7 @@ import unittest import ModelAPI -import model +from salome.shaper import model #----------------------------------------------------------------------------- # Fixtures diff --git a/src/PythonAPI/Test/TestFeaturesExtrusion.py b/src/PythonAPI/Test/TestFeaturesExtrusion.py index 54e4f3ccc..b68759771 100644 --- a/src/PythonAPI/Test/TestFeaturesExtrusion.py +++ b/src/PythonAPI/Test/TestFeaturesExtrusion.py @@ -2,7 +2,7 @@ import unittest import ModelAPI -import model +from salome.shaper import model #----------------------------------------------------------------------------- # Fixtures diff --git a/src/PythonAPI/Test/TestFeaturesRevolution.py b/src/PythonAPI/Test/TestFeaturesRevolution.py index 90d9af9f6..e0d2823c2 100644 --- a/src/PythonAPI/Test/TestFeaturesRevolution.py +++ b/src/PythonAPI/Test/TestFeaturesRevolution.py @@ -2,7 +2,7 @@ import unittest import ModelAPI -import model +from salome.shaper import model #----------------------------------------------------------------------------- # Fixtures diff --git a/src/PythonAPI/Test/TestMakeBrick1.py b/src/PythonAPI/Test/TestMakeBrick1.py index 2225919c0..7c0c686d9 100644 --- a/src/PythonAPI/Test/TestMakeBrick1.py +++ b/src/PythonAPI/Test/TestMakeBrick1.py @@ -1,6 +1,6 @@ import unittest -import examples.MakeBrick1 +import salome.shaper.examples.MakeBrick1 if __name__ == "__main__": unittest.main() diff --git a/src/PythonAPI/Test/TestMakeBrick2.py b/src/PythonAPI/Test/TestMakeBrick2.py index 21ea7263e..719b632f4 100644 --- a/src/PythonAPI/Test/TestMakeBrick2.py +++ b/src/PythonAPI/Test/TestMakeBrick2.py @@ -1,6 +1,6 @@ import unittest -import examples.MakeBrick2 +import salome.shaper.examples.MakeBrick2 if __name__ == "__main__": unittest.main() diff --git a/src/PythonAPI/Test/TestModel.py b/src/PythonAPI/Test/TestModel.py index 0a204cf0b..9a395563f 100644 --- a/src/PythonAPI/Test/TestModel.py +++ b/src/PythonAPI/Test/TestModel.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model class ModelTestCase(unittest.TestCase): def setUp(self): diff --git a/src/PythonAPI/Test/TestPlatine.py b/src/PythonAPI/Test/TestPlatine.py index 498be7750..1a879d8d6 100644 --- a/src/PythonAPI/Test/TestPlatine.py +++ b/src/PythonAPI/Test/TestPlatine.py @@ -1,6 +1,6 @@ import unittest -import examples.Platine +import salome.shaper.examples.Platine if __name__ == "__main__": unittest.main() diff --git a/src/PythonAPI/Test/TestPrimitivesBox.py b/src/PythonAPI/Test/TestPrimitivesBox.py index 692a1c502..ba53513b5 100644 --- a/src/PythonAPI/Test/TestPrimitivesBox.py +++ b/src/PythonAPI/Test/TestPrimitivesBox.py @@ -2,7 +2,7 @@ import unittest import ModelAPI -import model +from salome.shaper import model class PrimitivesAddBox(unittest.TestCase): diff --git a/src/PythonAPI/Test/TestPythonAPI.py b/src/PythonAPI/Test/TestPythonAPI.py index e1fe33712..a175ed27a 100644 --- a/src/PythonAPI/Test/TestPythonAPI.py +++ b/src/PythonAPI/Test/TestPythonAPI.py @@ -1,6 +1,6 @@ import unittest -import model -import geom +from salome.shaper import model +from salome.shaper import geom if __name__ == "__main__": unittest.main() diff --git a/src/PythonAPI/Test/TestSketcher.py b/src/PythonAPI/Test/TestSketcher.py index d41f7ddcf..443912b7f 100644 --- a/src/PythonAPI/Test/TestSketcher.py +++ b/src/PythonAPI/Test/TestSketcher.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model # Delta value for almost equal comparisons DELTA = 1e-10 diff --git a/src/PythonAPI/Test/TestSketcherAddArc.py b/src/PythonAPI/Test/TestSketcherAddArc.py index 551c4a880..11e74e46d 100644 --- a/src/PythonAPI/Test/TestSketcherAddArc.py +++ b/src/PythonAPI/Test/TestSketcherAddArc.py @@ -1,7 +1,7 @@ import unittest -import model -import geom +from salome.shaper import model +from salome.shaper import geom from TestSketcher import SketcherTestCase diff --git a/src/PythonAPI/Test/TestSketcherAddCircle.py b/src/PythonAPI/Test/TestSketcherAddCircle.py index 6b1c3399e..e1ed1fcfb 100644 --- a/src/PythonAPI/Test/TestSketcherAddCircle.py +++ b/src/PythonAPI/Test/TestSketcherAddCircle.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherAddCircle(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherAddLine.py b/src/PythonAPI/Test/TestSketcherAddLine.py index 25f53b338..718dcdd77 100644 --- a/src/PythonAPI/Test/TestSketcherAddLine.py +++ b/src/PythonAPI/Test/TestSketcherAddLine.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherAddLine(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherAddMirror.py b/src/PythonAPI/Test/TestSketcherAddMirror.py index e74b8ea3f..032bff237 100644 --- a/src/PythonAPI/Test/TestSketcherAddMirror.py +++ b/src/PythonAPI/Test/TestSketcherAddMirror.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase from ModelAPI import * from GeomDataAPI import geomDataAPI_Point2D diff --git a/src/PythonAPI/Test/TestSketcherAddPoint.py b/src/PythonAPI/Test/TestSketcherAddPoint.py index 8adf1574d..0a8086848 100644 --- a/src/PythonAPI/Test/TestSketcherAddPoint.py +++ b/src/PythonAPI/Test/TestSketcherAddPoint.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherAddPoint(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherSetAngle.py b/src/PythonAPI/Test/TestSketcherSetAngle.py index 7dd937902..3ab267391 100644 --- a/src/PythonAPI/Test/TestSketcherSetAngle.py +++ b/src/PythonAPI/Test/TestSketcherSetAngle.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model import math import TestSketcher from TestSketcher import SketcherTestCase diff --git a/src/PythonAPI/Test/TestSketcherSetCoincident.py b/src/PythonAPI/Test/TestSketcherSetCoincident.py index a964e59a9..4fe193ac6 100644 --- a/src/PythonAPI/Test/TestSketcherSetCoincident.py +++ b/src/PythonAPI/Test/TestSketcherSetCoincident.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherSetCoincident(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherSetEqual.py b/src/PythonAPI/Test/TestSketcherSetEqual.py index 9ffdb8774..b803cb74f 100644 --- a/src/PythonAPI/Test/TestSketcherSetEqual.py +++ b/src/PythonAPI/Test/TestSketcherSetEqual.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model import math import TestSketcher from TestSketcher import SketcherTestCase diff --git a/src/PythonAPI/Test/TestSketcherSetFillet.py b/src/PythonAPI/Test/TestSketcherSetFillet.py index 95b3d3998..f7e8260f0 100644 --- a/src/PythonAPI/Test/TestSketcherSetFillet.py +++ b/src/PythonAPI/Test/TestSketcherSetFillet.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherSetFillet(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherSetFixed.py b/src/PythonAPI/Test/TestSketcherSetFixed.py index 87d3dee5e..4d14738f2 100644 --- a/src/PythonAPI/Test/TestSketcherSetFixed.py +++ b/src/PythonAPI/Test/TestSketcherSetFixed.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherSetFixed(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherSetHorizontal.py b/src/PythonAPI/Test/TestSketcherSetHorizontal.py index 68f23d352..ecb3b4b67 100644 --- a/src/PythonAPI/Test/TestSketcherSetHorizontal.py +++ b/src/PythonAPI/Test/TestSketcherSetHorizontal.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherSetHorizontal(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherSetLength.py b/src/PythonAPI/Test/TestSketcherSetLength.py index 6a4997c80..fe005dae9 100644 --- a/src/PythonAPI/Test/TestSketcherSetLength.py +++ b/src/PythonAPI/Test/TestSketcherSetLength.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model import math import TestSketcher from TestSketcher import SketcherTestCase diff --git a/src/PythonAPI/Test/TestSketcherSetParallel.py b/src/PythonAPI/Test/TestSketcherSetParallel.py index 859773b01..d70f6c893 100644 --- a/src/PythonAPI/Test/TestSketcherSetParallel.py +++ b/src/PythonAPI/Test/TestSketcherSetParallel.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherSetParallel(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherSetPerpendicular.py b/src/PythonAPI/Test/TestSketcherSetPerpendicular.py index cc4e3e795..fe2bf7613 100644 --- a/src/PythonAPI/Test/TestSketcherSetPerpendicular.py +++ b/src/PythonAPI/Test/TestSketcherSetPerpendicular.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model import TestSketcher from TestSketcher import SketcherTestCase diff --git a/src/PythonAPI/Test/TestSketcherSetRadius.py b/src/PythonAPI/Test/TestSketcherSetRadius.py index d713ab7ae..f49a3db2b 100644 --- a/src/PythonAPI/Test/TestSketcherSetRadius.py +++ b/src/PythonAPI/Test/TestSketcherSetRadius.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherSetRadius(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherSetTangent.py b/src/PythonAPI/Test/TestSketcherSetTangent.py index f90f3e58e..b2464370d 100644 --- a/src/PythonAPI/Test/TestSketcherSetTangent.py +++ b/src/PythonAPI/Test/TestSketcherSetTangent.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherSetTangent(SketcherTestCase): diff --git a/src/PythonAPI/Test/TestSketcherSetVertical.py b/src/PythonAPI/Test/TestSketcherSetVertical.py index 3a4be2488..e77fcbfa6 100644 --- a/src/PythonAPI/Test/TestSketcherSetVertical.py +++ b/src/PythonAPI/Test/TestSketcherSetVertical.py @@ -1,5 +1,5 @@ import unittest -import model +from salome.shaper import model from TestSketcher import SketcherTestCase class SketcherSetVertical(SketcherTestCase): diff --git a/src/PythonAPI/__init__.py b/src/PythonAPI/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/PythonAPI/doc/source/index.rst b/src/PythonAPI/doc/source/index.rst index 8d06304bf..5140367bd 100644 --- a/src/PythonAPI/doc/source/index.rst +++ b/src/PythonAPI/doc/source/index.rst @@ -19,7 +19,7 @@ with the parametric API will typically begin with a code like below: .. doctest:: - >>> import model + >>> from salome.shaper import model >>> model.begin() >>> partset = model.moduleDocument() >>> part = model.addPart(partset).document() diff --git a/src/PythonAPI/doc/source/model/extrusion.rst b/src/PythonAPI/doc/source/model/extrusion.rst index 2f81a25c6..dce320d6d 100644 --- a/src/PythonAPI/doc/source/model/extrusion.rst +++ b/src/PythonAPI/doc/source/model/extrusion.rst @@ -3,7 +3,7 @@ Extrusion .. testsetup:: - import model + from salome.shaper import model model.begin() partset = model.moduleDocument() part = model.addPart(partset).document() diff --git a/src/PythonAPI/examples/MakeBrick1.py b/src/PythonAPI/examples/MakeBrick1.py index 6434488d4..3af36f897 100644 --- a/src/PythonAPI/examples/MakeBrick1.py +++ b/src/PythonAPI/examples/MakeBrick1.py @@ -2,7 +2,7 @@ # Author: Daniel Brunier-Coulin # ----------------------------- -import model +from salome.shaper import model # Initialisation diff --git a/src/PythonAPI/examples/MakeBrick2.py b/src/PythonAPI/examples/MakeBrick2.py index 843773eeb..267cc692d 100644 --- a/src/PythonAPI/examples/MakeBrick2.py +++ b/src/PythonAPI/examples/MakeBrick2.py @@ -2,8 +2,8 @@ # Author: Daniel Brunier-Coulin # ----------------------------- -import model -import geom +from salome.shaper import model +from salome.shaper import geom # Initialisation diff --git a/src/PythonAPI/examples/Platine.py b/src/PythonAPI/examples/Platine.py index c4c9254e1..4813fa702 100644 --- a/src/PythonAPI/examples/Platine.py +++ b/src/PythonAPI/examples/Platine.py @@ -2,8 +2,8 @@ # Author: Sergey POKHODENKO # ----------------------------- -import geom -import model +from salome.shaper import geom +from salome.shaper import model # START DEBUG PURPOSES # Should be removed diff --git a/src/PythonAPI/shaper.py b/src/PythonAPI/shaper.py deleted file mode 100644 index b2eb4d419..000000000 --- a/src/PythonAPI/shaper.py +++ /dev/null @@ -1,7 +0,0 @@ -"""This package defines the Python API of the Shaper. -""" - -# Main packages - -import geom -import model diff --git a/src/PythonAddons/Test/TestRectangle.py b/src/PythonAddons/Test/TestRectangle.py index 0efe470f6..bfe45017b 100644 --- a/src/PythonAddons/Test/TestRectangle.py +++ b/src/PythonAddons/Test/TestRectangle.py @@ -1,5 +1,5 @@ -import model -import geom +from salome.shaper import model +from salome.shaper import geom model.begin() partSet = model.moduleDocument() diff --git a/src/PythonAddons/macros/box/feature.py b/src/PythonAddons/macros/box/feature.py index 18f4b24f6..8c580cdc8 100644 --- a/src/PythonAddons/macros/box/feature.py +++ b/src/PythonAddons/macros/box/feature.py @@ -3,8 +3,8 @@ Authors: Renaud Nedelec - Daniel Brunier-Coulin Copyright (C) 2014-20xx CEA/DEN, EDF R&D """ -import model -import geom +from salome.shaper import model +from salome.shaper import geom class BoxFeature(model.Feature): diff --git a/src/PythonAddons/macros/rectangle/feature.py b/src/PythonAddons/macros/rectangle/feature.py index 3fa05afc1..8a5cfa6b7 100644 --- a/src/PythonAddons/macros/rectangle/feature.py +++ b/src/PythonAddons/macros/rectangle/feature.py @@ -4,7 +4,7 @@ Author: Artem ZHIDKOV Copyright (C) 2016-20xx CEA/DEN, EDF R&D """ -import model +from salome.shaper import model import ModelAPI import GeomDataAPI diff --git a/src/SketchPlugin/Test/TestConstraintAngle.py b/src/SketchPlugin/Test/TestConstraintAngle.py index 307025260..83a333546 100644 --- a/src/SketchPlugin/Test/TestConstraintAngle.py +++ b/src/SketchPlugin/Test/TestConstraintAngle.py @@ -149,5 +149,5 @@ assert (angle(aSketchLineA, aSketchLineB) == NEW_ANGLE_DEGREE) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintCoincidence.py b/src/SketchPlugin/Test/TestConstraintCoincidence.py index a1697920e..9bc2f2808 100644 --- a/src/SketchPlugin/Test/TestConstraintCoincidence.py +++ b/src/SketchPlugin/Test/TestConstraintCoincidence.py @@ -210,5 +210,5 @@ assert (aCircleCenter.x() == 0. and aCircleCenter.y() == 0.) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintCollinear.py b/src/SketchPlugin/Test/TestConstraintCollinear.py index b5d898273..cb7e090ec 100644 --- a/src/SketchPlugin/Test/TestConstraintCollinear.py +++ b/src/SketchPlugin/Test/TestConstraintCollinear.py @@ -101,5 +101,5 @@ checkCollinear(aSketchLineA, aSketchLineB) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintDistance.py b/src/SketchPlugin/Test/TestConstraintDistance.py index 38761a36d..738bab161 100644 --- a/src/SketchPlugin/Test/TestConstraintDistance.py +++ b/src/SketchPlugin/Test/TestConstraintDistance.py @@ -186,5 +186,5 @@ assert (math.fabs(distancePointPoint(aLineAStartPoint, aLineAEndPoint) - PT_LINE # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintEqual.py b/src/SketchPlugin/Test/TestConstraintEqual.py index 2d38a28f8..e78dd6837 100644 --- a/src/SketchPlugin/Test/TestConstraintEqual.py +++ b/src/SketchPlugin/Test/TestConstraintEqual.py @@ -201,5 +201,5 @@ assert (math.fabs(aLine2Len - anExtLineLen) < 1.e-10) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintHorizontal.py b/src/SketchPlugin/Test/TestConstraintHorizontal.py index dc0b226d2..f0a55dfe7 100644 --- a/src/SketchPlugin/Test/TestConstraintHorizontal.py +++ b/src/SketchPlugin/Test/TestConstraintHorizontal.py @@ -75,5 +75,5 @@ assert(aLineStartPoint.y() == aLineEndPoint.y()) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintLength.py b/src/SketchPlugin/Test/TestConstraintLength.py index 72db4d76f..3d49d5317 100644 --- a/src/SketchPlugin/Test/TestConstraintLength.py +++ b/src/SketchPlugin/Test/TestConstraintLength.py @@ -95,5 +95,5 @@ assert (math.fabs(aLineAEndPoint.x() - aLineAStartPoint.x() - 140) < 1.e-10) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintMiddlePoint.py b/src/SketchPlugin/Test/TestConstraintMiddlePoint.py index 39db68220..ebda3620e 100644 --- a/src/SketchPlugin/Test/TestConstraintMiddlePoint.py +++ b/src/SketchPlugin/Test/TestConstraintMiddlePoint.py @@ -141,5 +141,5 @@ assert (anOriginCoord.x() == 0. and anOriginCoord.y() == 0.) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintMirror.py b/src/SketchPlugin/Test/TestConstraintMirror.py index 3f5ae6924..f74af0803 100644 --- a/src/SketchPlugin/Test/TestConstraintMirror.py +++ b/src/SketchPlugin/Test/TestConstraintMirror.py @@ -223,5 +223,5 @@ assert (aRefListB.size() == 1) assert (aRefListC.size() == 1) checkMirror(aRefListB, aRefListC, aMirrorLine) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintParallel.py b/src/SketchPlugin/Test/TestConstraintParallel.py index 076b2fc62..2dd6ce202 100644 --- a/src/SketchPlugin/Test/TestConstraintParallel.py +++ b/src/SketchPlugin/Test/TestConstraintParallel.py @@ -109,5 +109,5 @@ assert (aLineBEndPointPrev != aLineBEndPointNew) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintPerpendicular.py b/src/SketchPlugin/Test/TestConstraintPerpendicular.py index 42c2c9857..f1d321362 100644 --- a/src/SketchPlugin/Test/TestConstraintPerpendicular.py +++ b/src/SketchPlugin/Test/TestConstraintPerpendicular.py @@ -122,5 +122,5 @@ assert (aLineBEndPointPrev != (aLineBEndPoint.x(), aLineBEndPoint.y())) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintRadius.py b/src/SketchPlugin/Test/TestConstraintRadius.py index acef6c2f0..9513b01ea 100644 --- a/src/SketchPlugin/Test/TestConstraintRadius.py +++ b/src/SketchPlugin/Test/TestConstraintRadius.py @@ -151,5 +151,5 @@ assert (aCircleRadius.value() == 25) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintRigid.py b/src/SketchPlugin/Test/TestConstraintRigid.py index 44f741503..e3f43b513 100644 --- a/src/SketchPlugin/Test/TestConstraintRigid.py +++ b/src/SketchPlugin/Test/TestConstraintRigid.py @@ -136,5 +136,5 @@ assert ((aLineCStartPoint.x(), aLineCStartPoint.y()) == (aLineBEndPoint.x(), aLi # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintTangent.py b/src/SketchPlugin/Test/TestConstraintTangent.py index 24762159f..90d6cd8fa 100644 --- a/src/SketchPlugin/Test/TestConstraintTangent.py +++ b/src/SketchPlugin/Test/TestConstraintTangent.py @@ -306,5 +306,5 @@ assert(math.fabs(distancePointLine(aCircleCenter, aLine) - round(aCircleRadius.v # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestConstraintVertical.py b/src/SketchPlugin/Test/TestConstraintVertical.py index f70040248..8bbc541cd 100644 --- a/src/SketchPlugin/Test/TestConstraintVertical.py +++ b/src/SketchPlugin/Test/TestConstraintVertical.py @@ -75,5 +75,5 @@ assert(aLineStartPoint.x() == aLineEndPoint.x()) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestFillet.py b/src/SketchPlugin/Test/TestFillet.py index 5b7bebb29..e005bee4e 100644 --- a/src/SketchPlugin/Test/TestFillet.py +++ b/src/SketchPlugin/Test/TestFillet.py @@ -279,5 +279,5 @@ checkFillet(aResObjects, FILLET_RADIUS2) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestHighload.py b/src/SketchPlugin/Test/TestHighload.py index 820753739..f78be7ff2 100644 --- a/src/SketchPlugin/Test/TestHighload.py +++ b/src/SketchPlugin/Test/TestHighload.py @@ -121,5 +121,5 @@ aSession.finishOperation() # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestMultiRotation.py b/src/SketchPlugin/Test/TestMultiRotation.py index 2afda3716..2a61103ec 100644 --- a/src/SketchPlugin/Test/TestMultiRotation.py +++ b/src/SketchPlugin/Test/TestMultiRotation.py @@ -220,5 +220,5 @@ checkRotation(aRotated, aNbCopies.value(), CENTER_X, CENTER_Y, ANGLE) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestMultiTranslation.py b/src/SketchPlugin/Test/TestMultiTranslation.py index 0d3971e27..edb25d517 100644 --- a/src/SketchPlugin/Test/TestMultiTranslation.py +++ b/src/SketchPlugin/Test/TestMultiTranslation.py @@ -211,5 +211,5 @@ checkTranslation(aTranslated, aNbCopies.value(), DELTA_X, DELTA_Y) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestProjection.py b/src/SketchPlugin/Test/TestProjection.py index ee3151c43..45cc13a66 100644 --- a/src/SketchPlugin/Test/TestProjection.py +++ b/src/SketchPlugin/Test/TestProjection.py @@ -126,5 +126,5 @@ assert(math.fabs(aProjLineEnd.y() - aLineEnd.y()) < 1.e-10) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestRectangle.py b/src/SketchPlugin/Test/TestRectangle.py index b822c58d3..a2edbe9d3 100644 --- a/src/SketchPlugin/Test/TestRectangle.py +++ b/src/SketchPlugin/Test/TestRectangle.py @@ -89,5 +89,5 @@ assert (aNbLines == 4) # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestSketchArcCircle.py b/src/SketchPlugin/Test/TestSketchArcCircle.py index ed61f3fae..677de24e5 100644 --- a/src/SketchPlugin/Test/TestSketchArcCircle.py +++ b/src/SketchPlugin/Test/TestSketchArcCircle.py @@ -244,5 +244,5 @@ aSession.finishOperation() # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestSketchPointLine.py b/src/SketchPlugin/Test/TestSketchPointLine.py index f7880bf34..0d3df2d14 100644 --- a/src/SketchPlugin/Test/TestSketchPointLine.py +++ b/src/SketchPlugin/Test/TestSketchPointLine.py @@ -95,5 +95,5 @@ aShape = aResultConstruction.shape() assert (aShape is not None) assert (not aShape.isNull()) -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestSnowflake.py b/src/SketchPlugin/Test/TestSnowflake.py index 3e8b9e004..dd2be72e7 100644 --- a/src/SketchPlugin/Test/TestSnowflake.py +++ b/src/SketchPlugin/Test/TestSnowflake.py @@ -156,5 +156,5 @@ aSession.finishOperation() # End of test #========================================================================= -import model +from salome.shaper import model assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/TestSplit.py b/src/SketchPlugin/Test/TestSplit.py index 82eacfbfd..addf8e462 100644 --- a/src/SketchPlugin/Test/TestSplit.py +++ b/src/SketchPlugin/Test/TestSplit.py @@ -1,4 +1,4 @@ -import model +from salome.shaper import model from ModelAPI import * -- 2.30.2