EgtNesting 2.3l2 :

- aggiunte funzioni SetStripYconstraintToPart e SetStripXconstraintToPart.
This commit is contained in:
DarioS
2021-12-19 18:44:06 +01:00
parent 87b64f9ef3
commit 4334647220
3 changed files with 41 additions and 0 deletions
+39
View File
@@ -20,6 +20,7 @@
#include "/EgtDev/Extern/Optalog/Include/cns.h"
#include "/EgtDev/Extern/Optalog/Include/cns_tooling.h"
#include "/EgtDev/Extern/Optalog/Include/cns_restricted_zone.h"
#include "/EgtDev/Extern/Optalog/Include/cns_textile.h"
#include "/EgtDev/Extern/Optalog/Include/cns_egaltech.h"
#include "/EgtDev/Include/SELkLockId.h"
@@ -360,6 +361,44 @@ AutoNester::SetRestrictedZoneToPart( int nPartId, int nRzConstrId)
return true ;
}
//----------------------------------------------------------------------------
bool
AutoNester::SetStripYconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat)
{
if ( m_pOrder == nullptr)
return false ;
// cerco il pezzo
const auto Iter = m_IdPartPtr.find( nPartId) ;
if ( Iter == m_IdPartPtr.end())
return false ;
CNS_PartPtr pPart = Iter->second ;
// imposto il vincolo
CNS_Point CNSPT_Ref ;
CNSPT_Ref.x = ptRef.x ;
CNSPT_Ref.y = ptRef.y ;
CNS_SetPartStripYconstraint( pPart, CNSPT_Ref, dStripStart, dStripRepeat) ;
return true ;
}
//----------------------------------------------------------------------------
bool
AutoNester::SetStripXconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat)
{
if ( m_pOrder == nullptr)
return false ;
// cerco il pezzo
const auto Iter = m_IdPartPtr.find( nPartId) ;
if ( Iter == m_IdPartPtr.end())
return false ;
CNS_PartPtr pPart = Iter->second ;
// imposto il vincolo
CNS_Point CNSPT_Ref ;
CNSPT_Ref.x = ptRef.x ;
CNSPT_Ref.y = ptRef.y ;
CNS_SetPartStripXconstraint( pPart, CNSPT_Ref, dStripStart, dStripRepeat) ;
return true ;
}
//----------------------------------------------------------------------------
bool
AutoNester::SetInterpartGap( double dGap)