20 Jul 04:46
Re: show mesh in mayavi2, segfault
From: Prabhu Ramachandran <prabhu@...>
Subject: Re: show mesh in mayavi2, segfault
Newsgroups: gmane.comp.python.enthought.devel
Date: 2008-07-20 02:46:03 GMT
Subject: Re: show mesh in mayavi2, segfault
Newsgroups: gmane.comp.python.enthought.devel
Date: 2008-07-20 02:46:03 GMT
Ondrej Certik wrote: > Hi, > > I'd like to visualize a finite element mesh in mayavi2. I have it in > .vtk file. Is there a way to tell mayavi2 to show it? I didn't figure > it out. This should work: $ mayavi2 -d foo.vtk -m Outline -m IsoSurface BTW, which version of mayavi2 are you talking about? $ mayavi2 -V should help. > So I adapted this script: > > http://paste.debian.net/11654/ > > and it works fine, it shows 4 triangles. Now I'd like to import our > FEM package that can read the .vtk file and get the mesh data, but > mayavi2 segfaults, if I uncomment the line 15 in the above script... > How is that possible? Good question. Can you run the script like so: $ mayavi2 -x show_grid.py Could you check if that works for now and we can move from there. [...] > The sfepy package can be found at: http://code.google.com/p/sfepy/ > > Do you have any pointers? If it segfaults, its not very usable, so I'd > like to fix it. Looking at Objects/frameobject.c:559 it contains: I suspect it has something to do with the hack we use to allow a user to run our standard examples as python example.py *and* mayavi2 example.py. In order to be able to run it as python example.py we need to start up mayavi and re-execute the code to run. It is a hack but we really wanted users to be able to run the script as python example.py. cheers, prabhu
RSS Feed