[vtkusers] vtkAppendPolyData()..

Rakesh Patil rakeshthp at in.com
Tue Mar 2 04:38:50 EST 2010


 You mean to say vtkStripper will return an output with a single cell..??ThanksRegardsRakesh Patil Original message From:David Gobbi< david.gobbi at gmail.com >Date: 02 Mar 10 11:25:08Subject:Re: [vtkusers] vtkAppendPolyData()..To: Rakesh Patil My only guess is that your data set might have duplicate points, orperhaps there are other factors which might result in degenerate (i.e.microthin) triangles prior to the contouring.Any duplicate pointsor degenerate triangles prior to the contouring will make it producelines where the adjacent segments don't actually share a point,because that point is actually two points that are almost exactly ontop of one another.As a result, vtkStripper won't be able to do itsjob.You can remove duplicated points with vtkCleanPolyData.Anywhere inthe pipeline before vtkStripper should work, but just beforevtkContourFilter might be best.DavidOn Mon, Mar 1, 2010 at 9:50 PM, Rakesh Patilwrote:> Well,>> Here I'm attaching a screenshot. The output of a sampl
 e file what i get is> like this. It is correct. If i render all in same color the it is correct.> Here is a sample code for it.>> vtkDelaunay2D *del = vtkDelaunay2D::New();> del>SetInput(uGrid); // Unstructuredgrid containing scattered xy points> del>SetTolerance(0.005);> del>Update();>> vtkContourFilter *cont = vtkcontourFilter::New();> cont>SetInputConnection(del>GetOutputPort());> cont>GenerateValues(1, 4.5, 4.5);> cont>Update();>> vtkStripper *ps = vtkStripper::New();> ps>SetInputConnection( cont>GetOutputPort());> ps>Update();>> Now the output of this stripper contains 16 cells and 198 points. That is> also fine. But once i get a contour line as shown in attachment, I need> to perform some operation on the entire line by selecting/picking it. But in> this case, if i use cell picker, then only one part of the fill line is> being picked..>> SO what can be done to pick the entire line.??>> Thanks>> Regards> Rakesh Patil>>>  Original message > From:David Gobbi< david.gobbi@
 gmail.com >> Date: 01 Mar 10 18:37:28> Subject: Re: [vtkusers] vtkAppendPolyData()..> To: Rakesh Patil>> The filter you are looking for is vtkStripper, it will join the line> segments together.>> David>>> On Mon, Mar 1, 2010 at 12:03 AM, Rakesh Patil wrote:>> Hi VTK Users..>>>> I want to extract a single contour line from a set of xy points. So to>> begin>> with i used vtkContourFilter class to extract a single contour line of a>> particular value. But the output contained n number of lines not a single>> line. So I thought of merging them.. So i used,>>>> vtkAppendPolyData>>>> class to make it a single line. I get it as a single lin e but there is a>> smal confusion here.. Suppose there are 6 lines. when displaying, the>> first>> point of the 2nd line is connected to the first point of 1st line.>> similarly>> first point of the third line is connected to the first point of the>> second>> line. Thus creating unwanted lines in between..>>>> Any solution to get rid of this..??
 ?>>>> Thanks>>>> Regards>> Rakesh Patil>>>>>>>> Dear vtkusers ! Get Yourself a cool, short @in.com Email ID now!>> >> Powered by www.kitware.com>>>> Visit other Kitware opensource projects at>> http://www.kitware.com/opensource/opensource.html>>>> Please keep messages ontopic and check the VTK FAQ at:>> http://www.vtk.org/Wiki/VTKFAQ>>>> Follow 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/20100302/547a7cf8/attachment.htm>


More information about the vtkusers mailing list