diff --git a/BatchProcessNew.lua b/BatchProcessNew.lua index 7a34d53..aafea38 100644 --- a/BatchProcessNew.lua +++ b/BatchProcessNew.lua @@ -3,7 +3,7 @@ -- Intestazioni require( 'EgtBase') _ENV = EgtProtectGlobal() -EgtEnableDebug( true) +EgtEnableDebug( false) -- Imposto direttorio libreria specializzata per Travi EgtAddToPackagePath( BEAM.BASEDIR .. '\\LuaLibs\\?.lua') diff --git a/StrategyLibs/FACEBYBLADE.lua b/StrategyLibs/FACEBYBLADE.lua index 0a6b4c2..d4e7f99 100644 --- a/StrategyLibs/FACEBYBLADE.lua +++ b/StrategyLibs/FACEBYBLADE.lua @@ -26,8 +26,8 @@ local function GetLeadInOutType( Machining) else sLeadInOutType = 'Tangent' end - elseif abs( Machining.vtEdgeDirection:getZ()) < 0.7 then - sLeadInOutType = 'Tangent' + elseif abs( Machining.vtEdgeDirection:getZ()) > 0.7 then + sLeadInOutType = 'Perpendicular' else -- TODO qui attacco tangenziale speciale tutto da un lato sLeadInOutType = 'Tangent' @@ -42,7 +42,7 @@ local function GetLeadInOutType( Machining) sLeadInOutType = 'Tangent' end elseif abs( Machining.vtEdgeDirection:getZ()) > 0.7 then - sLeadInOutType = 'Tangent' + sLeadInOutType = 'Perpendicular' else -- TODO qui attacco tangenziale speciale tutto da un lato sLeadInOutType = 'Tangent' @@ -96,8 +96,13 @@ local function CalculateLeadInOut( Machining, EdgeToMachine, Part) LeadIn.dPerpDistance = 1 LeadOut.dPerpDistance = 1 else - LeadIn.dTangentDistance = TOOLS[Machining.nToolIndex].dDiameter / 2 - LeadOut.dTangentDistance = TOOLS[Machining.nToolIndex].dDiameter / 2 + if abs( Machining.vtEdgeDirection:getZ()) > 0.707 then + LeadIn.dPerpDistance = 1 + LeadOut.dPerpDistance = 1 + else + LeadIn.dTangentDistance = TOOLS[Machining.nToolIndex].dDiameter / 2 + LeadOut.dTangentDistance = TOOLS[Machining.nToolIndex].dDiameter / 2 + end end end LeadIn.dElevation = 0