diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 4d87599..38a1e89 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -1,4 +1,4 @@ --- ProcessDrill.lua by Egaltech s.r.l. 2020/10/14 +-- ProcessDrill.lua by Egaltech s.r.l. 2020/10/25 -- Gestione calcolo forature per Travi -- Tabella per definizione modulo @@ -294,9 +294,18 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert) end -- imposto posizione braccio porta testa - local nSCC = MCH_SCC.ADIR_YM - if vtExtr:getY() > 100 * GEO.EPS_ZERO then - nSCC = MCH_SCC.ADIR_YP + local nSCC = MCH_SCC.NONE + if not BD.C_SIMM then + nSCC = MCH_SCC.ADIR_YM + if AreSameVectorApprox( vtExtr, Z_AX()) then + nSCC = MCH_SCC.ADIR_YM + elseif abs( vtExtr:getX()) < 0.1 then + nSCC = MCH_SCC.ADIR_XP + elseif vtExtr:getY() > 0.1 then + nSCC = MCH_SCC.ADIR_YP + end + else + nSCC = MCH_SCC.NONE end EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- aggiusto l'affondamento diff --git a/Process.lua b/Process.lua index 4422367..46b1c56 100644 --- a/Process.lua +++ b/Process.lua @@ -1,7 +1,8 @@ --- Process.lua by Egaltech s.r.l. 2020/01/08 +-- Process.lua by Egaltech s.r.l. 2020/10/25 -- Gestione calcolo disposizione e lavorazioni per Travi -- Si opera sulla macchina corrente -- 2020/01/08 Aggiunta seconda sezione limite (BD.MAX_WIDTH2 x BD.MAX_HEIGHT2). +-- 2020/10/25 Se assegno lunghezza barra nulla prende il minimo calcolato. -- Intestazioni require( 'EgtBase') @@ -162,6 +163,7 @@ local function MyProcessBeams() EgtDraw() return false end + if dRawL < GEO.EPS_SMALL then dRawL = dTotLen + dAddLen + 0.5 end dRawL = min( dRawL, BD.MAX_RAW) local dOvmHead = EgtEvalNumExpr( vsVal[2]) if not dOvmHead then