[vtkusers] Re: Extracting a 2D curve from a 3D surface and 2 vertices

Goodwin Lawlor goodwin.lawlor at ucd.ie
Thu Jan 5 13:55:00 EST 2006


Matthew D. DiFranco wrote:
> I have a 3D surface and would like to extract a 2D curve which 
> intersects the plane created by two vertices on the surface. Does anyone 
> have a suggestion for going about this?
> 

Hi Matt,

You can use vtkCutter with vtkPlane as the cutting function to extract a 
2D curve. To define a plane you need a point and a normal... to 
calculate the normal you'll need a third vertex. You could use 
vtkTriangle::ComputeNormal() or diy by getting the cross product of two 
vectors defined from the three points.

hth

Goodwin




More information about the vtkusers mailing list