[vtkusers] getting point information from vtkCutter

Clare Fitzpatrick clare.fitzpatrick at ucd.ie
Mon Feb 6 11:39:22 EST 2006


Thanks Randall,

Have that working now with:

set numPoints [[cutterFilter GetOutput] GetNumberOfPoints]

for {set i 0} {$i < $numPoints} {incr i} {
        set point [[cutterFilter GetOutput] GetPoint $i]
        puts "Point $i: [lindex $point 0] [lindex $point1] [lindex $point 2]"
}

Clare
  ----- Original Message ----- 
  From: Randall Hand 
  To: Clare Fitzpatrick 
  Cc: vtkusers at vtk.org 
  Sent: Monday, February 06, 2006 3:03 PM
  Subject: Re: [vtkusers] getting point information from vtkCutter


  Refer to the documentation for vtkPointSet, the parent class for vtkPolyData. http://www.vtk.org/doc/release/5.0/html/a01876.html

  Then do something like: 

  double *point;
  vtkPointSet *dataset = cutterFilter->GetOutput();
  for(i=0; i<dataset->GetNumberOfPoints(); i++) {
      point = dataset->GetPoint(i);
      printf("Point %i: %lf, %lf, %lf\n", i, point[0], point[1], point[2]); 
  }


  On 2/6/06, Clare Fitzpatrick <clare.fitzpatrick at ucd.ie> wrote:
    Hi All,

    From what i understand, an instance of vtkCutter gives a PolyData output, which is basically a list of points or lines. So where is this list stored and is it possible to access the coordinates of these points? 
    I am intersecting two cutting planes and i want to extract the points of intersection. So far i have been able to use vtkGlyph3D to apply spheres (or whatever) onto the intersecting points but I dont know how to get their coordinates (without using vtkPicker - i want to do this automatically!).

    Thanks,
    Clare


    _______________________________________________
    This is the private VTK discussion list.
    Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
    Follow this link to subscribe/unsubscribe:
    http://www.vtk.org/mailman/listinfo/vtkusers 






  -- 
  Randall Hand
  Visualization Scientist, 
  ERDC-MSRC Vicksburg, MS
  Homepage: http://www.yeraze.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060206/ff28f2ba/attachment.htm>


More information about the vtkusers mailing list