From 00f655d884d3496180b401f1d304cb82aada037e Mon Sep 17 00:00:00 2001 From: prascle Date: Mon, 25 Feb 2013 10:20:36 +0000 Subject: [PATCH] PR: fix dump and compatibility with previous scripts --- src/GEOM/GEOM_Engine.cxx | 4 ++-- src/GEOM_SWIG/geompy.py | 2 +- src/GEOM_SWIG/gsketcher.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index 7d06054bb..e9254db52 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -602,13 +602,13 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID, } aScript = "import GEOM\n"; - aScript += "import geompyDC\n"; + aScript += "from salome.geom import geomBuilder\n"; aScript += "import math\n"; aScript += "import SALOMEDS\n\n"; if( isMultiFile ) aScript += "def RebuildData(theStudy):"; - aScript += "\n\tgeompy = geompyDC.geomInstance(theStudy)\n"; + aScript += "\n\tgeompy = geomBuilder.New(theStudy)\n"; AddTextures(theDocID, aScript); diff --git a/src/GEOM_SWIG/geompy.py b/src/GEOM_SWIG/geompy.py index 3c6f09fa9..d92c2a19c 100644 --- a/src/GEOM_SWIG/geompy.py +++ b/src/GEOM_SWIG/geompy.py @@ -35,7 +35,7 @@ from salome import * try: # get GEOM engine and initialize GEOM with current study engineGeom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" ) - geom = geomBuilder.geomInstance(salome.myStudy, engineGeom) + geom = geomBuilder.New(salome.myStudy, engineGeom) # export the methods of geomBuilder for k in dir( geom ): diff --git a/src/GEOM_SWIG/gsketcher.py b/src/GEOM_SWIG/gsketcher.py index bb6dc9c95..d2e69a97e 100644 --- a/src/GEOM_SWIG/gsketcher.py +++ b/src/GEOM_SWIG/gsketcher.py @@ -275,7 +275,7 @@ class Sketcher3D: sk.addPointsRelative(0,0,130, 70,0,-130) a3D_Sketcher_1 = sk.wire() """ - from geomBuilder import ParseSketcherCommand, RaiseIfFailed + from salome.geom.geomBuilder import ParseSketcherCommand, RaiseIfFailed Command,Parameters = ParseSketcherCommand(self.myCommand) wire = self.geompyD.CurvesOp.Make3DSketcherCommand(Command) self.myCommand = "3DSketcher" -- 2.39.2