<div class="gmail_quote">On Fri, Oct 22, 2010 at 12:54 PM, John Haiducek <span dir="ltr"><<a href="mailto:jhaiduce@gmail.com">jhaiduce@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
After obtaining and examining a traceback, I found the segmentation fault was occurring in vtkHexahedron::InterpolationFunctions, which apparently expects the double*weights to be an array of 8 doubles. This is aggravating, since the documentation says nothing about the expected length of *weights. The example at <a href="http://www.cmake.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject2" target="_blank">http://www.cmake.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject2</a> uses double weights[3], which also makes no sense since there's no way to make a 3-dimensional cell with only 3 faces/vertices. Can anyone tell me exactly what's expected to be passed to vtkPointSet::FindCell()??<br>
</blockquote><div><br></div>John,</div><div class="gmail_quote"><br></div><div class="gmail_quote">From this:</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote"><a href="http://www.vtk.org/doc/nightly/html/classvtkCell.html#a463203095c011df36980b4677e8825b0">http://www.vtk.org/doc/nightly/html/classvtkCell.html#a463203095c011df36980b4677e8825b0</a></div>
<div class="gmail_quote">(vtkCell::EvaluatePosition, the function that is eventually called by FindCell), I believe the length of weights array must be the same as the number of points in the cell. I'm not sure how you are supposed to know this ahead of time in general...</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">In the example you mentioned the array was made length 3 because all of the cells are triangles (3 points).</div><div class="gmail_quote"><br></div><div class="gmail_quote">
Hopefully someone else will be able to shed some light on the typical process of determining the number of points in the cell before the cell id is known.</div><div class="gmail_quote"><br>David</div>