<span style="font-family: courier new,monospace;">There is a bug in vtkWedge::EvaluatePosition, it can tell a point is inside when in reality it is outside.</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">E.g, try to create a vtkWedge with the following points:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">(8,0,0), (16,0,0), (16,8,0), (8,0,8), (16,0,8), (16,8,8)
</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">And try to EvaluatePosition for point (17,6,4). It will return 1, telling it is inside.
</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">A solution is to change the following code:</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  if ( pcoords[0] >= -0.001 && pcoords[0] <= 1.001 &&</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  pcoords[1] >= -0.001 && pcoords[1] <= 1.001 &&</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
  pcoords[2] >= -0.001 && pcoords[2] <= 1.001 )</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">To:</span>
<br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   if ( pcoords[0] >= -0.001 && pcoords[1] >= -0.001 &&
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">       (pcoords[0] + pcoords[1]) <= 1.001 &&</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
        pcoords[2] >= -0.001 && pcoords[2] <= 1.001 )</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> There is another bug in its faces array (and with GetFace and GetFaceArray):<br>The faces normals are pointing inside, instead of outside (as of all other 3D cells).<br>Instead of:
</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">static int faces[5][4] = { {0,1,2,-1}, {3,5,4,-1}, </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">                           {0,3,4,1}, {1,4,5,2}, {2,5,3,0} };</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
It should be:</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">static int faces[5][4] = { {0,2,1,-1}, {3,4,5,-1}, </span>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                           {0,1,4,3}, {1,2,5,4}, {2,0,3,5} };</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<br><br>--<br>Edson Tadeu M. Manoel<br>ESSS - Engineering Simulation and Scientific Software<br><a href="http://www.esss.com.br">http://www.esss.com.br</a><br><br><br><br>