mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 02:00:35 +05:00
PR: fix dump and compatibility with previous scripts
This commit is contained in:
parent
f7590bbf59
commit
00f655d884
@ -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);
|
||||
|
||||
|
@ -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 ):
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user