Prabhu Ramachandran | 20 Jul 15:43
Picon

Updating mayavi changes file

Hi,

Over the last several weeks many of you have made checkins into mayavi. 
  I would really appreciate it if you please go over your checkins and 
summarize the most important of them in the docs/mayavi/CHANGES.txt in a 
manner similar to what Gael and I have done.  There is one change that 
Judah made that I have summarized (the adder node) but apart from that I 
haven't added information on any of the other major changes.  I think 
I've covered all my major changes so far.

Thanks!

cheers,
prabhu
Ondrej Certik | 20 Jul 03:16
Picon
Gravatar

show mesh in mayavi2, segfault

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.

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?

Here is the gdb trace:

$ gdb python
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run show_grid.py
Starting program: /usr/bin/python show_grid.py
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d768c0 (LWP 30519)]

(Continue reading)

Ilan Schnell | 18 Jul 17:42
Favicon

Overview of ETS 3.0 tests

Hi,
I've complied an overview of the different projects and the failure
rates:
http://www.enthought.com/~ischnell/ets.txt

The first number is always the number of tests run in that folder.
I would say that things are not so bad:
- BlockCanvas has the most failures, many things are out of data
- Traits needs some more work.
- Mayavi basically passes the tests, but they are not really meant
  to be run by nosetests

- Ilan
Alexander Michael | 18 Jul 16:17
Picon

Does a sync_trait connection prevent an object from being garbage collected?

If after setting up a sync_trait pair one side of the sync (the one
past in the argument to the sync_trait method) leaves scope with
nothing referencing it other than the sync_trait event handling (or
even gets explicitly deleted with the del operator) does the object
get garbage collected and the sync_trait connection removed? Or does
the sync_trait setup keep it dangling until I explicitly remove the
sync'ing with another call to sync_trait with remove=True?

I'm trying to figure out how explicit I need to be about setting up
and tearing down some wiring in my app in response to user
interactions that essentially reconfigure the object relationships.

Thanks,
Alex
Jack.Cook | 18 Jul 15:52
Picon
Favicon

[TVTK] Cannot add volume to renderer

I am just learning how to do volume rendering using tvtk. I was attempting to mimic the volume rendering example in the VTK User's Guide doing the conversion from tcl to tvtk/python (see script below). When I try to add the volume to the renderer I get:

ValueError: method requires a VTK object

I googled the error message and was directed to an FAQ at the Kitware site. The FAQ suggested that I possibly might have two installations of VTK installed on my system. I have checked this and I do not believe this to be the case. Furthermore, most of the tvtk and mayavi2 examples work fine. Does someone know what I am doing wrong?

#### Begin session log
import sys
from enthought.tvtk.tools import ivtk
from enthought.tvtk.api import tvtk
from enthought.mayavi.sources.vtk_file_reader import VTKFileReader
from enthought.mayavi.sources.vtk_file_reader import VTKFileReader

reader = tvtk.StructuredPointsReader()
reader.file_name = './Data/heart.vtk'

pwd = tvtk.PiecewiseFunction()
pwd.add_point(20, 0.0)
pwd.add_point(255, 0.2)

ctf = tvtk.ColorTransferFunction()
ctf.add_rgb_point(0.0, 0.0, 0.0, 0.0)
ctf.add_rgb_point(64.0, 1.0, 0.0, 0.0)
ctf.add_rgb_point(128.0, 0.0, 0.0, 1.0)
ctf.add_rgb_point(192.0, 0.0, 1.0, 0.0)
ctf.add_rgb_point(255.0, 0.0, 0.2, 0.0)

vprop = tvtk.VolumeProperty()
vprop.set_color(ctf)
vprop.set_scalar_opacity(pwd)

cf = tvtk.VolumeRayCastCompositeFunction()

vm = tvtk.VolumeRayCastMapper()
vm.volume_ray_cast_function = cf
vm.input_connection = reader.output_port

