[vtkusers] vtkSplineWidget. TCL syntax question
Rasmus Reinhold Paulsen
rrp at imm.dtu.dk
Fri Nov 22 08:42:45 EST 2002
Hi Users.
I want to convert the handles of an instance of the new super-funky
vtkSplineWidget to a polydata point set. I try to do this with the
following bit of code:
vtkPoints pts
vtkCellArray verts
vtkPolyData pd
set NPoint [splineWidget GetNumberOfHandles]
for {set i 0} {$i < $NPoint} {incr i 1} {
set tpoint [splineWidget GetHandlePosition $i]
set tid [pts InsertNextPoint [lindex $tpoint 0] [lindex $tpoint 1]
[lindex $tpoint 2]]
verts InsertNextCell 1
verts InsertCellPoint $tid
}
pd SetPoints pts
pd SetVerts verts
This line is causing me trouble:
set tpoint [splineWidget GetHandlePosition $i]
What is the correct syntax for this?
Regards,
Rasmus
More information about the vtkusers
mailing list