×

Notice

The forum is in read only mode.

failing script

  • Manav Bhatia
  • Topic Author
  • Offline
  • New Member
  • New Member
More
17 years 1 week ago #1844 by Manav Bhatia
failing script was created by Manav Bhatia
Hi,

I am using the attached python script to create a geometry using salome. If I use it with the salome 3.2.6 package from the salome website, it runs successfully.
However, it fails to run with the 3.2.9 salome-meca release from caelinux. I get the following error:

import geompy
import salome
gg = salome.ImportComponentGUI("GEOM")

vecx = geompy.MakeVectorDXDYDZ(0, 0,200)
p1 = geompy.MakeVertex(0. , 0. , 0. )
p2 = geompy.MakeVertex(200. , 0. , 0. )
p3 = geompy.MakeVertex(200. , 200. , 0. )
p4 = geompy.MakeVertex(0. , 200. , 0. )

line1 = geompy.MakePolyline([p1, p2, p3, p4])
print geompy.WhatIs(line1)
p5 = geompy.MakeVertex(0. , 0. , 200. )
p6 = geompy.MakeVertex(100. , 0. , 200. )
p7 = geompy.MakeVertex(100. , 100. , 200. )
p8 = geompy.MakeVertex(0. , 100. , 200. )
line2 = geompy.MakePolyline([p5, p6, p7, p8])
print geompy.WhatIs(line2)

# create a pipe
pipe1 = geompy.MakePipe(line1, vecx)
print geompy.WhatIs(pipe1)

pipe2 = geompy.MakePipeWithDifferentSections([line1, line2], [],vecx, 0,0)
print geompy.WhatIs(pipe2)

# add objects in the study
id_line1 = geompy.addToStudy(line1,"line1")
id_line2 = geompy.addToStudy(line2,"line2")
id_pipe1 = geompy.addToStudy(pipe1,"Pipe1")
id_pipe1 = geompy.addToStudy(pipe2,"Pipe2")


# display the wire, the edge (path) and the pipe
gg.createAndDisplayGO(id_line1)
gg.createAndDisplayGO(id_line2)
gg.createAndDisplayGO(id_pipe1)
gg.setDisplayMode(id_pipe1,1)





Traceback (most recent call last):
File "<input>", line 1, in ?
File "/home/manav/packages/SALOME-MECA-2008.1-GPL/SALOME/SALOME3/V3_2_9NoDebug/KERNEL_V3_2_9NoDebug/lib/python2.3/site-packages/salome/import_hook.py", line 156, in import_hook
module= original_import(name, globals, locals, fromlist)
File "tmp.py", line 30, in ?
pipe2 = geompy.MakePipeWithDifferentSections([line1, line2], [ ], vecx, 0, 0)
File "/home/manav/packages/SALOME-MECA-2008.1-GPL/SALOME/SALOME3/V3_2_9NoDebug/GEOM_V3_2_9NoDebug/bin/salome/geompy.py", line 765, in MakePipeWithDifferentSections
RaiseIfFailed("MakePipeWithDifferentSections", PrimOp)
File "/home/manav/packages/SALOME-MECA-2008.1-GPL/SALOME/SALOME3/V3_2_9NoDebug/GEOM_V3_2_9NoDebug/bin/salome/geompy.py", line 146, in RaiseIfFailed
raise RuntimeError, method_name + " : " + operation.GetErrorCode()
RuntimeError: MakePipeWithDifferentSections : SIGSEGV 'segmentation violation' detected. Address 10

I would greatly appreciate any help in this matter.

Regards,
Manav

Post edited by: Manav Bhatia, at: 2008/04/08 18:49<br /><br />Post edited by: Manav Bhatia, at: 2008/04/08 18:50
Moderators: catux
Time to create page: 0.452 seconds
Powered by Kunena Forum