From c388ce32fc825b5b79fc3ec33e7906ca712fe365 Mon Sep 17 00:00:00 2001 From: DarioS Date: Sun, 19 Dec 2021 18:45:04 +0100 Subject: [PATCH] EgtExecutor 2.3l3 : - aggiunte funzioni Exe e Lua AutoNestSetStripYconstraintToPart e AutoNestSetStripXconstraintToPart. --- EXE_NstAutoNesting.cpp | 20 ++++++++++++++++++ EgtExecutor.rc | Bin 16184 -> 16184 bytes LUA_Nesting.cpp | 45 ++++++++++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) 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 85a6901336e18f304be38d794b13f4e0e3866250..7d59b2a2e220c2383d4df67f179f6d7c30be12a1 100644 GIT binary patch delta 105 zcmdl{x1(;uA2vqg%@@V4Gflq2nKwB}L}GFQr`YBKt{N7g_(8eLOp^}?BE$`p+!!}6 e64qk|YjR~q(%{Fqd6G0(;-H)(Lc&0aLlyuJ03!wf delta 97 zcmdl{x1(;uA2vp#%@@V4Gflq2na5}}Ignd-a{*Tk3sCf++-0W82LxfF21;&>n->Y| cF@rU@0x76sKgP|Iq`|@mV0Jo1HG5`Po 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) ;