From 1350cd03af364cfea2e563efd48ea0bfa2f47f30 Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 4 Jul 2022 16:52:47 +0200 Subject: [PATCH] DataBeam : - in ProcessLapJoint modifiche per lavorazioni con Sega a Catena (soprattutto elevazione da MaxElev). --- LuaLibs/ProcessLapJoint.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 332f902..bebdb86 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1,4 +1,4 @@ --- ProcessLapJoint.lua by Egaltech s.r.l. 2022/06/25 +-- ProcessLapJoint.lua by Egaltech s.r.l. 2022/07/03 -- Gestione calcolo mezzo-legno per Travi -- 2019/10/08 Agg. gestione OpenPocket. -- 2021/01/24 Con sega a catena ora sempre impostato asse A. @@ -2793,12 +2793,13 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFacesMaster, nBottomFace, nChamfer, nAddGrpId, b3Solid, dDepthCham, nSurfInt, bIs3Faces) - local bOrthoFaces local sWarn -- ingombro del grezzo local b3Raw = EgtGetRawPartBBox( nRawId) -- ottengo la distanza tra la fine del pezzo e il pezzo successivo local dDistToNextPiece = EgtGetInfo( nRawId, 'BDST', 'd') or 5.4 + -- verifico e fessura con 3 facce o tunnel + local bOrthoFaces if bIs3Faces then -- recupero la faccia con il maggior numero di adiacenze e l'elevazione relativa local nFacInd1, dFacElev1, nFacInd2, dFacElev2 = BL.GetFaceWithMostAdj( Proc.Id, nPartId, bIs3Faces) @@ -2817,6 +2818,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, -- eventuale massima elevazione imposta dall'utente local dMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd') if dMaxElev and dMaxElev < 1 then dMaxElev = nil end + dElev = dMaxElev or dElev if bOrthoFaces then -- ottengo le dimensioni del tunnel @@ -2913,7 +2915,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, dSawMaxDepth = BD.MAX_DIM_HTCUT_HBEAM end -- Se entrambi gli estremi sono aperti e possibile, lavoro con la lama - if bOpenStart and bOpenEnd and bForceUseBlade and ( dMaxElev or dElev) < dSawMaxDepth + 10 * GEO.EPS_SMALL then + if bOpenStart and bOpenEnd and bForceUseBlade and dElev < dSawMaxDepth + 10 * GEO.EPS_SMALL then -- recupero altri dati dell'utensile local dSawDiam = 400 local dSawThick = 4 @@ -2977,10 +2979,10 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, return false, sErr end local bGoFromHead = true - -- se la lunghezza utensile non riesce ad arrivare sul fondo assegno la possibilità di lavorare di testa o di fianco + -- se la lunghezza utensile non riesce ad arrivare sul fondo assegno la possibilità di lavorare di fianco (se possibile) if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then - -- lavora di testa se è un tunnel, lavora di fianco se non è un tunnel - bGoFromHead = not bOrthoFaces + -- continuo di testa se fessura con tre facce o non è tunnel + bGoFromHead = ( bIs3Faces or not bOrthoFaces) end -- se continuo a lavorare di testa if bGoFromHead then @@ -3118,10 +3120,8 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, end -- considero estremi inizio/fine chiusi -- recupero massima elevazione da utente - if dMaxElev and dMaxElev > 10 then - local sNotes = 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';' - EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes) - end + local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';' + EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes) -- eseguo if not ML.ApplyMachining( true, false) then if EgtGetOutstrokeInfo() then