PR: fix dump and compatibility with previous scripts

This commit is contained in:
prascle 2013-02-25 10:20:36 +00:00
parent f7590bbf59
commit 00f655d884
3 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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 ):

View File

@ -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"