[vtkusers] Help: How to Clip a Grid With Respect to TIN?...

Will Schroeder will.schroeder at kitware.com
Fri Dec 21 15:08:57 EST 2001


Try this: use ImplicitSelectionLoop (an implicit function) in conjunction 
with vtkClipPolyData. As long as you can define the loop in a plane that 
can be projected onto your data without overlap, then it'll work. With a 
TIM it should be okay.
Will

At 11:56 AM 12/21/2001 -0800, Terence Lim wrote:
>Hi everyone,
>
>I would like clip away regions on a grid using a TIN as a reference.  If a
>point on the grid  lies outside the TIN then I would like to clip this point
>away. If a point on the grid lies inside the TIn i i would like to retain
>it. Both the grid and the TIn are polydata.  How do I do this?
>
>I have read several messages regarding this matter but I am still lost.
>
>Can I use ImplicitDataSet & vtkClipPolyData ?
>
>My simplified experimental code looks something like this:
>
>vtkImplicitDataSet *ids =vtkImplicitDataSet::New();
>ids->SetInput(aTin);            //where aTin is a TIN mesh (contains 
>scalar values)
>
>vtkClipPolyData *clipper = vtkClipPolyData::New();
>clipper->SetInput(aGrid);       //where aGrid the output from
>StructuredPointsGeometryFilter
>clipper->SetClipFunction(ids)
>clipper->SetValue(..);
>clipper->Update();
>
>Any Ideas would be greatly appreciated.
>
>Thanks in advance,
>
>Terence
>
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list