<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'>&nbsp;&nbsp; I am seeing some strange things with data set
clipping that I hope someone can explain for me.&nbsp; I am clipping a
vtkUnstructuredGrid against 6 planes forming a bounding box, and writing the
result out to a .vtu file. &nbsp;I am clipping against each plane individually
to ensure that the plane intersections are correctly clipped. &nbsp;When I look
at the results, the cells appear to be correctly clipped to the desired planes,
but some or all of the points &#8220;removed&#8221; by final clipping plane are
still written to file.&nbsp; This is very evident when I read in the .vtu file
and display a surfacemap and bounding box.&nbsp; 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. &nbsp;Points removed by all but the
last plane are truly removed &#8211; only the points clipped by the last plane
are retained in the file. &nbsp;Is this by design?&nbsp; I am using the release
version of VTK 4.2. &nbsp;My pipeline looks like</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>(grid reader)-&gt;(clip x min)-&gt;(clip x max)-&gt;(clip y
min)-&gt;(clip y max)-&gt; (clip z min)-&gt;(clip z max)-&gt;grid writer</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</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. &nbsp;The algorithms used by ExtractGeometry do
not correctly detect cells on the intersection boundary that have no vertices inside
the extracted region. &nbsp;When the clipping planes are applied to the
extracted geometry, there are &#8220;notches&#8221; where the missed boundary
cells should have been. &nbsp;These notched results are similar to what I get
if I clip against the Boolean combination of bounding planes.&nbsp; I have been
able to eliminate the notches by extracting a slightly larger (10%-20%) bounded
region and clipping against that.&nbsp; 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'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I haven&#8217;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. &nbsp;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 &#8211; if it
does, then the cell adjacent to that face (if it exists) should be extracted.&nbsp;
&nbsp;Right now, it isn&#8217;t.</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</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'>&nbsp;</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'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>