EgtExecutor :

- migliorie a ExeAdjustFlatPartLayer per propagare le Info.
This commit is contained in:
Dario Sassi
2020-01-21 11:00:13 +00:00
parent 58ce77fd00
commit dbf5cf4e48
2 changed files with 31 additions and 5 deletions
+1 -1
View File
@@ -1755,7 +1755,7 @@ MyCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
++ nCount ;
// assegno nota con curve originali
if ( ! bErase)
pGeomDB->SetInfo( nNewId, "ORIG", vOrig) ;
pGeomDB->SetInfo( nNewId, CRV_ORIG, vOrig) ;
}
// se ok e richiesta cancellazione curve originali
if ( nFirstId != GDB_ID_NULL && bErase) {
+30 -4
View File
@@ -1056,10 +1056,36 @@ ExeAdjustFlatPartLayer( int nLayerId)
}
nId = pGeomDB->GetNext( nId) ;
}
if ( vAccwIds.size() > 1)
bOk = bOk && ExeCreateCurveCompoByReorder( nLayerId, vAccwIds, ORIG, true, RTY_GLOB, nullptr) != GDB_ID_NULL ;
if ( vAcwIds.size() > 1)
bOk = bOk && ExeCreateCurveCompoByReorder( nLayerId, vAcwIds, ORIG, true, RTY_GLOB, nullptr) != GDB_ID_NULL ;
if ( bOk && vAccwIds.size() > 1) {
int nCount = 0 ;
int nFirstId = ExeCreateCurveCompoByReorder( nLayerId, vAccwIds, ORIG, false, RTY_GLOB, &nCount) ;
for ( int i = 0 ; i < nCount ; ++ i) {
int nCurrId = nFirstId + i ;
INTVECTOR vOrigId ;
pGeomDB->GetInfo( nCurrId, CRV_ORIG, vOrigId) ;
for ( int j = 0 ; j < int( vOrigId.size()) ; ++ j) {
if ( j == 0)
pGeomDB->CopyAttributes( vOrigId[j], nCurrId) ;
pGeomDB->Erase( vOrigId[j]) ;
}
}
bOk = bOk && ( nCount > 0) ;
}
if ( bOk && vAcwIds.size() > 1) {
int nCount = 0 ;
int nFirstId = ExeCreateCurveCompoByReorder( nLayerId, vAcwIds, ORIG, false, RTY_GLOB, &nCount) ;
for ( int i = 0 ; i < nCount ; ++ i) {
int nCurrId = nFirstId + i ;
INTVECTOR vOrigId ;
pGeomDB->GetInfo( nCurrId, CRV_ORIG, vOrigId) ;
for ( int j = 0 ; j < int( vOrigId.size()) ; ++ j) {
if ( j == 0)
pGeomDB->CopyAttributes( vOrigId[j], nCurrId) ;
pGeomDB->Erase( vOrigId[j]) ;
}
}
bOk = bOk && ( nCount > 0) ;
}
// spezzo le curve composite con discontinuità
nId = pGeomDB->GetFirstInGroup( nLayerId) ;
while ( nId != GDB_ID_NULL && bOk) {