[vtkusers] vtkSplineWidget doesn't go through all handles
dean.inglis at camris.ca
dean.inglis at camris.ca
Wed Mar 28 13:11:25 EDT 2007
Hi Willem,
I do not see this problem occuring using
VTK CVS built with Visual Studio Express 2005.
This should not be occuring.
Can you provide a screen shot of what you
are getting when your app starts up?
Dean
I'm using VTK 5.0 with MSVS-8. I'm trying to create a vtkSplineWidget
containing, let's say, 8 handles. However, the spline only
interpolates between 5 of them. Is this intended? How can I circumvent
it?
package require vtk
package require vtkinteraction
# create a renderer
vtkRenderer renderer
# create a render window
vtkRenderWindow renWin
renWin SetSize 1024 1024
renWin AddRenderer renderer
# create an interactor
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
renWin SetInteractor iren
renderer SetRenderWindow renWin
renderer SetBackground 0.4392 0.5020 0.5647
# create some spline handles
vtkPoints points
points InsertNextPoint 100 100 0
points InsertNextPoint 200 100 0
points InsertNextPoint 300 200 0
points InsertNextPoint 800 50 0
points InsertNextPoint 500 200 0
points InsertNextPoint 800 500 0
points InsertNextPoint 900 500 0
points InsertNextPoint 1000 500 0
# create a splinewidget
vtkSplineWidget spline
spline SetCurrentRenderer renderer
spline SetDefaultRenderer renderer
spline SetInteractor iren
spline PlaceWidget 0.0 1000.0 0.0 500.0 0.0 0.0
spline SetNumberOfHandles [ points GetNumberOfPoints ]
spline InitializeHandles points
spline On
# render the image
#
iren AddObserver UserEvent {wm deiconify .vtkInteract}
iren Initialize
# Prevent the tk window from showing up then start the event loop.
wm withdraw .
More information about the vtkusers
mailing list