From 1350cd03af364cfea2e563efd48ea0bfa2f47f30 Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 4 Jul 2022 16:52:47 +0200 Subject: [PATCH 1/2] 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 From 89aacd06ea5b5feafa5656028facaf074fa41f87 Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 4 Jul 2022 20:39:03 +0200 Subject: [PATCH 2/2] DataBeam : - in LapJoint aumentata tolleranza per calcolo passate lama e sega a catena. --- LuaLibs/ProcessLapJoint.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index bebdb86..736edb5 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -2753,7 +2753,7 @@ local function MakeByMillAsSaw( Proc, nPhase, nRawId, nPartId, nFacInd, end end -- Eseguo i tagli - local nStep = ceil( ( dV - 10 * GEO.EPS_SMALL) / dSawThick) + local nStep = ceil( ( dV - 100 * GEO.EPS_SMALL) / dSawThick) local dStep = 0 if nStep > 1 then dStep = ( dV - dSawThick) / ( nStep - 1) @@ -2934,7 +2934,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, -- Calcolo uso faccia local nFaceUse = BL.GetNearestOrthoOpposite( rfFac:getVersZ()) -- Eseguo i tagli - local nStep = ceil( ( dV - 10 * GEO.EPS_SMALL) / dSawThick) + local nStep = ceil( ( dV - 100 * GEO.EPS_SMALL) / dSawThick) local dStep = 0 if nStep > 1 then dStep = ( dV - dSawThick) / ( nStep - 1) @@ -2991,7 +2991,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, -- Calcolo uso faccia local nFaceUse = BL.GetNearestParalOpposite( rfFac:getVersZ(), vtN) -- Verifico se necessarie più passate - local nStep = ceil( ( dV - 10 * GEO.EPS_SMALL) / dSawThick) + local nStep = ceil( ( dV - 100 * GEO.EPS_SMALL) / dSawThick) local dStep = 0 if nStep > 1 then dStep = ( dV - dSawThick) / ( nStep - 1) @@ -3082,7 +3082,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, if vtRef:getY() > 0.5 or vtRef:getZ() < -0.1 then vtRef = -vtRef end local nFaceUse = BL.GetNearestParalOpposite( vtRef, vtNL) -- Verifico se necessarie più passate - local nStep = ceil( ( dDimMin - 10 * GEO.EPS_SMALL) / dSawThick2) + local nStep = ceil( ( dDimMin - 100 * GEO.EPS_SMALL) / dSawThick2) local dStep = 0 if nStep > 1 then dStep = ( dDimMin - dSawThick2) / ( nStep - 1) @@ -4446,7 +4446,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bMakeChainSaw, sSawing, dMaxMat, dSawCornerRad, dSawThick = VerifyChainSaw( Proc, dDimMin, dDimMax) if bMakeChainSaw then -- Verifico se necessarie più passate - local nStep = ceil( ( dDimMin - 10 * GEO.EPS_SMALL) / dSawThick) + local nStep = ceil( ( dDimMin - 100 * GEO.EPS_SMALL) / dSawThick) local dStep = 0 if nStep > 1 then dStep = ( dDimMin - dSawThick) / ( nStep - 1)