From afb57f7e92b65ec4b90c84251bb23074afe20931 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 16 Jun 2022 18:25:02 +0200 Subject: [PATCH 1/3] DataBeam: -Implemento lavorazioni con fresatura di lato per L30 (al momento solo passanti) se parametro Q03=2. Modificate funzioni Make, MakeByPockets, Classify. --- LuaLibs/ProcessLapJoint.lua | 51 +++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 74e36cc..4ebf1af 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -43,6 +43,7 @@ -- 2022/05/04 Corretta classificazione due facce sotto. Modificati criteri assegnazione due facce alla coda. -- 2022/05/24 Miglioramenti vari per BH, compreso controlli per lavorazione da sotto. -- 2022/06/13 Modifiche per feature lunga con due facce non equivalenti a taglio long. doppio o singolo con faccia terminale. +-- 2022/06/16 Implemento lavorazioni con fresatura di lato per L30 (al momento solo passanti) se parametro Q03=2. Modificate funzioni Make, MakeByPockets, Classify. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -720,7 +721,9 @@ function ProcessLapJoint.Classify( Proc, b3Raw) local bDown = ( vtN[1]:getZ() < BD.NZ_MINB and vtN[2]:getZ() < BD.NZ_MINB) or ( vtN[1]:getZ() < BD.NZ_MINA and vtN[2]:getZ() < 0.5 and ( vtN[2]:getZ() < -0.1 or not bSmall)) or ( vtN[2]:getZ() < BD.NZ_MINA and vtN[1]:getZ() < 0.5 and ( vtN[1]:getZ() < -0.1 or not bSmall)) - bDown = ( bDown and not BD.DOWN_HEAD and not BD.TURN) + -- per L30, se forzata la lavorazione con fresa di lato da parametro Q03=2 non devo ruotare + local bForceSideMill = ( Proc.Prc == 30 and EgtGetInfo( Proc.Id, 'Q03', 'd') == 2) + bDown = ( bDown and not BD.DOWN_HEAD and not BD.TURN and not bForceSideMill) return true, bDown -- se più di 2 facce else @@ -818,7 +821,12 @@ function ProcessLapJoint.Classify( Proc, b3Raw) local bDown = ( vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and not BD.TURN) -- se verso il basso, verifico se utilizzabile seconda faccia if bDown then - if nFacInd2 and dElev2 < 2 * dElev then + local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc)) + -- per lapjoint proc 30, se forzata la lavorazione con fresa di lato da parametro Q03=2 non devo ruotare + local bForceSideMill = ( Proc.Prc == 30 and EgtGetInfo( Proc.Id, 'Q03', 'd') == 2 and Proc.Fct == 3 and bIsU) + if bForceSideMill then + bDown = false + elseif nFacInd2 and dElev2 < 2 * dElev then local ptC2, vtN2 = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT) bDown = ( vtN2:getZ() < BD.NZ_MINB) elseif not nFacInd2 and bIsL and nFaceAdj >= 0 then @@ -3550,7 +3558,7 @@ local function GetUShapeWidth( Proc, nFacInd) end --------------------------------------------------------------------- -local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMchFindMaster, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown) +local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMchFindMaster, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders) local nFirstMachId local bOrthoFaces @@ -3608,8 +3616,8 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha -- e assegno l'estrusione nPathInt = EgtExtractSurfTmLoops( nSurfInt, nAddGrpId) EgtModifyCurveExtrusion( nPathInt, vtOrtho, GDB_RT.GLOB) - -- se ho 3 facce, ciclo sulle entià del percorso per segnare quelle che sono aperte - if bIs3Faces then + -- se ho 3 facce oppure se forzato, ciclo sulle entià del percorso per segnare quelle che sono aperte. + if bIs3Faces or bSetOpenBorders then SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId) end -- variabili per parametri lavorazione @@ -4541,6 +4549,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc)) -- verifico se due facce o L con una o due facce di terminazione local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc) or TestElleShape4( Proc) == 2) + local bForceSideMill = Proc.Prc == 30 and EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 and ( ( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 2)) -- se fattibile con fresa BH di fianco e spessore utensile inferiore alla larghezza faccia local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill) if bPrevBhSideMill == nil then @@ -4774,9 +4783,9 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa dFacElev, dFacElev2 = dFacElev2, dFacElev bUseOtherFace = true end - -- verifico non sia orientata verso il basso o ci sia una testa dal basso + -- verifico non sia orientata verso il basso o ci sia una testa dal basso o la lavorazione sia dal lato. local bFaceDown = ( vtN:getZ() < BD.NZ_MINA) - if bFaceDown and not BD.DOWN_HEAD and not BD.TURN then + if bFaceDown and not BD.DOWN_HEAD and not BD.TURN and not bForceSideMill then local sErr = 'Error : LapJoint from bottom impossible' EgtOutLog( sErr) return false, sErr @@ -4986,14 +4995,18 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa if Proc.Prc == 16 and bForceUseBlade and Proc.Fct == 3 and bIsU then sPocketing = nil end + -- se richiesta fresatura di lato + if bForceSideMill then + sPocketing = nil + end -- leggo parametro Q local nQAntisplintResult = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') or 0 - -- se lavorazione fresa come lama disabilito eveentuale antischegggia + -- se lavorazione fresa come lama disabilito eventuale antischeggia if bSpecialMillOnSide then nQAntisplintResult = 0 end -- se non trova una svuotatura adatta if not sPocketing then -- se forma a L provo con contornatura - if bIsL and not bSpecialMillOnSide then + if bIsL and not bSpecialMillOnSide and not bForceSideMill then -- se smusso non è esclusivo if nChamfer < 2 then return MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev, dCollSic) @@ -5105,16 +5118,26 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa bMadeASbyBld, bOk, sWarn = ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtN, nFacInd, sWarn, bSawDown, true) if not bOk then return false, sWarn end end - -- in base al flag interno e al numero di facce e se ha forma ad U: provo prima la svuotatura sul fianco e + -- in base al flag interno e al numero di facce e se ha forma ad U + -- oppure se richiesta lavorazione di lato: + -- provo prima la svuotatura sul fianco e -- se non è possibile allora provo in seguito con lama o segacatena -- o passare subito dalla lavorazione con lama/sega catena - if bTrySidePocketAtFirst and Proc.Fct == 3 and bIsU then + if ( bTrySidePocketAtFirst and Proc.Fct == 3 and bIsU) or bForceSideMill then -- lavoro con svuotature (singola o doppia contrapposta) local sMyMchFind = 'Pocket' local dDiamTool = 100 local nPathInt, nSurfInt, bOneShot, nFirstMachId + local bIs3Faces = true + local bOrthoFacesMaster = nil + local bSetOpenBorders = nil + if Proc.Fct == 2 or bForceSideMill then + bIs3Faces = false + bOrthoFacesMaster = true + bSetOpenBorders = true + end nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, - bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, true, b3Solid, nil, bMillDown) + bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders) if nOk == -2 then if not sMchFind then sMchFind = sMchFindBackUp @@ -5133,7 +5156,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa bTryWithBlades = false sWarn = sErr -- se ho antischeggia con fresa le inserisco --- if nChamfer < 2 and nQAntisplintResult == 2 and ( bIsU or bIsL) then + -- if nChamfer < 2 and nQAntisplintResult == 2 and ( bIsU or bIsL) then if nChamfer < 2 and nQAntisplintResult == 2 then local bOk, sWarn2 = ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw, nFacInd, nAddGrpId, bMillDown, dDiamTool, bDoubleSide, @@ -5483,7 +5506,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) local nUseRoughToolOnSide = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0 nForceUseBladeOnNotContinueFace = EgtGetInfo( Proc.Id, Q_BLADE_ON_ALONG_FACE, 'i') or 0 -- se antischeggia di fresa o abilitato sgrossatore di fianco - if nBladeAntisplint == 2 or nUseRoughToolOnSide == 1 then + if nBladeAntisplint == 2 or nUseRoughToolOnSide > 0 then bUseBlade = false end -- se ho attivo la lama e ho la feature 32, verifico i parametri Q propri della feature From 9e2a9ebc7ae8387b1a04ff8d92a1d8cec5bf8198 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 21 Jun 2022 09:33:19 +0200 Subject: [PATCH 2/3] DataBeam: - per lavorazioni con fresatura di lato per L30 (Q03=2) aggiunte feature non passanti. Modificate funzioni MakeByPockets, Classify. --- LuaLibs/ProcessLapJoint.lua | 161 +++++++++++++++++++++++++----------- 1 file changed, 113 insertions(+), 48 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 75649f7..d9bda73 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -45,6 +45,7 @@ -- 2022/06/13 Modifiche per feature lunga con due facce non equivalenti a taglio long. doppio o singolo con faccia terminale. -- 2022/06/15 Correzione calcolo normale alla faccia per sega catena di fianco. -- 2022/06/16 Implemento lavorazioni con fresatura di lato per L30 (al momento solo passanti) se parametro Q03=2. Modificate funzioni Make, MakeByPockets, Classify. +-- 2022/06/21 Implemento di lavorazioni non passanti con fresatura di lato per L30 se parametro Q03=2. Modificate funzioni MakeByPockets, Classify. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -824,7 +825,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw) if bDown then local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc)) -- per lapjoint proc 30, se forzata la lavorazione con fresa di lato da parametro Q03=2 non devo ruotare - local bForceSideMill = ( Proc.Prc == 30 and EgtGetInfo( Proc.Id, 'Q03', 'd') == 2 and Proc.Fct == 3 and bIsU) + local bForceSideMill = ( Proc.Prc == 30 and EgtGetInfo( Proc.Id, 'Q03', 'd') == 2 and ( Proc.Fct == 3 or Proc.Fct == 4)) if bForceSideMill then bDown = false elseif nFacInd2 and dElev2 < 2 * dElev then @@ -4355,6 +4356,40 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw, return true, sMyWarn end +--------------------------------------------------------------------- +-- Trova il numero (0 based) della faccia meglio orientata come l'asse 'sAxis'. Restituisce anche vtN e ptC della faccia stessa. +-- sAxis: 'X' o 'Y' o 'Z' +local function FindFaceBestOrientedAsAxis( Proc, sAxis) + local ptC = {} + local vtN = {} + local nFaceMaximumNormalComponentOnAxis = 0 + local dFaceMaximumNormalComponentOnAxisValue = 0 + for i = 1, Proc.Fct do + ptC[i], vtN[i] = EgtSurfTmFacetCenter( Proc.Id, i - 1, GDB_ID.ROOT) + if sAxis == 'X' then + if abs(vtN[i]:getX()) > dFaceMaximumNormalComponentOnAxisValue then + nFaceMaximumNormalComponentOnAxis = i - 1 + dFaceMaximumNormalComponentOnAxisValue = abs(vtN[i]:getX()) + end + elseif sAxis == 'Y' then + if abs(vtN[i]:getY()) > dFaceMaximumNormalComponentOnAxisValue then + nFaceMaximumNormalComponentOnAxis = i - 1 + dFaceMaximumNormalComponentOnAxisValue = abs(vtN[i]:getY()) + end + elseif sAxis == 'Z' then + if abs(vtN[i]:getZ()) > dFaceMaximumNormalComponentOnAxisValue then + nFaceMaximumNormalComponentOnAxis = i - 1 + dFaceMaximumNormalComponentOnAxisValue = abs(vtN[i]:getZ()) + end + else + local sErr = 'Error : FindFaceBestOrientedAsAxis - unknown axis name' + EgtOutLog( sErr) + return false, sErr + end + end + return nFaceMaximumNormalComponentOnAxis, vtN[ nFaceMaximumNormalComponentOnAxis + 1], ptC[ nFaceMaximumNormalComponentOnAxis + 1] +end + --------------------------------------------------------------------- local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePart, bPrevBhSideMill, bAllWithEndCap) local sWarn @@ -4552,7 +4587,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc)) -- verifico se due facce o L con una o due facce di terminazione local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc) or TestElleShape4( Proc) == 2) - local bForceSideMill = Proc.Prc == 30 and EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 and ( ( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 2)) + -- se L30 e paramtetro Q03=2 forzo la fresatura di lato + local bForceSideMill = Proc.Prc == 30 and EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 and ( Proc.Fct == 4 or Proc.Fct == 3 or Proc.Fct == 2) -- se fattibile con fresa BH di fianco e spessore utensile inferiore alla larghezza faccia local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill) if bPrevBhSideMill == nil then @@ -5134,57 +5170,86 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bIs3Faces = true local bOrthoFacesMaster = nil local bSetOpenBorders = nil - if Proc.Fct == 2 or bForceSideMill then - bIs3Faces = false - bOrthoFacesMaster = true - bSetOpenBorders = true - end - nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, - bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders) - if nOk == -2 then - if not sMchFind then - sMchFind = sMchFindBackUp - end - sPocketing = ML.FindPocketing( sMchFind, dDiam, nil, nil, not bMillDown, bMillDown) - if not sPocketing then - local sErr2 = 'Error : '..sMchFind..' not found in library' - EgtOutLog( sErr2) - return false, sErr2 + -- trovo la faccia con normale più inclinata verso Y + local nFacApproxY, vtNFacApproxY, ptCFacApproxY = FindFaceBestOrientedAsAxis( Proc, 'Y') + -- se Q03 = 2 e + -- 3 facce a L, oppure + -- 3 facce non a L ma con una faccia favorevole a Y, oppure + -- 4 facce + -- lancio la MakePocket ( lavorazione solo da un lato, fondo della tasca la faccia più favorevole a Y) + if bForceSideMill and (( Proc.Fct == 3 and bIsL) or ( Proc.Fct == 3 and abs( vtNFacApproxY:getY()) >= 0.707 ) or Proc.Fct == 4) then + nFacInd, vtN, ptC = nFacApproxY, vtNFacApproxY, ptCFacApproxY + local tvtNx = {} + tvtNx[2] = vtN + local ptPs = ptC + dFacElev = BL.GetFaceElevation( Proc.Id, nFacInd) + dCollSic = CalcCollisionSafety( tvtNx[2]) + local dMachDepth = dFacElev + dCollSic + -- valuto la massima profondità di lavorazione dell'utensile. Se non arriva emetto warning e lavoro fino a dove è possibile. + local _, _, dDimMin = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT) + local _, sPocketing = VerifyPocket( Proc, dDimMin, dFacElev, nil, sMyMchFind) + bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, nPartId, ptPs, tvtNx, nFacInd, sMyMchFind, nUseRoughTool, sPocketing, dMachDepth, nil, nil, bAllWithEndCap) + if not bOk then return false, sWarn2 end + if sWarn2 then + if not sWarn then sWarn = '' end + sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) end bTryWithBlades = false - sWarn = sErr - elseif nOk < 0 then - return false, sErr - elseif nOk > 0 then - bTryWithBlades = false - sWarn = sErr - -- se ho antischeggia con fresa le inserisco - -- if nChamfer < 2 and nQAntisplintResult == 2 and ( bIsU or bIsL) then - if nChamfer < 2 and nQAntisplintResult == 2 then - local bOk, sWarn2 = ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw, - nFacInd, nAddGrpId, bMillDown, dDiamTool, bDoubleSide, - vtOrtho, nPathInt, nSurfInt, b3Solid, dDepth, - bOneShot, nFirstMachId) - if sWarn2 then - if not sWarn then sWarn = '' end - sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) - end - end - -- se abilitato dal parametro Q inserisco pulitura spigoli o contorno con fresa più piccola - local nContourSmallTool = EgtGetInfo( Proc.Id, Q_CONTOUR_SMALL_TOOL, 'i') or 0 - if nContourSmallTool > 0 then - local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw, - nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown, - bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid, - dDepth, bOneShotm) - if not bOk then return false, sWarn2 end - if sWarn2 then - if not sWarn then sWarn = '' end - sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) + -- in tutti gli altri casi lancio la MakeByPockets (lavorazione singola o doppia contrapposta, fondo della tasca una faccia fittizia perpendicolare al lato lungo) + else + -- se 2 facce setto i parametri corretti per la MakeByPockets + if bForceSideMill and Proc.Fct == 2 then + bIs3Faces = false + bOrthoFacesMaster = true + bSetOpenBorders = true + end + nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, + bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders) + if nOk == -2 then + if not sMchFind then + sMchFind = sMchFindBackUp + end + sPocketing = ML.FindPocketing( sMchFind, dDiam, nil, nil, not bMillDown, bMillDown) + if not sPocketing then + local sErr2 = 'Error : '..sMchFind..' not found in library' + EgtOutLog( sErr2) + return false, sErr2 + end + bTryWithBlades = false + sWarn = sErr + elseif nOk < 0 then + return false, sErr + elseif nOk > 0 then + bTryWithBlades = false + sWarn = sErr + -- se ho antischeggia con fresa le inserisco + -- if nChamfer < 2 and nQAntisplintResult == 2 and ( bIsU or bIsL) then + if nChamfer < 2 and nQAntisplintResult == 2 then + local bOk, sWarn2 = ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw, + nFacInd, nAddGrpId, bMillDown, dDiamTool, bDoubleSide, + vtOrtho, nPathInt, nSurfInt, b3Solid, dDepth, + bOneShot, nFirstMachId) + if sWarn2 then + if not sWarn then sWarn = '' end + sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) + end + end + -- se abilitato dal parametro Q inserisco pulitura spigoli o contorno con fresa più piccola + local nContourSmallTool = EgtGetInfo( Proc.Id, Q_CONTOUR_SMALL_TOOL, 'i') or 0 + if nContourSmallTool > 0 then + local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw, + nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown, + bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid, + dDepth, bOneShotm) + if not bOk then return false, sWarn2 end + if sWarn2 then + if not sWarn then sWarn = '' end + sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) + end end end + bOk = true end - bOk = true end -- 03/09/2020 da conferma di Fabio Squaratti: Per ora solo sulla feature 016: -- se ha fallito la fresatura (qua sopra) allora di defalut ( anche se il flag Q della lama è disattivato) prima provo la lama From 966ac06e4eea51612d9550b3b32c3c435f85275a Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 21 Jun 2022 09:47:12 +0200 Subject: [PATCH 3/3] DataBeam: - sistemazione commenti in ProcessLapJoint --- LuaLibs/ProcessLapJoint.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index d9bda73..c756f72 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -44,8 +44,8 @@ -- 2022/05/24 Miglioramenti vari per BH, compreso controlli per lavorazione da sotto. -- 2022/06/13 Modifiche per feature lunga con due facce non equivalenti a taglio long. doppio o singolo con faccia terminale. -- 2022/06/15 Correzione calcolo normale alla faccia per sega catena di fianco. --- 2022/06/16 Implemento lavorazioni con fresatura di lato per L30 (al momento solo passanti) se parametro Q03=2. Modificate funzioni Make, MakeByPockets, Classify. --- 2022/06/21 Implemento di lavorazioni non passanti con fresatura di lato per L30 se parametro Q03=2. Modificate funzioni MakeByPockets, Classify. +-- 2022/06/16 Implemento lavorazioni con fresatura di lato per L30 (al momento solo passanti) se parametro Q03=2. Modificate funzioni Make, MakeMoreFaces, Classify. +-- 2022/06/21 Implemento di lavorazioni non passanti con fresatura di lato per L30 se parametro Q03=2. Modificate funzioni MakeMoreFaces, Classify. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -5185,7 +5185,6 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa dFacElev = BL.GetFaceElevation( Proc.Id, nFacInd) dCollSic = CalcCollisionSafety( tvtNx[2]) local dMachDepth = dFacElev + dCollSic - -- valuto la massima profondità di lavorazione dell'utensile. Se non arriva emetto warning e lavoro fino a dove è possibile. local _, _, dDimMin = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT) local _, sPocketing = VerifyPocket( Proc, dDimMin, dFacElev, nil, sMyMchFind) bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, nPartId, ptPs, tvtNx, nFacInd, sMyMchFind, nUseRoughTool, sPocketing, dMachDepth, nil, nil, bAllWithEndCap)