[vtkusers] Question regarding vtkMultiBlockPLOT3DReader and also VTKit

mstucky5 at cox.net mstucky5 at cox.net
Thu Nov 2 14:46:04 EST 2006


I'm working on an application in which I need to display PLOT3D files.  
The application is a "starkit", primarily a series of Tcl code that I've
bundled together with VTKit into a stand-alone executable.  Previously
I was working with single block plot3d files, but now I need to handle
multi-block plot3d files.

Question 1 : Does anyone have any sample Tcl code for displaying
             multi-block plot3d files?

I tried to put together a simple example that is modeled after the
example:

     Graphics/Testing/Cxx/TestMultiBlock.cxx 

When I run the code using VTKit-4.5.7, the following error dialog
box pops up a couple times :

+-------------------------------------------------------------------------+
|  vtkOutputWindow: VTKit-4.5.7.exe - Application Error                   |
|-------------------------------------------------------------------------|
|                                                                         |
|  The exception unknown software exception (0xc000000d) occurred in the  |
|  application at location 0x009232e1.                                    |
|                                                                         |
|  Click on OK to terminate the program                                   |
|  Click on CANCEL to debug the program                                   |
|                                                                         |
|                      OK               Cancel                            |
+-------------------------------------------------------------------------+

Question 2 : Does anyone else get the above error?
Question 3 : Do you know what might be causing the above error?

After hitting OK I get the following error in the "debug" window

  ERROR: In ..\..\VTK\Filtering\vtkCompositeDataPipeline.cxx, line 279
  vtkCompositeDataPipeline (0AD95BC0): No update piece number has been set in the 
  information for output port 0 on algorithm vtkMultiBlockPLOT3DReader(0AD635B8).

FYI, I have also run the example using VTK version 5.0.2, the error 
dialog box does not appear, but the above "debug" error does.  I'm
assuming that I've forgotten some setting but...

Question 4 : How do I "set the update piece number" and get rid of 
             this error?

Hopefully I have included enough information, if not let me know.
(Oh yeah, I running on both Windows XP and Windows 2000)

--Mark Stucky


##############################################################################

The following example is modeled after

     Graphics/Testing/Cxx/TestMultiBlock.cxx 

##############################################################################

package require Tk

package require vtk
package require vtkinteraction
package require vtktesting

# Create the graphics "window"
vtkRenderer ren1
vtkRenderWindow renWin

renWin AddRenderer ren1

set cam [ren1 GetActiveCamera]
$cam SetPosition  -50. 0. 0.
$cam SetFocalPoint  0. 0. 0.
$cam SetViewUp      0. 1. 0.

set ::renWidget [vtkTkRenderWidget .ren \
                     -width 500 -height 500 -rw renWin]
::vtk::bind_tk_render_widget $::renWidget

pack $::renWidget -side top -fill both -expand yes

# update


set xFile "mbwavelet_ascii.xyz"
set qFile "mbwavelet_ascii.q"

puts "vtkMultiBlockPLOT3DReader reader..."

vtkMultiBlockPLOT3DReader reader
reader SetXYZFileName $xFile
reader SetQFileName   $qFile
reader MultiGridOn
reader BinaryFileOff
puts "piece -> [[reader GetOutput] SetUpdatePiece 0] "
[reader GetOutput] SetUpdatePiece 0

reader Update

puts "GetNumberOfOutputPorts : [reader GetNumberOfOutputPorts]"

puts "vtkHierarchicalDataSetGeometryFilter geom..."
vtkHierarchicalDataSetGeometryFilter geom
geom SetInputConnection 0 [reader GetOutputPort 0]

puts "vtkShrinkPolyData shrink..."
vtkShrinkPolyData shrink
shrink SetShrinkFactor 0.2
shrink SetInputConnection 0 [geom GetOutputPort 0]

puts "vtkPolyDataMapper shMapper..."
vtkPolyDataMapper shMapper
shMapper SetInputConnection 0 [shrink GetOutputPort 0]

puts "vtkActor shActor..."
vtkActor shActor
shActor SetMapper shMapper
[shActor GetProperty] SetColor 0 0 1
ren1 AddActor shActor
ren1 SetBackground 1 1 1

puts "renWin Render..."
renWin Render


########################################################################




More information about the vtkusers mailing list