diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 9dc9dcf..6709730 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -312,10 +312,12 @@ end ------------------------------------------------------------------------------------------------------------- local function IsTailFeature( Proc, b3Raw, dCurrOvmH) + -- lunghezza di riferimento per spostare le feature di coda appena prima + local dAdvTailLen = BD.LEN_VERY_SHORT_PART or BD.LEN_SHORT_PART -- feature sempre di testa o coda per il gruppo (se non troppo lunga) if Proc.Grp == 1 or Proc.Grp == 2 then -- se abilitato avanzamento lavorazione feature di coda e pezzo corto (quindi a caduta) e feature in coda - if BD.ADVANCE_TAIL_CUT and b3Raw:getDimX() < BD.LEN_SHORT_PART and Proc.Box:getCenter():getX() < b3Raw:getCenter():getX() - 0.5 * dCurrOvmH then + if BD.ADVANCE_TAIL_CUT and b3Raw:getDimX() < dAdvTailLen and Proc.Box:getCenter():getX() < b3Raw:getCenter():getX() - 0.5 * dCurrOvmH then -- se taglio, lo avanzo if Proc.Prc == 10 then return false, true @@ -328,7 +330,7 @@ local function IsTailFeature( Proc, b3Raw, dCurrOvmH) if ( Proc.Grp == 3 or Proc.Grp == 4) and ( Proc.Prc == 38 or Proc.Prc == 51 or Proc.Prc == 56 or Proc.Prc == 100 or Proc.Prc == 101 or Proc.Prc == 102 or Proc.Prc == 103 or Proc.Prc == 106) then -- se abilitato avanzamento lavorazione feature di coda e pezzo corto (quindi a caduta) e feature in coda - if BD.ADVANCE_TAIL_CUT and b3Raw:getDimX() < BD.LEN_SHORT_PART and Proc.Box:getCenter():getX() < b3Raw:getCenter():getX() - 0.5 * dCurrOvmH then + if BD.ADVANCE_TAIL_CUT and b3Raw:getDimX() < dAdvTailLen and Proc.Box:getCenter():getX() < b3Raw:getCenter():getX() - 0.5 * dCurrOvmH then -- se profilo front solo con smusso, lo avanzo if Proc.Prc == 100 and ProfFront.OnlyChamfer( Proc) then return false, true