diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index 19ee90d..16e5e91 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -1,4 +1,4 @@ --- ProcessFreeContour.lua by Egaltech s.r.l. 2021/01/29 +-- ProcessFreeContour.lua by Egaltech s.r.l. 2021/10/07 -- Gestione calcolo profilo libero per Travi -- Tabella per definizione modulo @@ -255,25 +255,27 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) local nSide = 0 -- verifiche per affondamento ( possibili lavorazioni in doppio) local bCross = false - if abs( vtExtr:getY()) > 0.707 then - if b3Aux:getDimY() > b3Raw:getDimY() - 1.0 then - bCross = true - dDepth = min( dDepth, b3Raw:getDimY()) - end - if bDown then - nSide = -1 + if abs( vtExtr:getX()) < 0.707 then + if abs( vtExtr:getY()) > abs( vtExtr:getZ()) then + if b3Aux:getDimY() > b3Raw:getDimY() - 1.0 then + bCross = true + dDepth = min( dDepth, b3Raw:getDimY() / abs( vtExtr:getY())) + end + if bDown then + nSide = -1 + else + nSide = 1 + end else - nSide = 1 - end - elseif abs( vtExtr:getZ()) > 0.707 then - if b3Aux:getDimZ() > b3Raw:getDimZ() - 1.0 then - bCross = true - dDepth = min( dDepth, b3Raw:getDimZ()) + if b3Aux:getDimZ() > b3Raw:getDimZ() - 1.0 then + bCross = true + dDepth = min( dDepth, b3Raw:getDimZ() / abs( vtExtr:getZ())) + end end end local dOriDepth = dDepth local nDouble = 1 - local bCanDouble = ( abs( vtExtr:getY()) > 0.707 and bCross) + local bCanDouble = ( abs( vtExtr:getY()) > abs( vtExtr:getZ()) and bCross) local dDimStrip = BD.DIM_STRIP if dDimStrip < 0 then dDimStrip = EgtGetInfo( Proc.Id, Q_DIM_STRIP, 'd') or 0