[vtkusers] Help: How to Clip a Grid With Respect to TIN?...
Terence Lim
tlim at mda.ca
Fri Dec 21 16:56:50 EST 2001
Will: Thanks for your prompt reply.
I noticed that the output of vtkClipPolyData may not contain the same cell
type as the input type (i.e VTK_QUAD). Because of this, I am quite
reluctant to use this class.
I came across an idea to use the boundary points of the TIN to define a poly
line and then use the cell->Evaluate() to find out if a point lies
inside/outside this cell.
Is there a quick way to find the boundary points of a TIN? (as opposed to
the manually finding the bounding points)
Any thoughts?
Thanks,
Terence
-----Original Message-----
From: Will Schroeder [mailto:will.schroeder at kitware.com]
Sent: December 21, 2001 12:09 PM
To: tlim at mda.ca; vtkusers at public.kitware.com
Subject: Re: [vtkusers] Help: How to Clip a Grid With Respect to TIN?...
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