<div class="gmail_quote">On Wed, Mar 10, 2010 at 3:46 AM, superzz <span dir="ltr"><<a href="mailto:jxdw_zlf@yahoo.com.cn">jxdw_zlf@yahoo.com.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hello<br>
I get an empty mesh from Delaunay3D. vtkPoints is used as source data. Am I<br>
using Delaunay3D in a wrong way?<br>
<br>
Thanks!<br>
<br>
superZZ<br>
<br>
vtkPoints pts = new vtkPoints();<br>
<br>
//points x-y-z<br>
pts.InsertPoint(0, 188, 377, 1);<br>
pts.InsertPoint(1, 195, 385, 1);<br>
pts.InsertPoint(2, 207, 393, 1);<br>
pts.InsertPoint(3, 221, 395, 1);<br>
pts.InsertPoint(4, 230, 396, 1);<br>
pts.InsertPoint(5, 241, 396, 1);<br>
pts.InsertPoint(6, 211, 399, 1);<br>
pts.InsertPoint(7, 223, 399, 1);<br>
pts.InsertPoint(8, 201, 392, 1);<br>
pts.InsertPoint(9, 248, 394, 1);<br>
pts.InsertPoint(10, 264, 394, 1);<br>
pts.InsertPoint(11, 269, 385, 1);<br>
pts.InsertPoint(12, 256, 390, 1);<br>
pts.InsertPoint(13, 245, 399, 1);<br>
pts.InsertPoint(14, 225, 399, 1);<br>
pts.InsertPoint(15, 251, 393, 1);<br>
pts.InsertPoint(16, 274, 376, 1);<br>
pts.InsertPoint(17, 288, 365, 1);<br>
pts.InsertPoint(18, 269, 375, 1);<br>
pts.InsertPoint(19, 244, 393, 1);<br>
pts.InsertPoint(20, 176, 367, 1);<br>
pts.InsertPoint(21, 176, 352, 1);<br>
pts.InsertPoint(22, 193, 248, 1);<br>
pts.InsertPoint(23, 191, 223, 1);<br>
pts.InsertPoint(24, 209, 219, 1);<br>
pts.InsertPoint(25, 210, 243, 1);<br>
pts.InsertPoint(26, 210, 245, 1);<br>
pts.InsertPoint(27, 233, 242, 1);<br>
pts.InsertPoint(28, 228, 208, 1);<br>
pts.InsertPoint(29, 228, 206, 1);<br>
pts.InsertPoint(30, 223, 223, 1);<br>
pts.InsertPoint(31, 223, 228, 1);<br>
pts.InsertPoint(32, 245, 387, 1);<br>
<br>
vtkUnstructuredGrid profile = new vtkUnstructuredGrid();<br>
profile.SetPoints(pts);<br>
<br>
vtkDelaunay3D delny = new vtkDelaunay3D();<br>
delny.SetInput(profile);<br>
delny.Update();<br>
<br>
vtkDataSetMapper delnyDataSetMapper = new vtkDataSetMapper();<br>
delnyDataSetMapper.SetInputConnection(delny.GetOutputPort());<br>
<br>
<br>
vtkActor delnyActor = new vtkActor();<br>
delnyActor.SetMapper(delnyDataSetMapper);<br><br></blockquote><div><br></div><div>I'm not sure which language you are using, but I had to change the syntax of the point insertion to:</div>pts->InsertNextPoint(23, 191, 223);</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">and then it worked fine for me.</div><div class="gmail_quote"><br clear="all">Thanks,<br><br><div>David </div></div><br>