From b0b8e88c30c639343f2929b1d5a07ea6404be43f Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 6 Jun 2023 12:54:35 +0200 Subject: [PATCH] - Alcune correzioni minori - Sistemati commenti --- LuaLibs/WProcessFreeContour.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LuaLibs/WProcessFreeContour.lua b/LuaLibs/WProcessFreeContour.lua index 17a2fd2..1a08ea3 100644 --- a/LuaLibs/WProcessFreeContour.lua +++ b/LuaLibs/WProcessFreeContour.lua @@ -19,6 +19,7 @@ -- 2023/04/14 Aggiunta pulitura spigoli Q05=1 anche su sole fresature. -- 2023/04/17 Lavorazione CleanCorner sempre forzata con lato di lavoro in centro. -- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni. +-- 2023/06/06 Aggiunta gestione lavorazione per lamatura speciale affondata con Tool_ID specifico. -- Tabella per definizione modulo local WPF = {} @@ -67,7 +68,7 @@ function WPF.Classify( Proc, b3Raw) local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) -- recupero il tipo di lavorazione local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0 - local nTool_ID = EgtGetInfo( Proc.Id, 'CNT_DATA', 'i') or 0 + local nTool_ID = EgtGetInfo( Proc.Id, 'CNT_DATA', 'i') -- se tasca if bPocket then -- cerco la faccia di fondo della superfice (deve avere direzione circa quella di estrusione della curva) @@ -89,7 +90,7 @@ function WPF.Classify( Proc, b3Raw) elseif nCntType == 10 or nCntType == 20 then return true -- se altrimenti profilo verticale che non interessa tutta la sezione e non caso speciale con lamatura affondata - elseif ( Proc.Box:getMax():getZ() < b3Raw:getMax():getZ() - 2) and ( ( not nTool_ID == ( WD.RECESSED_COUNTERBORE_TOOLID or 0)) or ( not EgtCurveIsACircle( AuxId))) then + elseif ( Proc.Box:getMax():getZ() < b3Raw:getMax():getZ() - 2) and ( not nTool_ID or ( nTool_ID ~= ( WD.RECESSED_COUNTERBORE_TOOLID or 0)) or ( not EgtCurveIsACircle( AuxId))) then return false -- altrimenti è profilo verticale che interessa tutta la sezione o caso speciale con lamatura affondata else @@ -2186,6 +2187,7 @@ local function MakeByMill( Proc, nRawId, b3Raw) elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) end + -- se lamatura affondata speciale, setto attacco e stacco al centro local bIsRecessedCounterBore = ( Proc.Box:getMax():getZ() < b3Raw:getMax():getZ() + 10 * GEO.EPS_SMALL) and ( nTool_ID == WD.RECESSED_COUNTERBORE_TOOLID or 0) and @@ -2215,6 +2217,7 @@ local function MakeByMill( Proc, nRawId, b3Raw) -- imposto elevazione EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';') end + -- posizione braccio porta testa local nSCC = MCH_SCC.ADIR_ZP if AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then