EgtExecutor :
- aggiunta funzione Exe/Lua AddAnotherOutlineToPart - in ExeAutomaticPac aggiunta gestione di pezzi con tagli inclinati.
This commit is contained in:
+23
-10
@@ -2109,12 +2109,18 @@ ExeAutomaticPackParts( INTVECTOR& vIds, bool bMinimizeOnXvsY, bool bReducedCut,
|
||||
// recupero regione del pezzo
|
||||
int nRegId = GetFlatPartRegion( pGeomDB, nId) ;
|
||||
ExeAutoNestAddDefectToSheet( nSheetId, nRegId) ;
|
||||
// recupero eventuale regione in basso del pezzo
|
||||
int nDwnRegId = GetFlatPartDownRegion( pGeomDB, nId) ;
|
||||
if ( nDwnRegId != GDB_ID_NULL)
|
||||
ExeAutoNestAddDefectToSheet( nSheetId, nDwnRegId) ;
|
||||
// recupero regioni dei tagli del pezzo
|
||||
INTVECTOR vCutReg ;
|
||||
if ( GetFlatPartCutRegions( pGeomDB, nId, bReducedCut, vCutReg)) {
|
||||
for ( int nRegId : vCutReg)
|
||||
ExeAutoNestAddDefectToSheet( nSheetId, nRegId) ;
|
||||
}
|
||||
if ( ! GetFlatPartCutRegions( pGeomDB, nId, bReducedCut, vCutReg))
|
||||
return false ;
|
||||
// recupero eventuali regioni in basso dei tagli del pezzo
|
||||
GetFlatPartDownCutRegions( pGeomDB, nId, bReducedCut, vCutReg) ;
|
||||
for ( int nRegId : vCutReg)
|
||||
ExeAutoNestAddDefectToSheet( nSheetId, nRegId) ;
|
||||
}
|
||||
}
|
||||
nId = ( bInRoot ? ExeGetNextPart( nId, true) : ExeGetNextGroup( nId)) ;
|
||||
@@ -2123,16 +2129,23 @@ ExeAutomaticPackParts( INTVECTOR& vIds, bool bMinimizeOnXvsY, bool bReducedCut,
|
||||
// Assegno i pezzi da nestare
|
||||
for ( int nPartId : vIds) {
|
||||
nPartId = abs( nPartId) ;
|
||||
// recupero regione del pezzo e flag rotazione abilitata
|
||||
int nRegId = GetFlatPartRegion( pGeomDB, nPartId) ;
|
||||
// flag rotazione
|
||||
bool bEnableRot = ! pGeomDB->ExistsInfo( nPartId, NST_PART_ROT) ;
|
||||
// recupero regione del pezzo
|
||||
int nRegId = GetFlatPartRegion( pGeomDB, nPartId) ;
|
||||
ExeAutoNestAddPart( nPartId, nRegId, false, bEnableRot, 0.0, 0, 1) ;
|
||||
// recupero eventuale regione in basso del pezzo
|
||||
int nDwnRegId = GetFlatPartDownRegion( pGeomDB, nPartId) ;
|
||||
if ( nDwnRegId != GDB_ID_NULL)
|
||||
ExeAddAnotherOutlineToPart( nPartId, nDwnRegId) ;
|
||||
// recupero regioni dei tagli del pezzo
|
||||
INTVECTOR vCutReg ;
|
||||
if ( GetFlatPartCutRegions( pGeomDB, nPartId, bReducedCut, vCutReg)) {
|
||||
for ( int nRegId : vCutReg)
|
||||
ExeAutoNestAddToolOutlineToPart( nPartId, nRegId) ;
|
||||
}
|
||||
if ( ! GetFlatPartCutRegions( pGeomDB, nPartId, bReducedCut, vCutReg))
|
||||
return false ;
|
||||
// recupero eventuali regioni in basso dei tagli del pezzo
|
||||
GetFlatPartDownCutRegions( pGeomDB, nPartId, bReducedCut, vCutReg) ;
|
||||
for ( int nRegId : vCutReg)
|
||||
ExeAutoNestAddToolOutlineToPart( nPartId, nRegId) ;
|
||||
}
|
||||
|
||||
// Eseguo il nesting
|
||||
|
||||
Reference in New Issue
Block a user