vol = tvtk.Volume
vol.mapper = vm
vol.property = vprop

v = ivtk.viewer()
v.scene.renderer.add_view_prop(vol)
#### End session log

Thanks,

Jack


Kind Regards,

Jack Cook
Jack Cook
Savior Research Development 
Shell International Exploration & Production,  Inc.
3737 Bellaire Boulevard     Houston, Texas  77025
Tel:  +1 713 245 8771    


_______________________________________________
Enthought-dev mailing list
Enthought-dev@...
https://mail.enthought.com/mailman/listinfo/enthought-dev
Lev Givon | 18 Jul 14:13
Favicon

ETS 2.8.0 Mandriva packages available

I recently packaged ETS 2.8.0 for the latest stable and development
releases of Mandriva Linux. The packages
(python-enthought-{chaco2,mayavi2,traits,traits-ui}) contain the same
ETS components as the corresponding Debian packages. They should be
available in Mandriva repositories by tomorrow. If anyone notices any
problems with the packages, please let me know.

							L.G.
Alexander Michael | 17 Jul 23:13
Picon

Harmful to set sync_trait multiples times for the same pair of traits?

Is it harmful to redundantly setup the same pair of traits to sync?
Something like:

my_obj.sync_trait(name, other_obj)
my_obj.sync_trait(name, other_obj)

I ask because I'm doing this in a context in which it isn't obvious
whether or not it has already been done (depending on how the user is
interacting with the app).

Thanks,
Alex
Danny Shevitz | 17 Jul 22:22

in TreeNode, what is the difference between add and move traits

I've been looking at the source and I can't figure out what the difference
is between the 'add' and 'move' traits in a TreeNode. I am aware the the
'move' trait can be a list of tuples to convert type, but if you just gave 
it a singleton, it seems identical in all respects to 'add'.

Can someone please enlighten me?

thanks,
D
Robert Kern | 17 Jul 22:22
Picon

Moving PlotContainerEditor to ComponentEditor

The Traits editor in
enthought.chaco2.chaco2_plot_container_editor.PlotContainerEditor has
been moved to the slightly better named
enthought.enable2.component_editor.ComponentEditor since it really
displays Enable components, not just PlotContainers. The
PlotContainerEditor is deprecated and will raise a DeprecationWarning
when used for another 2 weeks, after which it will be removed from the
trunk.

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
Alexander Michael | 17 Jul 19:36
Picon

Automatically Triggering post_settattr After Value Assign by _*_default Method

If have a TraitType with a post_setattr method. Is there a way to
indicate that I would like the post_setattr to be called when the
value is set by a default method?

Thanks,
Alex
Danny Shevitz | 17 Jul 18:49

problem with undo on delegated lists

howdy,

Another problem with delegation here. I believe it's a bug, but I always do 
and I'm usually wrong :-).

If a list is delegated as in

class A
 sub_nodes = List

class B
 a = Instance(A)
 sub_nodes = Delegate('a', modify=True)

Now imagine two instances of B share the same a

a = A()
b1 = B(a=a)
b2 = B(a=a)

so the b's are different but b1.a = b2.a = a.

Now the problem. If I change "a" (via "b", in a gui so we have an undo history),
then the undo history is appended with an undo item containing two changes, one
for b1 and one for b2. In fact there was only one change to the delegatee, "a".

If I do an undo/redo operation on the tree (via the default buttons) then
changes are made to both b1 and b2 resulting in twice as many changes to a.
So if I append to b1 and do an undo/redo I now end with two children under
both b1 and b2, when I should only have one.

I'm not sure where it belongs or how to implement it,  but the solution is 
conceptually clear. If a list is delegated and modify='true' then you should
only create an undo item for the delegatee, not the delegators. 

This is probably also happening for other things besides delegated lists but
I would guess it is happening for all delegated containers.

thanks,
D

Gmane