From 580ff476e2b4896b5959f97373a89e52240609ea Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 15 Feb 2023 09:37:19 +0100 Subject: [PATCH] FIx: - in ScarfJoint, SimpleScarf, StepJoint gestite le rotazioni di 90 deg nell'aggiornamento del grezzo --- LuaLibs/ProcessScarfJoint.lua | 5 +++-- LuaLibs/ProcessSimpleScarf.lua | 5 +++-- LuaLibs/ProcessStepJoint.lua | 21 +++++++++++++-------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/LuaLibs/ProcessScarfJoint.lua b/LuaLibs/ProcessScarfJoint.lua index 71bb9e4..b3c2e23 100644 --- a/LuaLibs/ProcessScarfJoint.lua +++ b/LuaLibs/ProcessScarfJoint.lua @@ -3,6 +3,7 @@ -- 2021/06/28 Aggiunto extra-taglio alle lamate orizzontali. -- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe) -- 2022/07/12 Aggiunta gestione PF1250 e TURN. +-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo. -- Tabella per definizione modulo local ProcessScarfJoint = {} @@ -512,7 +513,7 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa -- aggiornamento ingombro di testa o coda if Proc.Head then local dHCI = 0 - if abs( vtRef:getZ()) > 0.1 then + if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD) if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end dHCI = 0.75 * dHCI @@ -522,7 +523,7 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa BL.UpdateHCING( nRawId, dHCI) elseif Proc.Tail then local dTCI = 0 - if abs( vtRef:getZ()) > 0.1 then + if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD) if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end dTCI = 0.75 * dTCI diff --git a/LuaLibs/ProcessSimpleScarf.lua b/LuaLibs/ProcessSimpleScarf.lua index aba4e1c..360d915 100644 --- a/LuaLibs/ProcessSimpleScarf.lua +++ b/LuaLibs/ProcessSimpleScarf.lua @@ -3,6 +3,7 @@ -- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe) -- 2022/08/09 Ora se la feature ha meno di due facce viene richiamata la normale Cut. -- 2022/11/09 Aggiunta gestione parametro Q04 per forzare utilizzo fresa di lato e lavorare come FreeContour. +-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo. -- Tabella per definizione modulo local ProcessSimpleScarf = {} @@ -317,7 +318,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT -- aggiornamento ingombro di testa o coda if Proc.Head then local dHCI = 0 - if abs( vtRef:getZ()) > 0.1 then + if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD) if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end else @@ -326,7 +327,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT BL.UpdateHCING( nRawId, dHCI) elseif Proc.Tail then local dTCI = 0 - if abs( vtRef:getZ()) > 0.1 then + if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD) if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end else diff --git a/LuaLibs/ProcessStepJoint.lua b/LuaLibs/ProcessStepJoint.lua index abf920c..35a75bd 100644 --- a/LuaLibs/ProcessStepJoint.lua +++ b/LuaLibs/ProcessStepJoint.lua @@ -1,6 +1,7 @@ -- ProcessStepJoint.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo giunto a gradino per Travi -- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura. +-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo. -- Tabella per definizione modulo local ProcessStepJoint = {} @@ -433,18 +434,22 @@ local function MakeThreeFaces( Proc, nPhase, nRawId, nPartId, dOvmHead) -- Eventuale segnalazione ingombro di testa o coda if Proc.Head then local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() - if vtNm:getZ() > 0.5 then - dOffs = 0.5 * dOffs - elseif abs( vtNm:getZ()) > 0.35 then - dOffs = 0.75 * dOffs + if not BD.ROT90 then + if vtNm:getZ() > 0.5 then + dOffs = 0.5 * dOffs + elseif abs( vtNm:getZ()) > 0.35 then + dOffs = 0.75 * dOffs + end end BL.UpdateHCING( nRawId, dOffs) elseif Proc.Tail then local dOffs = Proc.Box:getMax():getX() - b3Solid:getMin():getX() - if vtNm:getZ() > 0.5 then - dOffs = 0.5 * dOffs - elseif abs( vtNm:getZ()) > 0.35 then - dOffs = 0.75 * dOffs + if not BD.ROT90 then + if vtNm:getZ() > 0.5 then + dOffs = 0.5 * dOffs + elseif abs( vtNm:getZ()) > 0.35 then + dOffs = 0.75 * dOffs + end end BL.UpdateTCING( nRawId, dOffs) end