<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> 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 to file. This is very evident when I read in the .vtu file
and display a surfacemap and bounding box. The surface map shows the
correct clipped domain, but the bounding box extends to the full extent of the
original grid in the positive z direction. Points removed by all but the
last plane are truly removed – only the points clipped by the last plane
are retained in the file. Is this by design? I am using the release
version of VTK 4.2. My pipeline looks like</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>(grid reader)->(clip x min)->(clip x max)->(clip y
min)->(clip y max)-> (clip z min)->(clip z max)->grid writer</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>BTW, by experimenting with inserting a vtkExtractGeometry (with
ExtractBoundaryCells turned on) before the clips to speed things up, I think I
have discovered a possible reason why clipping against the Boolean combination
of planes gives poor results. The algorithms used by ExtractGeometry do
not correctly detect cells on the intersection boundary that have no vertices inside
the extracted region. When the clipping planes are applied to the
extracted geometry, there are “notches” where the missed boundary
cells should have been. These notched results are similar to what I get
if I clip against the Boolean combination of bounding planes. I have been
able to eliminate the notches by extracting a slightly larger (10%-20%) bounded
region and clipping against that. Unfortunately, the required increase in
size will is dependent on the size of the grid cells.</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I haven’t looked at the code for vtkExtractGeometry,
but it seems to identify boundary cells as those with some vertices inside the
extracted region, and some outside. To be complete, when an identified boundary
cell has a face whose vertices are all outside the extraction region, that face
needs to be checked to see if it intersects the implicit function – if it
does, then the cell adjacent to that face (if it exists) should be extracted.
Right now, it isn’t.</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Raymond C. Maple, Lt Col USAF</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Deputy Department Head</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Department of Aeronautics and Astronautics</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Air Force Institute of Technology</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
</div>
</body>
</html>