[vtk-developers] Edges, vtkLine, and vtkPolyLine

Will Schroeder will.schroeder at kitware.com
Fri May 30 12:00:59 EDT 2008


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.

W

On Fri, May 30, 2008 at 11:53 AM, Wilson, Andrew T <atwilso at sandia.gov>
wrote:

> I'm working on an application where I'm trying to select parts of a
> wireframe using vtkExtractSelectedFrustum.  After some chasing, I've found
> the following strange behavior:
>
> The GetNumberOfEdges() method on vtkLine and vtkPolyLine returns 0.  The
> GetEdge(int id) method returns NULL.  This seems counterintuitive: those
> cells are nothing *but* edges.  Is this deliberate?
>
> The downstream effect of this is that it's not possible for me to select in
> the middle of an edge because of the following bit of code.  This is from
> vtkExtractSelectedFrustum.cxx around line 882:
>
>    if (nedges < 1 &&)
>      {
>      delete[] vertbuffer;
>      return this->IsectDegenerateCell(cell);
>      }
>
> IsectDegenerateCell test cells for being in or out by examining the points.
> For line and polyline cells that's not sufficient -- we need to test the
> lines as well.
>
> The natural solution to this seems to be to have vtkLine and vtkPolyLine
> return something reasonable for GetNumberOfEdges() and GetEdge().  If that
> happens, there's code later in the method that will check the line segments
> against the frustum one by one, which is the right thing.
>
> Is there a reason not to do it this way?  If I don't hear any objections
> I'll implement it and see if anything in the test cases breaks.
>
> -- Andy
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>



-- 
William J. Schroeder, PhD
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com
http://www.kitware.com
518-371-3971 (phone and fax)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080530/2997e95c/attachment.html>


More information about the vtk-developers mailing list