From b5a2490fd485c93ecea3d385462f2ae987a0dbc3 Mon Sep 17 00:00:00 2001 From: SaraP Date: Fri, 17 Jan 2025 12:21:25 +0100 Subject: [PATCH] EgtGeomKernel : - piccola correzione triangolazione avanzata. --- Triangulate.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Triangulate.cpp b/Triangulate.cpp index adde136..ee1d5f2 100644 --- a/Triangulate.cpp +++ b/Triangulate.cpp @@ -241,23 +241,21 @@ Triangulate::MakeAdvanced( const POLYLINEVECTOR& vPLORIG, PNTVECTOR& vPt, INTVEC POLYLINEVECTOR vPL ; Vector3d vtN ; - // se non sono stati passate le info per ordinare le polyline allora le ordino + // se non sono stati passate le info per ordinare le polyline allora le ordino INTMATRIX vnPLIndMat ; BOOLVECTOR vbInvert ; - if( vnPLIndMatPre.size() == 0){ + if( vnPLIndMatPre.size() == 0) { if ( ! CalcRegionPolyLines( vPLORIG, vtN, vnPLIndMat, vbInvert)) return false ; vPL = vPLORIG ; - for ( int i = 0 ; i < int( vnPLIndMat.size()) ; ++i) { - for ( int j = 0 ; j < int( vnPLIndMat[i].size()) ; ++j){ - if( vbInvert[vnPLIndMat[i][j]]) - vPL.back().Invert() ; - } + for ( int i = 0 ; i < int( vbInvert.size()) ; i++) { + if( vbInvert[i]) + vPL[i].Invert() ; } } else { - // ho già calcolato e riordinato tutto, devo solo fare una copia delle polyline - // non serve fare le eventuali inversioni delle polyline, perché se è già stata calcolata la matrice dei chunck allora sono GIà state invertire + // ho già calcolato e riordinato tutto, devo solo fare una copia delle polyline + // non serve fare le eventuali inversioni delle polyline, perché se è già stata calcolata la matrice dei chunck allora sono già state invertire vPL = vPLORIG ; vnPLIndMat = vnPLIndMatPre ; }