[vtkusers] clipping question
Maple Raymond C LtCol AFIT/ENY
Raymond.Maple at afit.edu
Mon Nov 8 16:47:07 EST 2004
-----Original Message-----
From: tfogal at apollo.sr.unh.edu [mailto:tfogal at apollo.sr.unh.edu]
Sent: Monday, November 08, 2004 2:24 PM
To: Maple Raymond C LtCol AFIT/ENY
Subject: Re: [vtkusers] clipping question
<4CFC110AB744244C824D25E59665956C01C0613D at ms-afit-04.afit.edu>"Maple
Raymond C LtCol AFIT/ENY" writes:
>Hello,
>
> I am seeing some strange things with data set clipping that I hope
>someone can explain for me. I am clipping a vtkUnstructuredGrid
against
>6 planes forming a bounding box, and writing the result out to a .vtu
>file. I am clipping against each plane individually to ensure that the
>plane intersections are correctly clipped. When I look at the results,
>the cells appear to be correctly clipped to the desired planes, but
some
>or all of the points "removed" by final clipping plane are still
written
I am not sure I fully understand how you are doing things.
You are using vtkExtractGeometry, it seems. What are you using for your
ImplicitFunction?
<snip>
HTH,
-tom
Sorry, I guess my post rambled a little. I'll try to clarify.
Right now I am using vtk for dataset manipulation. My objective is to
efficiently and cleanly extract and save a portion of an unstructured
mesh for later processing. In the simplest case the region of interest
is defined by a bounding box. I define the bounding box via a
vtkPlanes() object and its SetBounds() method. I use that with
vtkExtractGeometry with boundary cells on to extract the cells on and
inside the bounding box, then I clip using each of the planes via
vtkClipDataSet() to "clean up" the new boundaries. By clipping against
the extracted subgrid, the overall operation can be an order of
magnitude faster than clipping against the entire original mesh.
I am clipping one plane at a time because I have found that if I clip
against all the planes simultaneously, some cells are not correctly
clipped at the plane intersections and I get the "notches" described in
my original email. Furthermore, I have found that if I extract the
subgrid using the same planes that I clip against, I can still end up
with some notches, because some boundary cells are not correctly
extracted. By extracting with a slightly larger bounding box, I get
clean clips on all boundaries.
Everything I've done so far works OK in 4.2, except that the output of
the final clipping plane seems to contain points that aren't vertices in
any of the output cells and thus should have been removed from the final
dataset. These extra points don't seem to do anything except increase
the size of my final dataset.
I understand that 4.4 may have new objects/methods that do what I need
to do, and do it properly. I probably should move on to 4.4, but I have
been sticking with 4.2 because I don't know if I will have 4.4 available
everywhere I need to run my code. Also, I will not always be clipping
against a simple bounding box. Eventually, there will be arbitrary
planes involved, and I will need to use a process similar to what I am
doing now.
Thanks,
Raymond C. Maple, Lt Col USAF
Deputy Department Head
Department of Aeronautics and Astronautics
Air Force Institute of Technology
More information about the vtkusers
mailing list