[vtkusers] Empty mesh from Delaunay3D

Rakesh Patil rakeshthp at in.com
Wed Mar 10 09:45:42 EST 2010


 hi...as far as my knowledge is concerned, unstructured grid must contain atleast one cell.. Thus, you need to create a cell array of containing min one element and allocate it to the UGrid.. then set the points.. see this examplehttp://public.kitware.com/cgibin/viewcvs.cgi/*checkout*/Rendering/Testing/Cxx/TestOrderedTriangulator.cxx?root=VTK&contenttype=text/plainThanksRegardsRakesh Patil Original message From:superzz< jxdwzlf at yahoo.com.cn >Date: 10 Mar 10 14:16:45Subject:[vtkusers]Empty mesh from Delaunay3DTo: vtkusers at vtk.orgHelloI get an empty mesh from Delaunay3D. vtkPoints is used as source data. Am Iusing Delaunay3D in a wrong way?Thanks!superZZvtkPoints pts = new vtkPoints();//points xyzpts.InsertPoint(0, 188, 377, 1);pts.InsertPoint(1, 195, 385, 1);pts.InsertPoint(2, 207, 393, 1);pts.InsertPoint(3, 221, 395, 1);pts.InsertPoint(4, 230, 396, 1);pts.InsertPoint(5, 241, 396, 1);pts.InsertPoint(6, 211, 399, 1);pts.InsertPoint(7, 223, 399, 1);pts.InsertPoint(8, 201, 392, 1
 );pts.InsertPoint(9, 248, 394, 1);pts.InsertPoint(10, 264, 394, 1);pts.InsertPoint(11, 269, 385, 1);pts.InsertPoint(12, 256, 390, 1);pts.InsertPoint(13, 245, 399, 1);pts.InsertPoint(14, 225, 399, 1);pts.InsertPoint(15, 251, 393, 1);pts.InsertPoint(16, 274, 376, 1);pts.InsertPoint(17, 288, 365, 1);pts.InsertPoint(18, 269, 375, 1);pts.InsertPoint(19, 244, 393, 1);pts.InsertPoint(20, 176, 367, 1);pts.InsertPoint(21, 176, 352, 1);pts.InsertPoint(22, 193, 248, 1);pts.InsertPoint(23, 191, 223, 1);pts.InsertPoint(24, 209, 219, 1);pts.InsertPoint(25, 210, 243, 1);pts.InsertPoint(26, 210, 245, 1);pts.InsertPoint(27, 233, 242, 1);pts.InsertPoint(28, 228, 208, 1);pts.InsertPoint(29, 228, 206, 1);pts.InsertPoint(30, 223, 223, 1);pts.InsertPoint(31, 223, 228, 1);pts.InsertPoint(32, 245, 387, 1);vtkUnstructuredGrid profile = new vtkUnstructuredGrid();profile.SetPoints(pts);vtkDelaunay3D delny = new vtkDelaunay3D();delny.SetInput(profile);delny.Update();vtkDataSetMapper delnyDataSetMapper 
 = new vtkDataSetMapper();delnyDataSetMapper.SetInputConnection(delny.GetOutputPort());vtkActor delnyActor = new vtkActor();delnyActor.SetMapper(delnyDataSetMapper); View this message in context: http://old.nabble.com/EmptymeshfromDelaunay3Dtp27846934p27846934.htmlSent from the VTK  Users mailing list archive at Nabble.com.Powered by www.kitware.comVisit other Kitware opensource projects at http://www.kitware.com/opensource/opensource.htmlPlease keep messages ontopic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTKFAQFollow this link to subscribe/unsubscribe:http://www.vtk.org/mailman/listinfo/vtkusers 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100310/2d6c7741/attachment.htm>


More information about the vtkusers mailing list