[prev in list] [next in list] [prev in thread] [next in thread]
List: vtk-developers
Subject: [vtk-developers] Bug about vtkDelaunay2D and Modify
From: "=?gb2312?B?sc/B1g==?=" <beelin () sohu ! com>
Date: 2007-02-02 2:57:02
Message-ID: 20070202025601.794230213642 () sohum19 ! sohu ! com
[Download RAW message or body]
HI,
I find a big bug about vtkDelaunay2D,and I have modified it as follows:
int vtkDelaunay2D::RecoverEdge(vtkIdType p1, vtkIdType p2)
{
....................................
....................................
// We found initial triangle; begin to track triangles containing edge. Also,
// the triangle defines the beginning of two "chains" which form a boundary of
// enclosing triangles around the edge. Create the two chains (from p1 to p2).
// (The chains are actually defining two polygons on either side of the edge.)
//
tris->InsertId(0, cellId);
rightChain->InsertId(0, p1); rightChainX->InsertPoint(0, p1X);
leftChain->InsertId(0, p1); leftChainX->InsertPoint(0, p1X);
if ( signX1 > 0 )
{
rightChain->InsertId(1, v1); rightChainX->InsertPoint(1, x1);
leftChain->InsertId(1, v2); leftChainX->InsertPoint(1, x2);
}
else
{
leftChain->InsertId(1, v1); leftChainX->InsertPoint(1, x1);
rightChain->InsertId(1, v2); rightChainX->InsertPoint(1, x2);
//===================================
//where the bug :
//Modify:Now have to exchange the v1 and v2
int temp = 0;
temp = v1; v1 = v2; v2 = temp;
//===================================
}
// Walk along triangles (edge neighbors) towards point p2.
...........................................................
...........................................................
}
穎爽(Bi Lin)
beelin@sohu.com
2007-02-02
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic