Thank you guys for your suggestions... I am going to try Prabhu's method (if I am able to understand how vtkImplicitDataSet works). BTW, does anyone know if the combination Python 2.5 + VTK CVS + wxPython 2.7/2.8 actually works? I am going to compile VTK from CVS right now, and I really hope it will work...
Andrea. On 12/15/06, Prabhu Ramachandran <[EMAIL PROTECTED]> wrote: > >>>>> "Andrea" == Andrea Gavana <[EMAIL PROTECTED]> writes: > > Andrea> a bit but got zero clues. Based on 3 user inputs (width, > Andrea> height, depth), I would like to construct some kind of > Andrea> parallelepiped and then I would like to move it (in x, y, > Andrea> z directions sequentially) inside my 3D unstructred grid: > Andrea> for evey move, I would like to know which cells of my 3D > Andrea> grid are intersected by this parallelepiped. Actually, the > Andrea> parallelepiped will be distorted, as the 3D grid is not > Andrea> orthogonal (is a corner point grid), so the problem looks > Andrea> like a 3D unstructured grid that intersects a smaller 3D > Andrea> unstructured grid, and I would like to find out which > Andrea> cells of the bigger grid are intersected by the smaller > Andrea> one. It is like a moving 3D window inside the bigger > Andrea> grid. Does anyone have a suggestion or a comment to > Andrea> share? > > Take a look at MayaVi2's slice_unstructured_grid.py module (in the > modules directory): > > > https://svn.enthought.com/enthought/browser/trunk/src/lib/enthought/mayavi/modules/slice_unstructured_grid.py > > The idea is to use vtkExtractGeometry along with an implicit function > (in this module an implicit plane). The output of the extracted > unstructured grid is then passed through the vtkGeometryFilter to > generate polydata that can be viewed. > > In your case an implicit plane won't do so you'll have to use the > vtkImplicitDataSet. Read the docs for the class. Basically create a > suitable dataset that defines your "parallelopiped" and use the > ExtractGeometry filter to extract what is inside your parallelopiped. > > cheers, > prabhu > Andrea. "Imagination Is The Only Weapon In The War Against Reality." http://xoomer.virgilio.it/infinity77/ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ MayaVi-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mayavi-users
