bug about vtkDelaunay2D (sourcecode)
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
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. ........................................................... ........................................................... }