diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index f66ad94..661f49d 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -445,13 +445,14 @@ local function OrderFeatures( vProc, b3Raw) table.sort( vProc, CompareFeatures) -- riunisco fori con lo stesso diametro e non troppo lontani + local dDrillRange = EgtIf( BD.GO_FAST == 2, 6000, 600) for i = 1, #vProc do local ProcI = vProc[i] if ProcI.Prc == 40 then for j = i + 1, #vProc do local ProcJ = vProc[j] if ProcJ.Prc == 40 and ProcJ.Head == ProcI.Head and ProcJ.Tail == ProcI.Tail and - abs( ProcJ.Diam - ProcI.Diam) < 1.0 and abs( ProcJ.Box:getCenter():getX() - ProcI.Box:getCenter():getX()) < 600.0 then + abs( ProcJ.Diam - ProcI.Diam) < 1.0 and abs( ProcJ.Box:getCenter():getX() - ProcI.Box:getCenter():getX()) < dDrillRange then if j > i + 1 then local ProcK = vProc[i+1] if ProcK.Prc ~= 40 or abs( ProcK.Diam - ProcJ.Diam) > 1.0 or ProcJ.Box:getCenter():getX() < ProcK.Box:getCenter():getX() then @@ -464,6 +465,7 @@ local function OrderFeatures( vProc, b3Raw) end end -- riunisco marcature, testi e decori non troppo lontani + local dMarkRange = 300 for i = 1, #vProc do local ProcI = vProc[i] if ProcI.Prc == 60 or ProcI.Prc == 61 or ProcI.Prc == 959 then @@ -471,7 +473,7 @@ local function OrderFeatures( vProc, b3Raw) local ProcJ = vProc[j] if ( ProcJ.Prc == 60 or ProcJ.Prc == 61 or ProcJ.Prc == 959) and ProcJ.Head == ProcI.Head and ProcJ.Tail == ProcI.Tail and - abs( ProcJ.Box:getCenter():getX() - ProcI.Box:getCenter():getX()) < 300.0 then + abs( ProcJ.Box:getCenter():getX() - ProcI.Box:getCenter():getX()) < dMarkRange then if j > i + 1 then table.insert( vProc, i + 1, table.remove( vProc, j)) end diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index c5c27fb..a3457a4 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -1,4 +1,4 @@ --- ProcessCut.lua by Egaltech s.r.l. 2020/02/14 +-- ProcessCut.lua by Egaltech s.r.l. 2020/02/29 -- Gestione calcolo singoli tagli di lama per Travi -- Tabella per definizione modulo @@ -83,7 +83,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom) end -- determino la direzione di taglio preferenziale local _, dCutH, dCutV = BL.GetFaceHvRefDim( Proc.Id, 0) - local bHorizCut = (( dCutV < dMaxDepth + 10 * GEO.EPS_SMALL and dCutH > dCutV + 10 * GEO.EPS_SMALL) and not bDownCut) + local bHorizCut = (( dCutV < dMaxDepth - 10 * GEO.EPS_SMALL and dCutH > dMaxDepth - 10 * GEO.EPS_SMALL) and not bDownCut) -- verifico se necessari tagli supplementari EgtOutLog( string.format( 'MaxDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dCutH, dCutV), 3) local vCuts = {} diff --git a/LuaLibs/ProcessSplit.lua b/LuaLibs/ProcessSplit.lua index 7fd689a..997e4cd 100644 --- a/LuaLibs/ProcessSplit.lua +++ b/LuaLibs/ProcessSplit.lua @@ -1,4 +1,4 @@ --- ProcessSplit.lua by Egaltech s.r.l. 2020/01/24 +-- ProcessSplit.lua by Egaltech s.r.l. 2020/02/29 -- Gestione calcolo tagli di separazione per Travi -- Tabella per definizione modulo @@ -58,12 +58,13 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId) local dOffsL = 0 if not bSplit then -- cerco grezzo successivo che sia nella fase - local nNextRawId = EgtGetNextRawPart( nRawId) if nNextRawId and EgtVerifyRawPartPhase( nNextRawId, nPhase) then local b3NextRaw = EgtGetRawPartBBox( nNextRawId) local dLenEndRaw = ptC:getX() - b3NextRaw:getMin():getX() nCuts = ceil( dLenEndRaw / BD.MAX_LEN_SCRAP) dOffsL = dLenEndRaw / nCuts + -- aggiorno ingombro del grezzo corrente con quello del successivo + b3Raw:Add( b3NextRaw) end end -- calcolo extra taglio ed accorciamento