From eaa7d55d57e21a55e94194f8faa608991f1fa3de Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 14 Mar 2016 18:15:06 +0000 Subject: [PATCH] EgtExecutor : - piccola miglioria per snap durante nesting con tagli inclinati. --- EXE_NstCreateFlatParts.cpp | 4 +++- EXE_NstPartNesting.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/EXE_NstCreateFlatParts.cpp b/EXE_NstCreateFlatParts.cpp index 839853b..346510f 100644 --- a/EXE_NstCreateFlatParts.cpp +++ b/EXE_NstCreateFlatParts.cpp @@ -1029,7 +1029,9 @@ GetFlatPartFromRegion( IGeomDB* pGeomDB, int nId) // verifico che il layer di appartenenza sia una regione int nLayerId = pGeomDB->GetParentId( nId) ; string sName ; - if ( ! pGeomDB->GetName( nLayerId, sName) && ! EqualNoCase( sName, NST_PARTREG_LAYER)) + if ( ! pGeomDB->GetName( nLayerId, sName) && + ! EqualNoCase( sName, NST_PARTREG_LAYER) && + ! EqualNoCase( sName, NST_PARTDOWNREG_LAYER)) return GDB_ID_NULL ; // restituisco il padre del layer return ( pGeomDB->GetParentId( nLayerId)) ; diff --git a/EXE_NstPartNesting.cpp b/EXE_NstPartNesting.cpp index 12954d2..61e3eec 100644 --- a/EXE_NstPartNesting.cpp +++ b/EXE_NstPartNesting.cpp @@ -1409,6 +1409,7 @@ ExeMoveToSnapPointOnCollision( const INTVECTOR& vIds, bool bReducedCut, double d INTVECTOR vCuts ; if ( ! GetFlatPartCutRegions( pGeomDB, nPartId, bReducedCut, vCuts)) return false ; + GetFlatPartDownCutRegions( pGeomDB, nPartId, bReducedCut, vCuts) ; // cerco il taglio che si sovrappone a quello del mobile BBox3d b3CutM ; pGeomDB->GetGlobalBBox( nCutM, b3CutM) ; @@ -1442,6 +1443,7 @@ ExeMoveToSnapPointOnCollision( const INTVECTOR& vIds, bool bReducedCut, double d INTVECTOR vCuts ; if ( ! GetFlatPartCutRegions( pGeomDB, nPartId, bReducedCut, vCuts)) return false ; + GetFlatPartDownCutRegions( pGeomDB, nPartId, bReducedCut, vCuts) ; // cerco il taglio che si sovrappone a quello del fisso BBox3d b3CutF ; pGeomDB->GetGlobalBBox( nCutF, b3CutF) ;