diff --git a/EXE_NstAutoNesting.cpp b/EXE_NstAutoNesting.cpp index 5502e01..bf142e9 100644 --- a/EXE_NstAutoNesting.cpp +++ b/EXE_NstAutoNesting.cpp @@ -229,6 +229,26 @@ ExeAutoNestSetRestrictedZoneToPart( int nPartId, int nRzConstrId) return s_pAutoNester->SetRestrictedZoneToPart( nPartId, nRzConstrId) ; } +//----------------------------------------------------------------------------- +bool +ExeAutoNestSetStripYconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) +{ + if ( IsNull( s_pAutoNester)) + return false ; + // aggiungo il vincolo di punto su linee parallele a Y costante (parallele ad asse X) al pezzo + return s_pAutoNester->SetStripYconstraintToPart( nPartId, ptRef, dStripStart, dStripRepeat) ; +} + +//----------------------------------------------------------------------------- +bool +ExeAutoNestSetStripXconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) +{ + if ( IsNull( s_pAutoNester)) + return false ; + // aggiungo il vincolo di punto su linee parallele a X costante (parallele ad asse Y) al pezzo + return s_pAutoNester->SetStripXconstraintToPart( nPartId, ptRef, dStripStart, dStripRepeat) ; +} + //----------------------------------------------------------------------------- bool ExeAutoNestSetInterpartGap( double dGap) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 85a6901..7d59b2a 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_Nesting.cpp b/LUA_Nesting.cpp index fe07a48..19882d8 100644 --- a/LUA_Nesting.cpp +++ b/LUA_Nesting.cpp @@ -15,6 +15,7 @@ #include "stdafx.h" #include "LUA.h" #include "/EgtDev/Include/EXeExecutor.h" +#include "/EgtDev/Include/EGkLuaAux.h" using namespace std ; @@ -284,6 +285,46 @@ LuaAutoNestSetRestrictedZoneToPart( lua_State* L) return 1 ; } +//------------------------------------------------------------------------------- +static int +LuaAutoNestSetStripYconstraintToPart( lua_State* L) +{ + // 4 parametri : nPartId, ptRef, dStripStart, dStripRepeat + int nPartId ; + LuaCheckParam( L, 1, nPartId) + Point3d ptRef ; + LuaCheckParam( L, 2, ptRef) + double dStripStart ; + LuaCheckParam( L, 3, dStripStart) + double dStripRepeat ; + LuaCheckParam( L, 4, dStripRepeat) + // aggiungo il vincolo di punto su linee parallele a Y costante (parallele ad asse X) al pezzo + bool bOk = ExeAutoNestSetStripYconstraintToPart( nPartId, ptRef, dStripStart, dStripRepeat) ; + // restituisco il risultato + LuaSetParam( L, bOk) ; + return 1 ; +} + +//------------------------------------------------------------------------------- +static int +LuaAutoNestSetStripXconstraintToPart( lua_State* L) +{ + // 4 parametri : nPartId, ptRef, dStripStart, dStripRepeat + int nPartId ; + LuaCheckParam( L, 1, nPartId) + Point3d ptRef ; + LuaCheckParam( L, 2, ptRef) + double dStripStart ; + LuaCheckParam( L, 3, dStripStart) + double dStripRepeat ; + LuaCheckParam( L, 4, dStripRepeat) + // aggiungo il vincolo di punto su linee parallele a X costante (parallele ad asse Y) al pezzo + bool bOk = ExeAutoNestSetStripXconstraintToPart( nPartId, ptRef, dStripStart, dStripRepeat) ; + // restituisco il risultato + LuaSetParam( L, bOk) ; + return 1 ; +} + //------------------------------------------------------------------------------- static int LuaAutoNestSetInterpartGap( lua_State* L) @@ -443,7 +484,9 @@ LuaInstallNesting( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestAddHoleToPart", LuaAutoNestAddHoleToPart) ; bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestAddAnotherOutlineToPart", LuaAutoNestAddAnotherOutlineToPart) ; bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestAddToolOutlineToPart", LuaAutoNestAddToolOutlineToPart) ; - bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetRestrictedZoneToPart", LuaAutoNestSetRestrictedZoneToPart) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetRestrictedZoneToPart", LuaAutoNestSetRestrictedZoneToPart) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetStripYconstraintToPart", LuaAutoNestSetStripYconstraintToPart) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetStripXconstraintToPart", LuaAutoNestSetStripXconstraintToPart) ; bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetInterpartGap", LuaAutoNestSetInterpartGap) ; bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetReportFile", LuaAutoNestSetReportFile) ; bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestCompute", LuaAutoNestCompute) ;