It is deliberate. a 1D cell has no edges. A 2D cell has no faces. The
mind set is that edges and faces are (n-1)-dimensional boundary
entities of a n-dimensional cell. There are other ways to address this;
changing this behavior at this point is not a good idea.<br>
<br>
W<br><br><div class="gmail_quote">On Fri, May 30, 2008 at 11:53 AM, Wilson, Andrew T <<a href="mailto:atwilso@sandia.gov">atwilso@sandia.gov</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm working on an application where I'm trying to select parts of a<br>
wireframe using vtkExtractSelectedFrustum.  After some chasing, I've found<br>
the following strange behavior:<br>
<br>
The GetNumberOfEdges() method on vtkLine and vtkPolyLine returns 0.  The<br>
GetEdge(int id) method returns NULL.  This seems counterintuitive: those<br>
cells are nothing *but* edges.  Is this deliberate?<br>
<br>
The downstream effect of this is that it's not possible for me to select in<br>
the middle of an edge because of the following bit of code.  This is from<br>
vtkExtractSelectedFrustum.cxx around line 882:<br>
<br>
    if (nedges < 1 &&)<br>
      {<br>
      delete[] vertbuffer;<br>
      return this->IsectDegenerateCell(cell);<br>
      }<br>
<br>
IsectDegenerateCell test cells for being in or out by examining the points.<br>
For line and polyline cells that's not sufficient -- we need to test the<br>
lines as well.<br>
<br>
The natural solution to this seems to be to have vtkLine and vtkPolyLine<br>
return something reasonable for GetNumberOfEdges() and GetEdge().  If that<br>
happens, there's code later in the method that will check the line segments<br>
against the frustum one by one, which is the right thing.<br>
<br>
Is there a reason not to do it this way?  If I don't hear any objections<br>
I'll implement it and see if anything in the test cases breaks.<br>
<br>
-- Andy<br>
<br>
<br>
_______________________________________________<br>
vtk-developers mailing list<br>
<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a><br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>William J. Schroeder, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065<br><a href="mailto:will.schroeder@kitware.com">will.schroeder@kitware.com</a><br>
<a href="http://www.kitware.com">http://www.kitware.com</a><br>518-371-3971 (phone and fax)