[vtk-developers] Edges, vtkLine, and vtkPolyLine
David E DeMarle
dave.demarle at kitware.com
Wed Jun 4 09:14:56 EDT 2008
You might also change that extractor filter without changing vtkCell.
After that if, put in another if that tests for vtkLine or vtkPolyLine
type cells and then do a more specific intersection test then the
2008/5/30 Will Schroeder <will.schroeder at kitware.com>:
> 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.
> On Fri, May 30, 2008 at 11:53 AM, Wilson, Andrew T <atwilso at sandia.gov>
>> 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
>> 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
>> 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
>> 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
> William J. Schroeder, PhD
> Kitware, Inc.
> 28 Corporate Drive
> Clifton Park, NY 12065
> will.schroeder at kitware.com
> 518-371-3971 (phone and fax)
> vtk-developers mailing list
> vtk-developers at vtk.org
More information about the vtk-developers