EgtExecutor :
- modifiche a ExeAutomaticPackParts per nesting automatico con tagli ghigliottina in presenza di contorni con WJ.
This commit is contained in:
@@ -2046,8 +2046,8 @@ GetFlatPartInterpartGap(IGeomDB* pGeomDB, int nId, double& dGap)
|
||||
int nClId = pGeomDB->GetFirstGroupInGroup( nMchId) ;
|
||||
while ( nClId != GDB_ID_NULL) {
|
||||
double dCurrGap ;
|
||||
if (pGeomDB->GetInfo(nClId, MCH_PV_KEY_WT, dCurrGap) && dCurrGap > dGap)
|
||||
dGap = dCurrGap;
|
||||
if ( pGeomDB->GetInfo(nClId, MCH_PV_KEY_WT, dCurrGap) && dCurrGap > dGap)
|
||||
dGap = dCurrGap ;
|
||||
nClId = pGeomDB->GetNextGroup( nClId) ;
|
||||
}
|
||||
nMchId = pGeomDB->GetNextGroup( nMchId) ;
|
||||
|
||||
+19
-10
@@ -2143,12 +2143,29 @@ ExeAutomaticPackParts( INTVECTOR& vIds, bool bMinimizeOnXvsY, bool bReducedCut,
|
||||
if ( bPartAlreadyNested)
|
||||
bGuillotineMode = false ;
|
||||
|
||||
// Se richiesta modalità ghigliottina
|
||||
if ( bGuillotineMode) {
|
||||
// cerco il gap necessario tra le parti
|
||||
double dGap = 0 ;
|
||||
for ( int nPartId : vIds) {
|
||||
nPartId = abs( nPartId) ;
|
||||
double dCurrGap = 0 ;
|
||||
if ( GetFlatPartInterpartGap( pGeomDB, nPartId, dCurrGap) && dCurrGap > dGap)
|
||||
dGap = dCurrGap ;
|
||||
}
|
||||
// se non trovato disabilito richiesta modalità ghigliottina
|
||||
if ( dGap < EPS_SMALL)
|
||||
bGuillotineMode = false ;
|
||||
// altrimenti lo imposto
|
||||
else
|
||||
ExeAutoNestSetInterpartGap( dGap) ;
|
||||
}
|
||||
|
||||
// Se richiesto e abilitato, imposto modalità ghigliottina
|
||||
if ( bGuillotineMode)
|
||||
ExeAutoNestSetGuillotineMode() ;
|
||||
|
||||
// Assegno i pezzi da nestare
|
||||
double dGap = 0 ;
|
||||
for ( int nPartId : vIds) {
|
||||
nPartId = abs( nPartId) ;
|
||||
// flag rotazione
|
||||
@@ -2160,7 +2177,7 @@ ExeAutomaticPackParts( INTVECTOR& vIds, bool bMinimizeOnXvsY, bool bReducedCut,
|
||||
int nDwnRegId = GetFlatPartDownRegion( pGeomDB, nPartId) ;
|
||||
if ( nDwnRegId != GDB_ID_NULL)
|
||||
ExeAutoNestAddAnotherOutlineToPart( nPartId, nDwnRegId) ;
|
||||
// se non è ghigliottina imposto le regioni dei tagli
|
||||
// se non è ghigliottina imposto le regioni dei tagli (con ghigliottina si usa il gap)
|
||||
if ( ! bGuillotineMode) {
|
||||
// recupero regioni dei tagli del pezzo
|
||||
INTVECTOR vCutReg ;
|
||||
@@ -2171,15 +2188,7 @@ ExeAutomaticPackParts( INTVECTOR& vIds, bool bMinimizeOnXvsY, bool bReducedCut,
|
||||
for ( int nRegId : vCutReg)
|
||||
ExeAutoNestAddToolOutlineToPart( nPartId, nRegId) ;
|
||||
}
|
||||
// altrimenti recupero InterpartGap
|
||||
else {
|
||||
double dCurrGap = 0 ;
|
||||
if ( GetFlatPartInterpartGap( pGeomDB, nPartId, dCurrGap) && dCurrGap > dGap)
|
||||
dGap = dCurrGap ;
|
||||
}
|
||||
}
|
||||
if ( bGuillotineMode)
|
||||
ExeAutoNestSetInterpartGap( dGap) ;
|
||||
|
||||
// Eseguo il nesting
|
||||
ExeAutoNestCompute( bMinimizeOnXvsY, nMaxTime) ;
|
||||
|
||||
Reference in New Issue
Block a user