From 8dc1c63b65e79b23150f0b49ae6eeab1378316a8 Mon Sep 17 00:00:00 2001 From: DarioS Date: Thu, 20 Oct 2022 10:16:43 +0200 Subject: [PATCH 01/11] DataBeam : - modifiche per TURN. --- LuaLibs/ProcessLapJoint.lua | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 2b8ff49..9e2ede6 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -2991,7 +2991,8 @@ local function MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw, nFacInd, bReduceDe end end -- eseguo il taglio - local bMadeASbyBld, sWarn, nIdMach = Fbs.MakeOne( Proc.Id, nFacet, sCutting, dSawDiam, vtN, nil, ( -0.5 + dExtraOffs), BD.CUT_SIC, 0, 0, 0, nil, b3Raw) + local dVzLimDwnUp = EgtIf( BD.TURN, -2, nil) + local bMadeASbyBld, sWarn, nIdMach = Fbs.MakeOne( Proc.Id, nFacet, sCutting, dSawDiam, vtN, dVzLimDwnUp, ( -0.5 + dExtraOffs), BD.CUT_SIC, 0, 0, 0, nil, b3Raw) if bMadeASbyBld then sWarn = nil if not bReduceDepth and abs(dExtraOffs) > 0 then @@ -4544,7 +4545,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end end -- se lavorazione da sotto e lunga, va divisa in due metà - local bDouble = ( vtN:getZ() < -0.5 and dH > ( BD.MAX_LEN_BH_FROM_BOTTOM or 200)) + local bDouble = ( vtN:getZ() < -0.5 and dH > ( BD.MAX_LEN_BH_FROM_BOTTOM or 200) and not BD.TURN) -- inserisco la lavorazione di fresatura local sName = 'BHMill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMchFId = EgtAddMachining( sName, sMilling) @@ -4574,7 +4575,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa sNotes = sNotes .. 'VMRS=0;' EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes) -- attacchi e uscite - if vtN:getZ() > -0.5 then + if vtN:getZ() > -0.5 or BD.TURN then EgtSetMachiningParam( MCH_MP.LITANG, 0) EgtSetMachiningParam( MCH_MP.LIPERP, dFacElev + BD.CUT_SIC) EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI) @@ -4595,7 +4596,20 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local nStepType = MCH_MILL_ST.ONEWAY EgtSetMachiningParam( MCH_MP.STEPTYPE, nStepType) -- imposto posizione braccio porta testa - local nSCC = EgtIf( ( vtN:getY() > 0.5 or ( bHeadDir and vtN:getZ() > 0.5 ) or ( not bHeadDir and vtN:getZ() < -0.5)), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM) + local nSCC = MCH_SCC.NONE + if not BD.TURN then + nSCC = EgtIf( ( vtN:getY() > 0.5 or ( bHeadDir and vtN:getZ() > 0.5 ) or ( not bHeadDir and vtN:getZ() < -0.5)), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM) + else + if vtN:getY() > 0.707 then + nSCC = MCH_SCC.ADIR_YP + elseif vtN:getY() < -0.707 then + nSCC = MCH_SCC.ADIR_YM + elseif vtN:getZ() > 0.707 then + nSCC = MCH_SCC.ADIR_ZP + elseif vtN:getZ() < -0.707 then + nSCC = MCH_SCC.ADIR_ZM + end + end EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- eseguo if not ML.ApplyMachining( true, false) then @@ -5091,7 +5105,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bPassEdge = ((( bIsU and Proc.Fct == 3) or ( bIsL and Proc.Fct == 2)) and bSinglePart and Proc.Box:getDimX() < 0.9 * b3Raw:getDimX()) local nFacIndOri = BL.GetFaceWithMostAdj( Proc.Id, nPartId) local vtNOri = EgtSurfTmFacetNormVersor( Proc.Id, nFacIndOri, GDB_ID.ROOT) - if nChamfer < 2 and nQAntisplintResult == 1 and (( bIsU or bIsL) and ( bPassThrou or bPassEdge)) and ( vtNOri:getZ() > -0.087 or BD.DOWN_HEAD) then + if nChamfer < 2 and nQAntisplintResult == 1 and (( bIsU or bIsL) and ( bPassThrou or bPassEdge)) and ( vtNOri:getZ() > -0.087 or BD.DOWN_HEAD or BD.TURN) then local bOk local bSawDown = ( bMillDown and not bMillUp) bMadeASbyBld, bOk, sWarn = ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtNOri, nFacIndOri, sWarn, bSawDown, true) @@ -5328,7 +5342,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bPassEdge = ((( bIsU and Proc.Fct == 3) or ( bIsL and Proc.Fct == 2)) and bSinglePart and Proc.Box:getDimX() < 0.9 * b3Raw:getDimX()) local nFacIndOri = BL.GetFaceWithMostAdj( Proc.Id, nPartId) local vtNOri = EgtSurfTmFacetNormVersor( Proc.Id, nFacIndOri, GDB_ID.ROOT) - if nChamfer < 2 and nQAntisplintResult == 1 and (( bIsU or bIsL) and ( bPassThrou or bPassEdge)) and ( vtNOri:getZ() > -0.087 or BD.DOWN_HEAD) then + if nChamfer < 2 and nQAntisplintResult == 1 and (( bIsU or bIsL) and ( bPassThrou or bPassEdge)) and ( vtNOri:getZ() > -0.087 or BD.DOWN_HEAD or BD.TURN) then local bOk local bSawDown = ( bMillDown and not bMillUp) bMadeASbyBld, bOk, sWarn = ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtNOri, nFacIndOri, sWarn, bSawDown) From 00c0db39d7b70fe88d3851049b2c7c74c0d7dc69 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 20 Oct 2022 11:22:00 +0200 Subject: [PATCH 02/11] =?UTF-8?q?BugFix/Ticket#861:=20-In=20lapjoint=20L02?= =?UTF-8?q?0=20(=20e=20altre)=20sistemato=20l'attacco=20per=20fresature=20?= =?UTF-8?q?aggiuntive=20quando=20l'angolo=20tra=20le=20facce=20=C3=A8=20>?= =?UTF-8?q?=2090=C2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLapJoint.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 2b8ff49..461aaa3 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3290,15 +3290,27 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas EgtSetMachiningParam( MCH_MP.STARTADDLEN, dTDiam / 2) else EgtSetMachiningParam( MCH_MP.STARTADDLEN, -dTDiam / 2) + -- forzo attacco lineare if dElev > 0 then + EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR) + EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR) + EgtSetMachiningParam( MCH_MP.LITANG, 0) + EgtSetMachiningParam( MCH_MP.LOTANG, 0) EgtSetMachiningParam( MCH_MP.LIPERP, dElev) + EgtSetMachiningParam( MCH_MP.LOPERP, dElev) end end if bOpenEnd then EgtSetMachiningParam( MCH_MP.ENDADDLEN, dTDiam / 2) else EgtSetMachiningParam( MCH_MP.ENDADDLEN, -dTDiam / 2) + -- forzo attacco lineare if dElev > 0 then + EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR) + EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR) + EgtSetMachiningParam( MCH_MP.LITANG, 0) + EgtSetMachiningParam( MCH_MP.LOTANG, 0) + EgtSetMachiningParam( MCH_MP.LIPERP, dElev) EgtSetMachiningParam( MCH_MP.LOPERP, dElev) end end From 607efa3bef15f44ab7f6d45232dabb4807fec987 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 20 Oct 2022 16:53:33 +0200 Subject: [PATCH 03/11] BugFix/Ticket#859: - in lapjoint leggera correzione alla ricerca della direzione milgiore di lavorazione --- LuaLibs/ProcessLapJoint.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 8cde59a..f8c734e 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -55,6 +55,7 @@ -- Implementata, in caso di fresatura di lato con altezza tasca molto bassa, la contornatura con unica passata -- Migliorata gestione AntiSplint (Mill e Saw) -- 2022/09/27 Aggiunta gestione SCC per svuotature con TURN (solo dopo applicazione lavorazione). +-- 2022/10/20 In MakeByChainOrSaw modificato check per trovare la faccia adiacente sul lato più lungo. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -2626,7 +2627,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, for i = 1, #vAdj do if vAdj[i] >= 0 then local vtAdjN = EgtSurfTmFacetNormVersor( Proc.Id, vAdj[i], GDB_ID.ROOT) - if not bIs3Faces or abs( rfFac:getVersZ():getY()) < 0.174 or abs( rfFac:getVersZ():getY()) > 0.984 or vtAdjN:getY() * rfFac:getVersZ():getY() > 0.1 then + if not bIs3Faces or abs( rfFac:getVersZ():getY()) < 0.174 or abs( rfFac:getVersZ():getY()) > 0.984 or vtAdjN:getY() * rfFac:getVersZ():getY() > -0.1 then local _, ptP1, ptP2 = EgtSurfTmFacetsContact( Proc.Id, nFacInd, vAdj[i], GDB_ID.ROOT) local dLen = dist( ptP1, ptP2) if dLen > dMaxLen then From 111f11cf92f24a204429455d97eb16c8d89def9b Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 25 Oct 2022 17:41:58 +0200 Subject: [PATCH 04/11] BugFix/DrillingsWIthSameInOutFace: - in ProcessDrill, nel riconoscimento dei fori da splittare, aggiunta la verifica che le facce in/out del foro siano differenti --- LuaLibs/ProcessDrill.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 470c672..6f318eb 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -13,6 +13,7 @@ -- 2022/07/12 Aggiunto un valore minimo (10) per la distanza di sicurezza. -- 2022/07/27 Aggiunta la gestione del tipo di foratura "AngleDrill" per fori molto inclinati -- 2022/08/18 Aggiunta gestione macchine con testa da sotto e punta disabilitata. +-- 2022/10/25 Nella funzione Split aggiunto il controllo che le facce di ingresso e uscita siano differenti (potrebbe succedere per fori molto corti). Modifica importatore in futuro. -- Tabella per definizione modulo local ProcessDrill = {} @@ -118,7 +119,7 @@ function ProcessDrill.Split( Proc, b3Raw) local dDiam = 2 * EgtArcRadius( AuxId) local dLen = abs( EgtCurveThickness( AuxId)) local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) - local bOpen = ( Proc.Fce ~= 0) + local bOpen = ( Proc.Fce ~= 0) and ( Proc.Fce ~= Proc.Fcs) -- recupero flag abilitazione split (0=auto,1=no) local bTrySplit = ( EgtGetInfo( Proc.Id, 'Q02', 'i') ~= 1) if not bTrySplit then From fb6dbebdd45e17c657dfc8f464395a7a2d940b39 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 2 Nov 2022 11:58:55 +0100 Subject: [PATCH 05/11] BugFix/Ticket#871: - in split e headcut corretto accorciamento percorso lama per tagli doppi verticali --- LuaLibs/MachiningLib.lua | 2 -- LuaLibs/ProcessHeadCut.lua | 5 ++++- LuaLibs/ProcessSplit.lua | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/LuaLibs/MachiningLib.lua b/LuaLibs/MachiningLib.lua index 61708ee..3daa60b 100644 --- a/LuaLibs/MachiningLib.lua +++ b/LuaLibs/MachiningLib.lua @@ -248,10 +248,8 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead) ForEnd = 1 ForStep = -1 end - -- se scelta testa migliorata oppure se non devo usare la testa da sotto parto sempre da testa 1 if ( BEAM and BEAM.BW) or MachineHeadType == ONE_HEAD or MachineHeadType == TWO_EQUAL_HEADS or ( MachineHeadType == TWO_UP_DOWN_HEADS and not bDownHead) then _, sType = EgtEndsWith( sType, '_H2') - -- se scelta testa migliorata è disattivata e devo usare la testa sotto forzo testa 2 elseif ( not BEAM or not BEAM.BW) and MachineHeadType == TWO_UP_DOWN_HEADS and bDownHead then if not EgtEndsWith( sType, '_H2') then sType = sType .. '_H2' diff --git a/LuaLibs/ProcessHeadCut.lua b/LuaLibs/ProcessHeadCut.lua index 11abebf..2abb99a 100644 --- a/LuaLibs/ProcessHeadCut.lua +++ b/LuaLibs/ProcessHeadCut.lua @@ -4,6 +4,7 @@ -- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita. -- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata. -- 2022/09/08 Migliorato verso di lavorazione in caso di DoubleCut +-- 2022/11/02 Corretti accorciamenti per DoubleCut -- Tabella per definizione modulo local ProcessHeadCut = {} @@ -251,9 +252,11 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut end -- se necessari tagli in doppio, eseguo gli opposti if bDoubleCut then + -- gli accorciamenti vanno invertiti per il taglio opposto + local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart for i = nCuts, 1, -1 do local dCutOffset = ( i - 1) * dOffsL - local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_BACK, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, dAccEnd, '', b3Raw, true) + local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_BACK, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStartDoubleCut, dAccEndDoubleCut, '', b3Raw, true) if not bOk then return false, sErr end end end diff --git a/LuaLibs/ProcessSplit.lua b/LuaLibs/ProcessSplit.lua index cdb3873..049ea37 100644 --- a/LuaLibs/ProcessSplit.lua +++ b/LuaLibs/ProcessSplit.lua @@ -4,6 +4,7 @@ -- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita. -- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata. -- 2022/09/08 Migliorato verso di lavorazione in caso di DoubleCut +-- 2022/11/02 Corretti accorciamenti per DoubleCut -- Tabella per definizione modulo local ProcessSplit = {} @@ -427,10 +428,12 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt end -- se necessari tagli in doppio, eseguo gli opposti if bDoubleCut then + -- gli accorciamenti vanno invertiti per il taglio opposto + local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart for i = nCuts, 1, -1 do local dCutOffset = ( i - 1) * dOffsL local sNotes = EgtIf( bSplit, 'Presplit;', 'Precut;') - local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_FRONT, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, true) + local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_FRONT, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStartDoubleCut, dAccEndDoubleCut, sNotes, b3Raw, true) if not bOk then return false, sErr end end end From 7e21b84bb944db472a1fd181a3d933f2e91707f0 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 2 Nov 2022 18:59:14 +0100 Subject: [PATCH 06/11] =?UTF-8?q?Improvement/Ticket#855:=20-=20in=20Machin?= =?UTF-8?q?ingLib=20modificata=20scelta=20utensile=20ottimizzata.=20Ora=20?= =?UTF-8?q?se=20c'=C3=A8=20un=20utensile=20pi=C3=B9=20grande=20disponibile?= =?UTF-8?q?=20si=20d=C3=A0=20preferenza=20a=20quello.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/MachiningLib.lua | 45 ++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/LuaLibs/MachiningLib.lua b/LuaLibs/MachiningLib.lua index 3daa60b..8d1bc16 100644 --- a/LuaLibs/MachiningLib.lua +++ b/LuaLibs/MachiningLib.lua @@ -2,6 +2,7 @@ -- Libreria ricerca lavorazioni per Travi -- 2022/05/07 ES Profonde modifiche per scelta ottimale lavorazioni in macchine con più teste. -- 2022/07/27 Aggiunta la gestione del tipo di foratura "AngleDrill" per fori molto inclinati +-- 2022/11/02 Modificata scelta utensile ottimizzata. Ora se c'è un utensile più grande disponibile si dà preferenza a quello. -- Tabella per definizione modulo local MachiningLib = {} @@ -263,6 +264,8 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead) -- se posso usare entrambe le teste, la gestisco come una macchina a due teste da sopra MachineHeadUse = TWO_EQUAL_HEADS end + -- variabile che definisce quando un utensile ha un diametro sostanzialmente più grande di un altro + local dBiggerToolTolerance = 1.25 for i = ForStart, ForEnd, ForStep do local Machining = Machinings[i] local sMachiningType = Machining.Type @@ -284,22 +287,24 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead) return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams) -- verifico se posso usare lo stesso utensile della testa attiva elseif ( nActiveHead == 1 and not bH2 and sToolName == H1_TOOL) or ( nActiveHead == 2 and bH2 and sToolName == H2_TOOL) then - SetNextMachining( sToolName, nActiveHead, bFixed) - return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams) + -- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo + if ( not sH1Param or not sH1Param.TDiam or sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam) and ( not sH2Param or not sH2Param.TDiam or sH2Param.TDiam < 1.25 * ToolParams.TDiam) then + SetNextMachining( sToolName, nActiveHead, bFixed) + return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams) + end + end + -- segno le lavorazioni disponibili per entrambe le teste + if bH2 then + if not sH2Mach or sH2Mach == '' then + sH2Mach = Machining.Name + sH2Tool = sToolName + sH2Param = ToolParams + end else - -- segno le lavorazioni disponibili per entrambe le teste - if bH2 then - if not sH2Mach or sH2Mach == '' then - sH2Mach = Machining.Name - sH2Tool = sToolName - sH2Param = ToolParams - end - else - if not sH1Mach or sH1Mach == '' then - sH1Mach = Machining.Name - sH1Tool = sToolName - sH1Param = ToolParams - end + if not sH1Mach or sH1Mach == '' then + sH1Mach = Machining.Name + sH1Tool = sToolName + sH1Param = ToolParams end end elseif MachineHeadUse == TWO_UP_DOWN_HEADS then @@ -315,6 +320,16 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead) end end if MachineHeadUse == TWO_EQUAL_HEADS then + -- se uno dei due utensili è molto più grande dell'altro scelgo quello senza fare altre analisi + if sH1Mach ~= "" and sH1Param.TDiam and sH2Mach ~= "" and sH2Param.TDiam then + if sH1Param.TDiam > dBiggerToolTolerance * sH2Param.TDiam then + SetNextMachining( sH1Tool, 1, bFixed) + return ReturnParams( MachiningType, sH1Mach, sType, sH1Param) + elseif sH2Param.TDiam > dBiggerToolTolerance * sH1Param.TDiam then + SetNextMachining( sH2Tool, 2, bFixed) + return ReturnParams( MachiningType, sH2Mach, sType, sH2Param) + end + end -- verifico se cambiare testa o cambiare utensile su quella corrente if nActiveHead == 1 then if sH2Mach ~= "" then From 98fcfd9bc12dfc0eff523d1dacf895cc0114e35e Mon Sep 17 00:00:00 2001 From: DarioS Date: Sat, 5 Nov 2022 12:38:05 +0100 Subject: [PATCH 07/11] DataBeam : - correzioni varie per H2 come testa da sopra o da sotto. (PF o PF1250). --- LuaLibs/ProcessFreeContour.lua | 14 ++++++++------ LuaLibs/ProcessLongCut.lua | 11 ++++++----- LuaLibs/ProcessProfCamb.lua | 7 +++++-- LuaLibs/ProcessStepJoint.lua | 8 +++++--- LuaLibs/ProcessStepJointNotch.lua | 8 +++++--- LuaLibs/ProcessTenon.lua | 5 +++-- 6 files changed, 32 insertions(+), 21 deletions(-) diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index f73dbbe..82ca02e 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -1,7 +1,8 @@ --- ProcessFreeContour.lua by Egaltech s.r.l. 2021/10/07 +-- ProcessFreeContour.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo profilo libero per Travi -- 2022/08/23 Aggiunta la funzione MakeByMark per la gestione del caso P13=10 --- 2022/09/21 In MakeByMill aggiunto messaggio per elevazione non raggiunta +-- 2022/09/21 In MakeByMill aggiunto messaggio per elevazione non raggiunta. +-- 2022/11/03 In MakeByMill migliorata gestione lavorazione con fresa su testa da sotto. -- Tabella per definizione modulo @@ -236,7 +237,6 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) local dDepth = abs( EgtCurveThickness( AuxId)) local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD) - local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5) local bDown = ( b3Aux:getMin():getZ() < b3Raw:getMin():getZ() + 5) -- verifico se in testa o coda local bHead = Proc.Head @@ -245,12 +245,14 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- recupero la lavorazione local bTopHead = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.1) local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1) - local sMilling = ML.FindMilling( 'FreeContour', nil, nil, nil, nil, bTopHead, bDownHead) + local sMilling, _, _, bH2 = ML.FindMilling( 'FreeContour', nil, nil, nil, nil, bTopHead, bDownHead) if not sMilling then local sErr = 'Error : FreeContour not found in library' EgtOutLog( sErr) return false, sErr end + bDownHead = ( bDownHead and bH2) + local bToolInv = ( not bDownHead and vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5) -- recupero i dati dell'utensile local dToolDiam = 10 local dMaxDepth = 0 @@ -376,7 +378,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) EgtSetMachiningParam( MCH_MP.INVERT, true) else - if vtExtr:getZ() < 0 then + if not bDownHead and vtExtr:getZ() < 0 then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.INVERT, true) EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) @@ -391,7 +393,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.INVERT, true) else - if vtExtr:getZ() < 0 then + if not bDownHead and vtExtr:getZ() < 0 then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) EgtSetMachiningParam( MCH_MP.INVERT, true) EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) diff --git a/LuaLibs/ProcessLongCut.lua b/LuaLibs/ProcessLongCut.lua index 617431a..d47bc00 100644 --- a/LuaLibs/ProcessLongCut.lua +++ b/LuaLibs/ProcessLongCut.lua @@ -1,4 +1,4 @@ --- ProcessLongCut.lua by Egaltech s.r.l. 2022/03/07 +-- ProcessLongCut.lua by Egaltech s.r.l. 2022/11/04 -- Gestione calcolo taglio longitudinale per Travi -- 2021/02/03 Corretto FaceUse con fresa orizzontale su taglio orizzontale. -- 2021/05/18 Possibile taglio con lama anche di fianco su macchina con testa da sotto. @@ -12,6 +12,7 @@ -- 2022/03/07 Razionalizzata gestione casi con fresa di fianco. Aggiunta gestione Long2Cut anche con testa sotto. -- 2022/07/14 Aggiunta limitazione lavorazione a sinistra anche se il grezzo successivo non ha lavorazioni (finale barra) ma è abbastanza lungo da poter essere riutilizzato (BD.MinRaw). -- 2022/09/23 Modificato l'angolo per l'abilitazione della lama da sotto: ora interviene anche per facce verticali. +-- 2022/11/04 Aggiunto passaggio parametro bDownHead (Testa da Sotto) nelle chiamate a MakeSideFace. -- Tabella per definizione modulo local ProcessLongCut = {} @@ -1025,12 +1026,12 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus for j = 1, Proc.Fct - 1 do local _, vtN = EgtSurfTmFacetCenter( Proc.Id, j, GDB_ID.ROOT) if vtIni * vtN > 0 and nCountMilHead < 2 then - MakeSideFace( Proc.Id, j, nSide, sMilling, dToolDiam) + MakeSideFace( Proc.Id, j, nSide, sMilling, dToolDiam, nil, nil, bDownHead) nCountMilHead = nCountMilHead + 1 end end if bForcedLim and nCountMilHead < 1 then - MakeSideFace( Proc.Id, 0, nSide, sMilling, dToolDiam, bForcedLim) + MakeSideFace( Proc.Id, 0, nSide, sMilling, dToolDiam, bForcedLim, nil, bDownHead) nCountMilHead = nCountMilHead + 1 end end @@ -1042,12 +1043,12 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus for j = 1, Proc.Fct - 1 do local _, vtN = EgtSurfTmFacetCenter( Proc.Id, j, GDB_ID.ROOT) if vtFin * vtN > 0 and nCountMilHead < 2 then - MakeSideFace( Proc.Id, j, nSide, sMilling, dToolDiam) + MakeSideFace( Proc.Id, j, nSide, sMilling, dToolDiam, nil, nil, bDownHead) nCountMilHead = nCountMilHead + 1 end end if bForcedLim and nCountMilHead < 2 then - MakeSideFace( Proc.Id, 0, nSide, sMilling, dToolDiam, bForcedLim) + MakeSideFace( Proc.Id, 0, nSide, sMilling, dToolDiam, bForcedLim, nil, bDownHead) nCountMilHead = nCountMilHead + 1 end end diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 2f67a9b..a8f2e02 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -1,4 +1,4 @@ --- ProcessProfCamb.lua by Egaltech s.r.l. 2022/05/28 +-- ProcessProfCamb.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo profilo caudato per Travi -- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto. -- 2021/06/28 Per macchine con testa sotto, smussi di lato con questa testa se non c'è lav.ne da sopra. @@ -8,6 +8,7 @@ -- 2022/02/02 Aggiunta funzione OnlyChamfer. -- 2022/05/24 Aggiunta fresatura da sotto su macchine con testa da sotto. -- 2022/05/28 Aggiunto calcolo svuotatura da modulo di libreria. +-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura. -- Tabella per definizione modulo local ProcessProfCamb = {} @@ -315,12 +316,14 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- leggo anticipatamente i parametri utensile fresa per dare un valore opportuno all'elevazione della lama -- recupero la lavorazione di fresatura local sMillType = 'Prof' - sMilling, _, _, bMillDown = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bMillDown) + local bH2 + sMilling, _, _, bH2 = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bMillDown) if not sMilling then local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library' EgtOutLog( sErr) return false, sErr end + bMillDown = ( bMillDown and bH2) -- Recupero i dati dell'utensile if EgtMdbSetCurrMachining( sMilling) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) diff --git a/LuaLibs/ProcessStepJoint.lua b/LuaLibs/ProcessStepJoint.lua index dfe5a45..abf920c 100644 --- a/LuaLibs/ProcessStepJoint.lua +++ b/LuaLibs/ProcessStepJoint.lua @@ -1,5 +1,6 @@ --- ProcessStepJoint.lua by Egaltech s.r.l. 2022/01/26 +-- 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. -- Tabella per definizione modulo local ProcessStepJoint = {} @@ -83,13 +84,14 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) -- recupero la lavorazione local sMillType = 'Mark' local bDownHead = ( BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1) - local sMilling - sMilling, _, _, bDownHead = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead) + local sMilling, bH2 + sMilling, _, _, bH2 = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead) if not sMilling then local sErr = 'Error : milling not found in library' EgtOutLog( sErr) return false, sErr end + bDownHead = ( bDownHead and bH2) -- Inserisco la lavorazione del lato standard local sName1 = 'SJN_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMch1Id = EgtAddMachining( sName1, sMilling) diff --git a/LuaLibs/ProcessStepJointNotch.lua b/LuaLibs/ProcessStepJointNotch.lua index 9225a5a..627336b 100644 --- a/LuaLibs/ProcessStepJointNotch.lua +++ b/LuaLibs/ProcessStepJointNotch.lua @@ -1,5 +1,6 @@ --- ProcessStepJointNotch.lua by Egaltech s.r.l. 2022/01/25 +-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo tacca a gradino per Travi +-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura. -- Tabella per definizione modulo local ProcessStepJointNotch = {} @@ -523,13 +524,14 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) -- recupero la lavorazione local sMillType = 'Mark' local bDownHead = ( BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1) - local sMilling - sMilling, _, _, bDownHead = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead) + local sMilling, bH2 + sMilling, _, _, bH2 = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead) if not sMilling then local sErr = 'Error : milling not found in library' EgtOutLog( sErr) return false, sErr end + bDownHead = ( bDownHead and bH2) if bExeNormal then -- Inserisco la lavorazione del lato standard local sName1 = 'SJN_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) diff --git a/LuaLibs/ProcessTenon.lua b/LuaLibs/ProcessTenon.lua index bfcd71a..a278ab9 100644 --- a/LuaLibs/ProcessTenon.lua +++ b/LuaLibs/ProcessTenon.lua @@ -1,10 +1,11 @@ --- ProcessTenon.lua by Egaltech s.r.l. 2022/05/28 +-- ProcessTenon.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo tenone per Travi -- 2021/10/04 Corretto calcolo HCING per pezzi piccoli. -- 2022/02/15 Aggiornata VerifyOrientation per macchine con testa da sotto. -- 2022/05/18 Migliorata gestione attacco. -- 2022/05/28 Spostato calcolo svuotatura in modulo di libreria. -- 2022/09/20 Migliorato il calcolo delle passate laterali; ora considera la reale distanza tra contorno del tenone e estremi della faccia +-- 2022/11/03 Corretto uso di bH2 (da sotto solo se anche bMillDown vero). -- Tabella per definizione modulo local ProcessTenon = {} @@ -225,7 +226,7 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) -- porto inizio curva il più possibile sul bordo in alto o in basso local dMaxDist = OVERLAP_COEFF * dMillDiam * MAX_PASS local bMyShortPart = ( bShortPart and abs( vtN:getX()) < 0.999 and abs( vtN:getY()) < 0.259) - BL.PutStartNearestToEdge( AuxId, b3Solid, dMaxDist, bH2 ~= bMyShortPart) + BL.PutStartNearestToEdge( AuxId, b3Solid, dMaxDist, ( bH2 and bMillDown) ~= bMyShortPart) -- se elevazione superiore a massimo affondamento della fresa, riduco opportunamente local sWarn local dDepth = 0 From 6487fc3836570d1085bd52eb6f56923647046203 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 9 Nov 2022 12:37:11 +0100 Subject: [PATCH 08/11] Improvement/Ticket#880: - Per SimpleScarf (T70) implementata forzatura utilizzo fresa di lato tramite parametro Q04. Nel caso, viene richiamata la FreeContour --- LuaLibs/ProcessFreeContour.lua | 18 +++++++++++++----- LuaLibs/ProcessSimpleScarf.lua | 12 +++++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index 82ca02e..4485e98 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -3,6 +3,7 @@ -- 2022/08/23 Aggiunta la funzione MakeByMark per la gestione del caso P13=10 -- 2022/09/21 In MakeByMill aggiunto messaggio per elevazione non raggiunta. -- 2022/11/03 In MakeByMill migliorata gestione lavorazione con fresa su testa da sotto. +-- 2022/11/09 Aggiunta la gestione della chiamata della FreeContour da parte della SimpleScarf. -- Tabella per definizione modulo @@ -308,7 +309,8 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) end local bStripOnSide = false if bCross then - if dDimStrip > 10 * GEO.EPS_SMALL and ( nStep > 1 or ( bDown and b3Aux:getDimX() > 0.5 * b3Raw:getDimX())) then + -- se chiamata da SimpleScarf il codolo è sempre attivo + if dDimStrip > 10 * GEO.EPS_SMALL and ( nStep > 1 or ( bDown and b3Aux:getDimX() > 0.5 * b3Raw:getDimX()) or Proc.Prc == 70) then -- devo lasciare un codolo dDepth = dDepth - dDimStrip bStripOnSide = true @@ -319,7 +321,8 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) end local bIsDepthReduced = false -- se parametro beamdata forza codolo in centro e lavorazione orizzontale e se larghezza trave è sufficientemente larga - if BD.DIM_TO_CENTER_STRIP and BD.DIM_TO_CENTER_STRIP > 10 * GEO.EPS_SMALL and nStep > 1 and + -- se chiamata da SimpleScarf il codolo è sempre attivo + if BD.DIM_TO_CENTER_STRIP and BD.DIM_TO_CENTER_STRIP > 10 * GEO.EPS_SMALL and ( nStep > 1 or Proc.Prc == 70) and bCanDouble and b3Raw:getDimY() > BD.DIM_TO_CENTER_STRIP - 0.1 then nDouble = 2 dDepth = min( ( b3Raw:getDimY() - dDimStrip) * 0.5, dMaxDepth) @@ -354,7 +357,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) local dEndAddSpec = 0 if Proc.Grp ~= 0 then dEndAddSpec = CalcSpecialAdd( AuxId, false, dToolDiam) end -- se devo inserire il chamfer - if nChamfer > 0 and Proc.Grp ~= 0 and dOriDepth > dDepthCham then + if nChamfer > 0 and Proc.Grp ~= 0 and dOriDepth > dDepthCham and Proc.Prc ~= 70 then local bDoubleCham = false local dExtra = 2 -- eseguo @@ -567,9 +570,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- assegno lato di lavoro if Proc.Grp == 0 then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.CENTER) - elseif ( Proc.Grp == 3 and not bToolInv) or ( Proc.Grp == 4 and bToolInv) then + elseif ( Proc.Grp == 3 and not bToolInv) or ( Proc.Grp == 4 and bToolInv) or ( Proc.Grp == 1 and bToolInv) or ( Proc.Grp == 2 and bToolInv) then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) - elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) then + elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) or ( Proc.Grp == 1 and not bToolInv) or ( Proc.Grp == 2 and not bToolInv) then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) end -- posizione braccio porta testa @@ -779,6 +782,11 @@ end --------------------------------------------------------------------- -- Applicazione della lavorazione function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) + -- riassegno Q nel caso la funzione sia richiamata da un'altra make + if Proc.Prc == 70 then + Q_DEPTH_CHAMFER = 'Q01' + Q_DIM_STRIP = 'Q02' + end -- recupero la tipologia local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1) -- se svuotatura diff --git a/LuaLibs/ProcessSimpleScarf.lua b/LuaLibs/ProcessSimpleScarf.lua index 78ab84e..462f3c0 100644 --- a/LuaLibs/ProcessSimpleScarf.lua +++ b/LuaLibs/ProcessSimpleScarf.lua @@ -2,6 +2,7 @@ -- Gestione calcolo giunto Gerber per Travi -- 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. -- Tabella per definizione modulo local ProcessSimpleScarf = {} @@ -12,6 +13,7 @@ local BL = require( 'BeamLib') local Fbs = require( 'FacesBySaw') local DC = require( 'DiceCut') local Cut = require( 'ProcessCut') +local FreeContour = require( 'ProcessFreeContour') EgtOutLog( ' ProcessSimpleScarf started', 1) @@ -28,11 +30,13 @@ end --------------------------------------------------------------------- -- Classificazione della feature function ProcessSimpleScarf.Classify( Proc) + -- se forzato utilizzo fresa non ruoto la trave + local bForceSideMill = EgtGetInfo( Proc.Id, 'Q04', 'd') > 0 -- verifico le normali delle facce local nFacetCnt = EgtSurfTmFacetCount( Proc.Id) for i = 1, nFacetCnt do local vtN = EgtSurfTmFacetNormVersor( Proc.Id, i-1, GDB_ID.ROOT) - if vtN:getZ() < - 0.5 and Proc.Box:getDimX() / abs( vtN:getZ()) > BD.MAX_DIM_DICE then + if vtN:getZ() < - 0.5 and Proc.Box:getDimX() / abs( vtN:getZ()) > BD.MAX_DIM_DICE and not bForceSideMill then return true, true end end @@ -188,6 +192,12 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT -- inserimento smussi local bOkc, sErrC = MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) if not bOkc then return bOkc, sErrC end + -- se forzato utilizzo fresa richiamo la freecontour + local bForceSideMill = EgtGetInfo( Proc.Id, 'Q04', 'd') == 1 or EgtGetInfo( Proc.Id, 'Q04', 'd') == 2 or ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 3 and vtN[vFaceOrd[3]]:getZ() < 0.1) + if bForceSideMill then + bOk, sErr = FreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) + return bOk, sErr + end -- recupero la lavorazione local sCutting = ML.FindCutting( 'HeadSide') if not sCutting then From 0e3e6b617446738ffd2245b20f22e2bb129d049c Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 9 Nov 2022 15:25:45 +0100 Subject: [PATCH 09/11] Improvement/Ticket#880: piccola modifica --- LuaLibs/ProcessSimpleScarf.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LuaLibs/ProcessSimpleScarf.lua b/LuaLibs/ProcessSimpleScarf.lua index 462f3c0..298e83d 100644 --- a/LuaLibs/ProcessSimpleScarf.lua +++ b/LuaLibs/ProcessSimpleScarf.lua @@ -193,7 +193,9 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT local bOkc, sErrC = MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) if not bOkc then return bOkc, sErrC end -- se forzato utilizzo fresa richiamo la freecontour - local bForceSideMill = EgtGetInfo( Proc.Id, 'Q04', 'd') == 1 or EgtGetInfo( Proc.Id, 'Q04', 'd') == 2 or ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 3 and vtN[vFaceOrd[3]]:getZ() < 0.1) + local bForceSideMill = EgtGetInfo( Proc.Id, 'Q04', 'd') == 1 or + ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 2 and abs( vtN[vFaceOrd[3]]:getY())) < 0.1 or + ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 3 and abs( vtN[vFaceOrd[3]]:getY())) < 0.1 and vtN[vFaceOrd[3]]:getZ() < 0.1) if bForceSideMill then bOk, sErr = FreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) return bOk, sErr From f0ebd5c20658947c1dab4d0b75e9848062948ec4 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 9 Nov 2022 16:43:40 +0100 Subject: [PATCH 10/11] Improvement/Ticket#880: fix minori --- LuaLibs/ProcessFreeContour.lua | 3 ++- LuaLibs/ProcessSimpleScarf.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index 4485e98..b681f39 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -312,7 +312,8 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- se chiamata da SimpleScarf il codolo è sempre attivo if dDimStrip > 10 * GEO.EPS_SMALL and ( nStep > 1 or ( bDown and b3Aux:getDimX() > 0.5 * b3Raw:getDimX()) or Proc.Prc == 70) then -- devo lasciare un codolo - dDepth = dDepth - dDimStrip + local dExtraCham = EgtIf( nChamfer > 0, 2, 0) + dDepth = EgtIf( Proc.Prc == 70, dDepth - dDimStrip - dDepthCham - dExtraCham, dDepth - dDimStrip) bStripOnSide = true else -- devo affondare un poco oltre diff --git a/LuaLibs/ProcessSimpleScarf.lua b/LuaLibs/ProcessSimpleScarf.lua index 298e83d..f72bce2 100644 --- a/LuaLibs/ProcessSimpleScarf.lua +++ b/LuaLibs/ProcessSimpleScarf.lua @@ -195,7 +195,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT -- se forzato utilizzo fresa richiamo la freecontour local bForceSideMill = EgtGetInfo( Proc.Id, 'Q04', 'd') == 1 or ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 2 and abs( vtN[vFaceOrd[3]]:getY())) < 0.1 or - ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 3 and abs( vtN[vFaceOrd[3]]:getY())) < 0.1 and vtN[vFaceOrd[3]]:getZ() < 0.1) + ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 3 and abs( vtN[vFaceOrd[3]]:getY())) < 0.1 and vtN[vFaceOrd[3]]:getZ() < 0.1 if bForceSideMill then bOk, sErr = FreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) return bOk, sErr From c654bbcd19f7d49e1f2b475aeff7ce84399290f8 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 9 Nov 2022 18:13:40 +0100 Subject: [PATCH 11/11] Improvement/Ticket#880: fix minori --- LuaLibs/ProcessSimpleScarf.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LuaLibs/ProcessSimpleScarf.lua b/LuaLibs/ProcessSimpleScarf.lua index f72bce2..29b42af 100644 --- a/LuaLibs/ProcessSimpleScarf.lua +++ b/LuaLibs/ProcessSimpleScarf.lua @@ -31,7 +31,7 @@ end -- Classificazione della feature function ProcessSimpleScarf.Classify( Proc) -- se forzato utilizzo fresa non ruoto la trave - local bForceSideMill = EgtGetInfo( Proc.Id, 'Q04', 'd') > 0 + local bForceSideMill = ( EgtGetInfo( Proc.Id, 'Q04', 'd') or 0) > 0 -- verifico le normali delle facce local nFacetCnt = EgtSurfTmFacetCount( Proc.Id) for i = 1, nFacetCnt do @@ -194,8 +194,8 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT if not bOkc then return bOkc, sErrC end -- se forzato utilizzo fresa richiamo la freecontour local bForceSideMill = EgtGetInfo( Proc.Id, 'Q04', 'd') == 1 or - ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 2 and abs( vtN[vFaceOrd[3]]:getY())) < 0.1 or - ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 3 and abs( vtN[vFaceOrd[3]]:getY())) < 0.1 and vtN[vFaceOrd[3]]:getZ() < 0.1 + ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 2 and abs( vtN[vFaceOrd[3]]:getY()) < 0.1) or + ( EgtGetInfo( Proc.Id, 'Q04', 'd') == 3 and abs( vtN[vFaceOrd[3]]:getY()) < 0.1 and vtN[vFaceOrd[3]]:getZ() < 0.1) if bForceSideMill then bOk, sErr = FreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) return bOk, sErr