From edeae8b9936989abc824cfd4be60b6f37d4788ce Mon Sep 17 00:00:00 2001 From: DarioS Date: Fri, 3 Sep 2021 18:45:25 +0200 Subject: [PATCH] =?UTF-8?q?DataBeam=20:=20-=20modificata=20gestione=20pezz?= =?UTF-8?q?i=20piccoli=20da=20vista=20(ora=20grezzo=20pi=C3=B9=20lungo=20a?= =?UTF-8?q?nche=20con=20pezzi=20pi=C3=B9=20lunghi)=20-=20modificata=20scel?= =?UTF-8?q?ta=20per=20attacco=20tg=20o=20perpendicolare=20con=20lama=20-?= =?UTF-8?q?=20per=20taglio=20doppio=20aggiunta=20gestione=20nessun=20limit?= =?UTF-8?q?e=20direzione=20da=20sotto=20per=20testa=20da=20sotto=20-=20con?= =?UTF-8?q?=20testa=20da=20sotto=20su=20mortasa=20a=20coda=20di=20rondine?= =?UTF-8?q?=20aggiunto=20controllo=20possibilit=C3=A0=20di=20salita=20in?= =?UTF-8?q?=20Z=20(variabile=20macchina=20BD.DH=5FMAX=5FTOP)=20-=20in=20fe?= =?UTF-8?q?ssure=20verticali=20su=20pezzi=20alti,=20verifica=20affondament?= =?UTF-8?q?o=20lama=20tenendo=20conto=20dell'altezza=20del=20pezzo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BatchProcessNew.lua | 4 ++-- LuaLibs/BeamLib.lua | 2 +- LuaLibs/FacesBySaw.lua | 14 ++++++++++---- LuaLibs/ProcessDtMortise.lua | 3 +++ LuaLibs/ProcessLapJoint.lua | 8 +++++++- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/BatchProcessNew.lua b/BatchProcessNew.lua index b1ad9bd..cad6b32 100644 --- a/BatchProcessNew.lua +++ b/BatchProcessNew.lua @@ -259,8 +259,8 @@ if bToProcess then end -- Assegno lunghezza della barra dBarLen = vBeam[1].Box:getDimX() + 10 - if dBarLen < 1500 then - dBarLen = 2500 + if dBarLen < 2000 then + dBarLen = 3000 end -- Assegno posizione prima ed unica trave vBeam[1].PosX = 10 diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 425d332..3e95362 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -959,7 +959,7 @@ function BeamLib.MakeOneFaceBySaw( nSurfId, nFacet, sCutting, dSawDiam, Par5, dV local dLenLo2 = abs( dLo2Tang) -- scelgo l'attacco più conveniente (se non taglio praticamente longitudinale) if abs( vtTg:getX()) < 0.9848 and - ( ( abs( vtTg:getZ()) < 0.17 and ( vtV1:getZ() < -0.5 or vtV2:getZ() < -0.5)) or ( 1.5*dLenLi2 < dLenLi and 1.5*dLenLo2 < dLenLo) or 1.5*( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) then + ( ( abs( vtTg:getZ()) < 0.17 and ( vtV1:getZ() < -0.5 or vtV2:getZ() < -0.5)) or ( 1.1*dLenLi2 < dLenLi and 1.1*dLenLo2 < dLenLo) or 1.1*( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) then dLiTang, dLiPerp, dLoTang, dLoPerp = dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp end -- posizione braccio diff --git a/LuaLibs/FacesBySaw.lua b/LuaLibs/FacesBySaw.lua index 75182c3..b40901b 100644 --- a/LuaLibs/FacesBySaw.lua +++ b/LuaLibs/FacesBySaw.lua @@ -1,5 +1,6 @@ --- FacesBySaw.lua by Egaltech s.r.l. 2021/06/15 +-- FacesBySaw.lua by Egaltech s.r.l. 2021/08/31 -- Gestione taglio con lama di feature con una, due o tre facce +-- 2021/08/31 DS Aggiunta gestione nessun limite direzione da sotto per testa da sotto. -- Tabella per definizione modulo local FacesBySaw = {} @@ -101,6 +102,11 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType, if dAngT < -91 and dAngT > -179 then dCutExtra = - dSawThick / tan( 180 + dAngT) end + -- sistemo direzione limite da sotto (con testa da sotto limite Vz Down Up messo a -2 per non farlo mai intervenire) + local dNzLimDwnUp + if bDownHead then + dNzLimDwnUp = - 2 + end -- verifico se necessari tagli supplementari local vCuts = DC.GetDice( EgtGetParent( Proc.Id), b3Solid, ptC[nUpInd], vtN[nUpInd], false, ptC[nOtInd], vtN[nOtInd]) --DC.PrintOrderCut( vCuts) @@ -131,7 +137,7 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType, if not BD.C_SIMM and BD.MAX_HEIGHT_ROT_B_ABOVE and b3Raw:getDimZ() > BD.MAX_HEIGHT_ROT_B_ABOVE and vtOrthO:getZ() > 0.866 and j == #vCuts[i] then dAccEnd = - ( dSawDiam / 2 + BD.CUT_SIC) end - local bOk, sErr = BL.MakeOneFaceBySaw( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthO, nil, dCutExtra, BD.CUT_SIC, 0, 0, dAccEnd, nil, b3Raw) + local bOk, sErr = BL.MakeOneFaceBySaw( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthO, dNzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, dAccEnd, nil, b3Raw) if not bOk then return bOk, sErr end @@ -145,10 +151,10 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType, nUpInd, nOtInd = nOtInd, nUpInd end -- lavoro la prima faccia - local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, nOtInd-1, sCutting, dSawDiam, vtRef[nOtInd], nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw) + local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, nOtInd-1, sCutting, dSawDiam, vtRef[nOtInd], dNzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw) if not bOk then return bOk, sErr end -- lavoro seconda faccia - bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, nUpInd-1, sCutting, dSawDiam, vtRef[nUpInd], nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw) + bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, nUpInd-1, sCutting, dSawDiam, vtRef[nUpInd], dNzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw) if not bOk then return bOk, sErr end diff --git a/LuaLibs/ProcessDtMortise.lua b/LuaLibs/ProcessDtMortise.lua index 703d84c..31ceeda 100644 --- a/LuaLibs/ProcessDtMortise.lua +++ b/LuaLibs/ProcessDtMortise.lua @@ -187,6 +187,9 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- abilitazione lavorazione da sotto local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259) local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174) + if BD.DH_MAX_TOP and Proc.Box:getMax():getZ() - b3Solid:getMin():getZ() > BD.DH_MAX_TOP then + bMillDown = false + end local bMillAngTrasm = ( BD.ANG_TRASM and vtExtr:getZ() < -0.1) -- recupero la lavorazione local sMillType = 'DtMortise' diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 648f6c5..80a4032 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1,4 +1,4 @@ --- ProcessLapJoint.lua by Egaltech s.r.l. 2021/07/15 +-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/08/30 -- Gestione calcolo mezzo-legno per Travi -- 2019/10/08 Agg. gestione OpenPocket. -- 2021/01/24 Con sega a catena ora sempre impostato asse A. @@ -2636,6 +2636,12 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, end end end + -- se lavorazione sulle teste e altezza trave supera il limite ( che causa collisione con la forcella) e direzione taglio lungo la Z + -- e limite profondità BeamData è maggiore del taglio massimo lama, assegno il massimo affondamento pari al limite profondità del BeamData + if bOpenStart and bOpenEnd and bForceUseBlade and ( Proc.Head or Proc.Tail) and abs(rfFac:getVersY():getY()) > 0.866 and + b3Solid:getDimZ() > BD.MIN_DIM_HBEAM and dSawMaxDepth > BD.MAX_DIM_HTCUT_HBEAM then + 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 dElev < dSawMaxDepth + 10 * GEO.EPS_SMALL then -- Recupero la lavorazione di lama