<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>I have constructed a
3-D mesh surface and want to obtain contours by using plane cut. I use
vtkCutter class to do this. However, the contour I got is just a
group of lines without correct ordering. For example, a
closed contour would be like this 1->2, 2->3, 3->4, 4->1, but
what I got was sth like this: 1->2, 3->4, 2->3, 4->1. I
don't know if I express my problem clearly. Does anyone have similiar
experience?</FONT></SPAN></DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>The code that I am
using is listed here:</FONT></SPAN></DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>vtkPlane
*plane=vtkPlane::New();<BR>plane->SetOrigin(0, 0,
0);<BR>plane->SetNormal(1, 0, 0);</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>vtkCutter
*cutEdges=vtkCutter::New();<BR>cutEdges->SetInput(vtkdata);<BR>cutEdges->SetCutFunction(plane);<BR>cutEdges->GenerateCutScalarsOn();<BR>cutEdges->GenerateValues(10,
0, 50);</FONT></SPAN></DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>vtkPolyDataWriter
*contourwriter=vtkPolyDataWriter::New();<BR>contourwriter->SetFileName("contour.vtk");<BR>contourwriter->SetInput(cutEdges->GetOutput());<BR>contourwriter->Update();</FONT></SPAN></DIV></FONT></DIV></BODY></HTML>