EgtGemoKernel :
- piccola correzione.
This commit is contained in:
@@ -1441,18 +1441,20 @@ Tree::GetPolygons( POLYLINEMATRIX& vvPolygons, POLYLINEMATRIX& vvPolygons3d, vec
|
||||
if ( ! TraceLoopLabelCell( vPolygonsBasic))
|
||||
return false ;
|
||||
// scorro sulle celle e costruisco i poligoni
|
||||
int nPoly = 0 ;
|
||||
int nPolyInd = 0 ; // indice del poligono corrispondente alla cella, nel vettore dei poligoni
|
||||
for ( int nId: m_vnLeaves) {
|
||||
// costruisco i poligoni partendo dal vettore delle intersezioni, come spiegato a pag15 di Cripps
|
||||
if ( m_mTree[nId].m_nFlag == 4) {
|
||||
// vettore dei poligoni ( loop) della cella nId
|
||||
vvPolygons.emplace_back() ;
|
||||
vvPolygons.back().push_back(std::move(vPolygonsCorrected[nPoly])) ;
|
||||
vvPolygons.back().push_back(std::move(vPolygonsCorrected[nPolyInd])) ;
|
||||
vvPolygons3d.emplace_back() ;
|
||||
vvPolygons3d.back().push_back(std::move(vPolygonsBasic3d[nPoly])) ;
|
||||
vvPolygons3d.back().push_back(std::move(vPolygonsBasic3d[nPolyInd])) ;
|
||||
}
|
||||
else if ( m_mTree[nId].m_nFlag == 0)
|
||||
else if ( m_mTree[nId].m_nFlag == 0) {
|
||||
++ nPolyInd ;
|
||||
continue ;
|
||||
}
|
||||
else if( m_mTree[nId].m_nCollapsed != Cell::Collapsed::NO_COLLAPSE)
|
||||
continue ;
|
||||
else {
|
||||
@@ -1468,14 +1470,14 @@ Tree::GetPolygons( POLYLINEMATRIX& vvPolygons, POLYLINEMATRIX& vvPolygons3d, vec
|
||||
while ( ! vToCheck.empty()) {
|
||||
int nPolyBefore = nPoly ;
|
||||
PolyLine pl3d ;
|
||||
CreateCellPolygons( nId, vvPolygons, vvPolygons3d, vToCheck, nPoly, vnParentChunk, vPolygonsCorrected[nPoly], vPolygonsBasic3d[nPoly]) ;
|
||||
CreateCellPolygons( nId, vvPolygons, vvPolygons3d, vToCheck, nPoly, vnParentChunk, vPolygonsCorrected[nPolyInd], vPolygonsBasic3d[nPolyInd]) ;
|
||||
if ( nPolyBefore == nPoly)
|
||||
break ;
|
||||
}
|
||||
// ora analizzo anche i loop che sono contenuti nella cella
|
||||
CreateIslandAndHoles( nId, vvPolygons, vvPolygons3d, nPoly, vnParentChunk, vPolygonsCorrected[nPoly], vPolygonsBasic3d[nPoly]) ;
|
||||
CreateIslandAndHoles( nId, vvPolygons, vvPolygons3d, nPoly, vnParentChunk, vPolygonsCorrected[nPolyInd], vPolygonsBasic3d[nPolyInd]) ;
|
||||
}
|
||||
++ nPoly ;
|
||||
++ nPolyInd ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user