From bb5b13569403892a8a7fb158d1a347e79512b199 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 10 Feb 2026 15:50:10 +0100 Subject: [PATCH 01/21] - in LapJoint in caso di L derivanete da spezzatura si fa svuotatura anche se non arriva sul fondo --- LuaLibs/ProcessLapJoint.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index f1d9629..ac95151 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -7289,6 +7289,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa if ( dMyTMaxDepth > dFacElev + dCollSic - 10 * GEO.EPS_SMALL or ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic and not bIsU) or ( bIsL and nUseRoughTool == 0) or ( bIsL and Proc.Prc == 20) or + ( bIsL and not bSinglePart) or ( Proc.Prc == 25 and not bIsU and not bIsL)) or ( dCustomMaxElev and dCustomMaxElev > 10 * GEO.EPS_SMALL) then sPocketing = sMyPocketing From 440c739e9c6396530495b99f87d5536e4bf216f0 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 11 Feb 2026 17:08:24 +0100 Subject: [PATCH 02/21] - in LongDoubleCut correzione per casi con Q03=1 --- LuaLibs/ProcessLongDoubleCut.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index 3e7adb8..8ebb9e4 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -1661,6 +1661,11 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster dEndAccDist = 0 end end + if Proc.bMoveAfterSplit then + nC = 1 + dStartDist = Proc.Box:getDimX() - ( dToolDiam / 2 + 5) + dEndDist = - ( dToolDiam / 2 + 5) + end -- ciclo sulle parti local nM = 0 for j = 1, nC do From 5885954f2287f578b5080f3716ac992d7d1c0767 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 12 Feb 2026 12:41:49 +0100 Subject: [PATCH 03/21] =?UTF-8?q?-=20in=20LongDoubleCut=20possibilit=C3=A0?= =?UTF-8?q?=20di=20scegliere=20lavorazione=20in=20discordanza.=20Al=20mome?= =?UTF-8?q?nto=20il=20parametro=20arriva=20da=20Q14=20dalla=20LapJoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLapJoint.lua | 23 +++++++++------- LuaLibs/ProcessLongDoubleCut.lua | 46 +++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 11 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index ac95151..8ec7293 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -150,7 +150,7 @@ local Q_MAX_ELEVATION = '' -- d local Q_SAW_PLUS_CHAIN = '' -- i local Q_FORCE_CHAINSAW = '' -- i local Q_CHAINSAW_FROM_SIDE = '' -- i -local Q_MILL_AS_BLADE_CONVENTIONAL = '' -- i +local Q_CONVENTIONAL_MILLING = '' -- i local Q_CLEAN_CORNER = '' -- 1 local Q_FLOATING_AGGREGATE = '' -- i @@ -201,7 +201,7 @@ local function AssignQIdent( Proc) Q_FORCE_CHAINSAW = 'Q12' -- TODO da riportare a Q13 quando è sistemata la gestione del movimento in macchina nell'attacco laterale Q_CHAINSAW_FROM_SIDE = 'Q999' - Q_MILL_AS_BLADE_CONVENTIONAL = '' + Q_CONVENTIONAL_MILLING = '' Q_CLEAN_CORNER = '' Q_FLOATING_AGGREGATE = '' @@ -209,7 +209,7 @@ local function AssignQIdent( Proc) Q_FORCE_BLADE = 'Q01' -- i Q_DEPTH_CHAMFER = 'Q04' -- d Q_ONLY_CHAMFER = 'Q05' -- i - Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i + Q_CONVENTIONAL_MILLING = 'Q14' -- i elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17 then Q_DEPTH_CHAMFER = 'Q01' -- d Q_ONLY_CHAMFER = 'Q02' -- i @@ -230,7 +230,7 @@ local function AssignQIdent( Proc) Q_BLADE_ON_ALONG_FACE = 'Q04' -- i Q_ANTISPLINT_TYPE = 'Q06' -- i Q_DEPTH_CHAMFER = 'Q07' -- d - Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i + Q_CONVENTIONAL_MILLING = 'Q14' -- i Q_CLEAN_CORNER = 'Q15' -- i Q_FLOATING_AGGREGATE = 'Q16' -- i elseif ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 30 then @@ -239,25 +239,26 @@ local function AssignQIdent( Proc) Q_SIDE_ROUGH_TOOL = 'Q01' -- i Q_CONTOUR_SMALL_TOOL = 'Q02' -- i Q_ANTISPLINT_TYPE = 'Q06' -- i + Q_CONVENTIONAL_MILLING = 'Q14' -- i elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33 then Q_ANTISPLINT_TYPE = 'Q06' -- i - Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i + Q_CONVENTIONAL_MILLING = 'Q14' -- i elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34 then Q_CONTOUR_SMALL_TOOL = 'Q01' -- i Q_USE_MILL = 'Q02' -- i Q_ANTISPLINT_TYPE = 'Q06' -- i elseif ( Proc.Grp == 4) and Proc.Prc == 37 then Q_ANTISPLINT_TYPE = 'Q06' -- i - Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i + Q_CONVENTIONAL_MILLING = 'Q14' -- i elseif ( Proc.Grp == 4) and Proc.Prc == 39 then Q_CONTOUR_SMALL_TOOL = 'Q01' -- i Q_USE_MILL = 'Q02' -- i Q_ANTISPLINT_TYPE = 'Q06' -- i - Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i + Q_CONVENTIONAL_MILLING = 'Q14' -- i elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 90 then Q_ANTISPLINT_TYPE = 'Q03' -- i Q_SIDE_ROUGH_TOOL = 'Q04' -- i - Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i + Q_CONVENTIONAL_MILLING = 'Q14' -- i end -- le altre features gestite non hanno parametri Q end @@ -2886,7 +2887,7 @@ local function MakeByMillAsSaw( Proc, nPhase, nRawId, nPartId, nFacInd, local dOffs = ( i - 1) * dStep if vtN:getZ() < dVzLimDwnUp then dOffs = dOffs + dSawThick end -- forzatura lavorazione discorde in base a parametro Q su feature - local nQ14Param = EgtGetInfo( Proc.Id, Q_MILL_AS_BLADE_CONVENTIONAL, 'd') or 0 + local nQ14Param = EgtGetInfo( Proc.Id, Q_CONVENTIONAL_MILLING, 'd') or 0 local bForceInvert = nQ14Param == 1 or ( nQ14Param == 2 and vtN:getX() < 0.1 and Proc.AffectedFaces.Bottom) if bForceInvert and i == 1 then dStartDist, dEndDist = dEndDist, dStartDist @@ -8335,7 +8336,9 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) -- leggo i parametri Q per utilizzare la fresa di fianco e/o lama local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0 local bUseBlade = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') == 1 - local bOk, sMyWarn, _, AddedIds = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + -- forzatura lavorazione discorde in base a parametro Q su feature + local nQ14Param = EgtGetInfo( Proc.Id, Q_CONVENTIONAL_MILLING, 'd') or 0 + local bOk, sMyWarn, _, AddedIds = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool, nQ14Param) -- se non sono riuscito a farlo di lama, riprovo con la fresa if not bOk and bUseBlade then bUseBlade = false diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index 8ebb9e4..14bcb2b 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -320,7 +320,7 @@ end --------------------------------------------------------------------- -- Applicazione della lavorazione -function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster, nUseSideToolMaster) +function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster, nUseSideToolMaster, nUseConventionalMilling) -- recupero l'ingombro del grezzo di appartenenza local b3Raw = EgtGetRawPartBBox( nRawId) local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD) @@ -1412,6 +1412,28 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- imposto lato di lavoro e inversione EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bIsMachDownUp, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)) EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bSide, true, false)) + + -- si aggiusta la direzione di lavoro in base a rotazione utensile e preferenza utente (nUseConventionalMilling da fuori o Q14) + EgtMdbSetCurrMachining( sMilling) + local bIsCurrentToolCCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0 + if nUseConventionalMilling == nil then + nUseConventionalMilling = EgtGetInfo( Proc.Id, 'Q14', 'd') or 0 + end + local bUseConventionalMilling = false + if nUseConventionalMilling == 1 or ( nUseConventionalMilling == 2 and vtN[vOrd[i]]:getX() < 0.1 and Proc.AffectedFaces.Bottom) then + bUseConventionalMilling = true + end + if bIsCurrentToolCCW ~= bUseConventionalMilling then + local dCurrStartAddLen = EgtGetMachiningParam( MCH_MP.STARTADDLEN) + local dCurrEndAddLen = EgtGetMachiningParam( MCH_MP.ENDADDLEN) + local bCurrInvert = EgtGetMachiningParam( MCH_MP.INVERT) + local nCurrWorkside = EgtGetMachiningParam( MCH_MP.WORKSIDE) + EgtSetMachiningParam( MCH_MP.STARTADDLEN, dCurrEndAddLen) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, dCurrStartAddLen) + EgtSetMachiningParam( MCH_MP.INVERT, not bCurrInvert) + EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( nCurrWorkside == MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)) + end + -- imposto offset radiale (nullo se concavo o di lato) local dOffsR = EgtIf( k < nO, ( nO - k) * dStep, EgtIf( bConvex, - BD.CUT_EXTRA, 0)) if bSide then dOffsR = 0 end @@ -1867,6 +1889,28 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- imposto lato di lavoro e inversione EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bIsMachDownUp, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)) EgtSetMachiningParam( MCH_MP.INVERT, true) + + -- si aggiusta la direzione di lavoro in base a rotazione utensile e preferenza utente (nUseConventionalMilling da fuori o Q14) + EgtMdbSetCurrMachining( sMilling) + local bIsCurrentToolCCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0 + if nUseConventionalMilling == nil then + nUseConventionalMilling = EgtGetInfo( Proc.Id, 'Q14', 'd') or 0 + end + local bUseConventionalMilling = false + if nUseConventionalMilling == 1 or ( nUseConventionalMilling == 2 and vtN[vOrd[i]]:getX() < 0.1 and Proc.AffectedFaces.Bottom) then + bUseConventionalMilling = true + end + if bIsCurrentToolCCW ~= bUseConventionalMilling then + local dCurrStartAddLen = EgtGetMachiningParam( MCH_MP.STARTADDLEN) + local dCurrEndAddLen = EgtGetMachiningParam( MCH_MP.ENDADDLEN) + local bCurrInvert = EgtGetMachiningParam( MCH_MP.INVERT) + local nCurrWorkside = EgtGetMachiningParam( MCH_MP.WORKSIDE) + EgtSetMachiningParam( MCH_MP.STARTADDLEN, dCurrEndAddLen) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, dCurrStartAddLen) + EgtSetMachiningParam( MCH_MP.INVERT, not bCurrInvert) + EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( nCurrWorkside == MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)) + end + -- calcolo la componente dNz non in base alla classificazione della feature (sopra, sotto, fianchi) ma alla componente maggiore -- local dNz = EgtIf( nSide == 0, vtN[vOrd[i]]:getY(), vtN[vOrd[i]]:getZ()) -- local dNz = EgtIf( abs(vtN[vOrd[i]]:getY()) >= abs(vtN[vOrd[i]]:getZ()), vtN[vOrd[i]]:getY(), vtN[vOrd[i]]:getZ()) From 99b77ff1e04e5098a28fc53e87e61c09f54924c7 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 13 Feb 2026 09:22:04 +0100 Subject: [PATCH 04/21] - in headCut e Split corretti smussi con P08 e P09 --- LuaLibs/ProcessHeadCut.lua | 7 +++++++ LuaLibs/ProcessSplit.lua | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/LuaLibs/ProcessHeadCut.lua b/LuaLibs/ProcessHeadCut.lua index d38e615..b6671f4 100644 --- a/LuaLibs/ProcessHeadCut.lua +++ b/LuaLibs/ProcessHeadCut.lua @@ -196,7 +196,11 @@ local function MakeHeadChamfer( idProc, nPartId) EgtSetGridFrame( Frame3d( 0,0,0, GDB_FR.RIGHT)) local dQ09Value = EgtGetInfo( idProc, 'Q09', 'd') + if not dQ09Value then + dQ09Value = 0.1 + end local bChamferedEdge = dQ09Value > 0 + dQ09Value = EgtIf( bChamferedEdge, max( dQ09Value, 0.1), min( dQ09Value, -0.1)) local nIdFirstEntity, nEntityCnt = EgtExplodeCurveCompo( nLoopId) local p3MidPoint = EgtMP( nIdFirstEntity, GDB_ID.GRID) @@ -232,6 +236,9 @@ local function MakeHeadChamfer( idProc, nPartId) end EgtChangeClosedCurveStartPoint( idGeom, p3MidPoint, GDB_RT.GRID) + -- reimposto la griglia + EgtSetGridFrame() + -- Inserisco la lavorazione del lato standard local dExtra = 2 local sName1 = 'HeadCham_' .. ( EgtGetName( idProc) or tostring( idProc)) diff --git a/LuaLibs/ProcessSplit.lua b/LuaLibs/ProcessSplit.lua index 62664c4..3a8792f 100644 --- a/LuaLibs/ProcessSplit.lua +++ b/LuaLibs/ProcessSplit.lua @@ -198,7 +198,13 @@ local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer) EgtSetGridFrame( Frame3d( 0,0,0, GDB_FR.LEFT)) local dQ09Value = EgtGetInfo( idProc, 'Q09', 'd') + if not dQ09Value then + dQ09Value = 0.1 + end local bChamferedEdge = dQ09Value > 0 + dQ09Value = EgtIf( bChamferedEdge, max( dQ09Value, 0.1), min( dQ09Value, -0.1)) + + local nIdFirstEntity, nEntityCnt = EgtExplodeCurveCompo( nLoopId) local p3MidPoint = EgtMP( nIdFirstEntity, GDB_ID.GRID) @@ -234,6 +240,9 @@ local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer) end EgtChangeClosedCurveStartPoint( idGeom, p3MidPoint, GDB_RT.GRID) + -- reimposto la griglia + EgtSetGridFrame() + -- Inserisco la lavorazione del lato standard local dExtra = 2 local sName1 = 'TailCham_' .. ( EgtGetName( idProc) or tostring( idProc)) From 92883040516bbc3381270ad8c238d1fdf4a1cf04 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 16 Feb 2026 09:41:37 +0100 Subject: [PATCH 05/21] - in ProcessDrill per fori fatti con svuotatura in doppio si limita l'affondamento (sarebbe sempre in collisione) e si aggiunge una lavorazione ad hoc, non in doppio, per l'ultimo step --- LuaLibs/BeamExec.lua | 5 +-- LuaLibs/BeamLib.lua | 34 ++++++++++++++++ LuaLibs/ProcessDrill.lua | 85 +++++++++++++++++++++++++++++----------- 3 files changed, 97 insertions(+), 27 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index bb38e0b..b3e60f7 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -1980,10 +1980,7 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw) sDrilling, sType, dMaxDepth = ML.FindDrilling( dDiam, 0, true, false, true) dMachiningDepth = dMaxDepth or dMachiningDepth end - if not sDrilling - or ( sType ~= 'Drill' and ( sType ~= 'Pocket'or ( Proc.Fcs ~= 0 and Proc.Fce ~= 0))) - or not EgtMdbSetCurrMachining( sDrilling) then - + if not sDrilling or not EgtMdbSetCurrMachining( sDrilling) then return end local dDrillingStep = EgtMdbGetCurrMachiningParam( MCH_MP.STEP) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index ee66572..282c3e1 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -1403,5 +1403,39 @@ function BeamLib.GetToolFromMachining( sMachiningName) return Tool end +------------------------------------------------------------------------------------------------------------- +--- copia una tabella lua in modo ricorsivo, ossia mantiene indipendenti anche tutte le sottotabelle +--- ATTENZIONE: in caso di modifiche vanno gestiti anche i tipi custom; sarebbe meglio metterla nel LuaLibs +function BeamLib.TableCopyDeep( OriginalTable) + -- controllo se oggetto passato è valido, altrimenti errore. Non deve mai succedere + if not OriginalTable then + error( "TableCopyDeep : can't copy nil object") + end + local CopiedTable = {} + for key, value in pairs( OriginalTable) do + if type( value) == "table" then + if isBBox3d( value) then + CopiedTable[ key] = BBox3d( value) + elseif isColor3d( value) then + CopiedTable[ key] = Color3d( value) + elseif isFrame3d( value) then + CopiedTable[ key] = Frame3d( value) + elseif isPoint3d( value) then + CopiedTable[ key] = Point3d( value) + elseif isQuaternion( value) then + CopiedTable[ key] = Quaternion( value) + elseif isVector3d( value) then + CopiedTable[ key] = Vector3d( value) + else + CopiedTable[ key] = BeamLib.TableCopyDeep( value) + end + else + CopiedTable[ key] = value + end + end + + return CopiedTable +end + ------------------------------------------------------------------------------------------------------------- return BeamLib \ No newline at end of file diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 198c5a5..484afaa 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -313,6 +313,32 @@ local function GetHoleStartData( ptCen, vtExtr, b3Solid) return nFac, CosB, vFaces end +--------------------------------------------------------------------- +local function GetSCC( Proc, vtExtr, b3Solid, bDrillAngTrasm, nPhase) + local nSCC = MCH_SCC.NONE + + if bDrillAngTrasm then + nSCC = MCH_SCC.ADIR_NEAR + elseif BD.TURN == 2 then + nSCC = MCH_SCC.ADIR_ZP + elseif not BD.C_SIMM and not BD.TURN then + nSCC = MCH_SCC.ADIR_YM + if AreSameVectorApprox( vtExtr, Z_AX()) then + nSCC = MCH_SCC.ADIR_YM + elseif abs( vtExtr:getX()) < 0.1 then + local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000) + local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART) + nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP) + elseif vtExtr:getY() > 0.1 then + nSCC = MCH_SCC.ADIR_YP + end + else + nSCC = MCH_SCC.NONE + end + + return nSCC +end + --------------------------------------------------------------------- -- Applicazione della lavorazione function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) @@ -588,6 +614,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) dDepth = dMaxDepth dMaxElev = dMaxDepth end + -- inserisco la lavorazione local sName = EgtIf( EgtStartsWith( sType, 'Predrill'), 'Predrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMchId = EgtAddMachining( sName, sDrilling) @@ -605,31 +632,21 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert) end -- imposto posizione braccio porta testa - local nSCC = MCH_SCC.NONE - if bDrillAngTrasm then - nSCC = MCH_SCC.ADIR_NEAR - elseif BD.TURN == 2 then - nSCC = MCH_SCC.ADIR_ZP - elseif not BD.C_SIMM and not BD.TURN then - nSCC = MCH_SCC.ADIR_YM - if AreSameVectorApprox( vtExtr, Z_AX()) then - nSCC = MCH_SCC.ADIR_YM - elseif abs( vtExtr:getX()) < 0.1 then - local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000) - local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART) - nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP) - elseif vtExtr:getY() > 0.1 then - nSCC = MCH_SCC.ADIR_YP - end - else - nSCC = MCH_SCC.NONE - end + local nSCC = GetSCC( Proc, vtExtr, b3Solid, bDrillAngTrasm, nPhase) EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- imposto affondamento - if Proc.Double and Proc.Double > 0 and dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then - sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth' - dDepth = Proc.MachDepthDouble - dMaxElev = Proc.MachDepthDouble + local dLastStepDepth + if Proc.Double and Proc.Double > 0 then + if ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then + local dReduceDepth = MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10 + dLastStepDepth = dDepth + dReduceDepth + dDepth = dDepth - dReduceDepth + end + if dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then + sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth' + dDepth = Proc.MachDepthDouble + dMaxElev = Proc.MachDepthDouble + end end EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) -- imposto il valore della distanza di sicurezza per l'attacco. Se il valore del db utensili è troppo basso lo alzo a 10. @@ -676,6 +693,28 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) EgtSetOperationMode( nMchId, false) return false, sWarn else + -- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step + if Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then + local nAddGrpId = BL.GetAddGroup( Proc.PartId) + local idProcLastStep = EgtCopyGlob( Proc.Id, nAddGrpId) + local idAuxIdLastStep = EgtCopyGlob( AuxId, nAddGrpId) + EgtModifyCurveThickness( idAuxIdLastStep, -dLastStepDepth) + local ProcLastStep = BL.TableCopyDeep( Proc) + ProcLastStep.Id = idProcLastStep + ProcLastStep.Flg = 1 + ProcLastStep.Double = 0 + Proc.dCustomMaxElev = MIRROR_DRILLINGS_MIN_DISTANCE + local bOkLastStep, sWarnLastStep = ProcessDrill.Make( ProcLastStep, nPhase, nRawId, nPartId) + if not bOkLastStep then + if sWarn2 then + if not sWarn then sWarn = '' end + sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) + end + sMyWarn = 'Drillpocket double : last step missing;\n' .. ( sMyWarn or sWarn or '') + else + sMyWarn = sWarnLastStep .. '\n' .. ( sMyWarn or sWarn or '') + end + end return true, ( sMyWarn or sWarn) end end From 394fb2194f3a27d47c541ed1aa323ad74cee00de Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 16 Feb 2026 12:10:46 +0100 Subject: [PATCH 06/21] - in ProcessDrilling correzioni e migliorie alla lavorazione ultimo step di fori svuotati in doppio --- LuaLibs/ProcessDrill.lua | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 484afaa..1422d55 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -638,7 +638,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) local dLastStepDepth if Proc.Double and Proc.Double > 0 then if ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then - local dReduceDepth = MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10 + local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10 dLastStepDepth = dDepth + dReduceDepth dDepth = dDepth - dReduceDepth end @@ -658,8 +658,16 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) -- aggiungo alle note massima elevazione (coincide con affondamento) - if dMaxElev then - sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1)) + local dCustomMaxElev + if Proc.dCustomMaxElev and type( Proc.dCustomMaxElev) == "number" and Proc.dCustomMaxElev > 10 * GEO.EPS_SMALL then + dCustomMaxElev = Proc.dCustomMaxElev + end + if dMaxElev or dCustomMaxElev then + if dCustomMaxElev then + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dCustomMaxElev, 1)) + else + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1)) + end end -- se foro passante, aggiungo questa qualifica alle note if ( sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill') and bOpen then @@ -685,7 +693,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) end if not bOk then local _, sErr = EgtGetLastMachMgrError() - EgtSetOperationMode( nMchId, false) + EgtSetOperationMode( nMchId, false) return false, sErr else local _, sWarn = EgtGetMachMgrWarning( 0) @@ -703,16 +711,15 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) ProcLastStep.Id = idProcLastStep ProcLastStep.Flg = 1 ProcLastStep.Double = 0 - Proc.dCustomMaxElev = MIRROR_DRILLINGS_MIN_DISTANCE + ProcLastStep.dCustomMaxElev = dDepth local bOkLastStep, sWarnLastStep = ProcessDrill.Make( ProcLastStep, nPhase, nRawId, nPartId) if not bOkLastStep then - if sWarn2 then - if not sWarn then sWarn = '' end - sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) - end - sMyWarn = 'Drillpocket double : last step missing;\n' .. ( sMyWarn or sWarn or '') - else - sMyWarn = sWarnLastStep .. '\n' .. ( sMyWarn or sWarn or '') + sWarnLastStep = 'Drillpocket double : incomplete, last step missing' + end + local sPreviousWarn = sMyWarn or sWarn + if sWarnLastStep then + if not sPreviousWarn then sPreviousWarn = '' end + sMyWarn = EgtIf( #sPreviousWarn > 0, sPreviousWarn .. '\n' .. sWarnLastStep, sWarnLastStep) end end return true, ( sMyWarn or sWarn) From 51a8ad95b23f7bd64e44f40a67834b9d5231e5af Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 16 Feb 2026 13:27:35 +0100 Subject: [PATCH 07/21] - in ProcessDrill correzione in LastStep --- LuaLibs/ProcessDrill.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 1422d55..adaf08c 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -711,7 +711,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) ProcLastStep.Id = idProcLastStep ProcLastStep.Flg = 1 ProcLastStep.Double = 0 - ProcLastStep.dCustomMaxElev = dDepth + ProcLastStep.dCustomMaxElev = dLastStepDepth - dDepth local bOkLastStep, sWarnLastStep = ProcessDrill.Make( ProcLastStep, nPhase, nRawId, nPartId) if not bOkLastStep then sWarnLastStep = 'Drillpocket double : incomplete, last step missing' From bedb274c0f6805b7b750a8848dc1d9f6c1cbdfe7 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 17 Feb 2026 10:27:55 +0100 Subject: [PATCH 08/21] - In ProcessLapJoint, Aggiunto 'OpenPocket_H2' come controllo per SpiralIn --- LuaLibs/ProcessLapJoint.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 8ec7293..09c271b 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3564,7 +3564,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin end EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- se tasca aperta e non lavorata col truciolatore, imposto opportuno attacco - if sMchFind == 'OpenPocket' and nUseRoughTool == 0 then + if ( sMchFind == 'OpenPocket' or sMchFind == 'OpenPocket_H2') and nUseRoughTool == 0 then EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN) end if sMchFind == 'OpenPocket' and dDiamTool < 90 then From 3a5338c29b28f8fb96033912536f67d5e49d0be1 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 18 Feb 2026 18:40:07 +0100 Subject: [PATCH 09/21] - migliorati commenti in LapJoint --- LuaLibs/ProcessLapJoint.lua | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 8ec7293..1ef0bbf 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -6651,7 +6651,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end -- eventuale forzatura sega a catena local bForceChainsaw = ( EgtGetInfo( Proc.Id, Q_FORCE_CHAINSAW, 'i') or 0) > 0 - -- se è un tunnel provo a vedere se è possibile lavorarlo con la svuotatura o con la sega catena + + -- TUNNEL: svuotatura o sega a catena if bClosedOrthoFaces then local bTryWithBlades = true local dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace @@ -6741,7 +6742,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end end end - -- altrimenti non è una fessura + + -- NO TUNNEL: tutti gli altri casi else -- dati della faccia local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT) @@ -6777,6 +6779,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa if bPrevBhSideMill == nil then bPrevBhSideMill = bMakeBySideMill end + + -- SIDEMILL (tipo BLOCKHAUS) if bMakeBySideMill then -- se smusso non è esclusivo if nChamfer < 2 then @@ -6911,7 +6915,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end end end - -- altrimenti lavoro con svuotatura + + -- TASCA GENERICA: si cerca il modo migliore di lavorare in base alla forma else local bSpecial3faces = false -- verifico se lavorando la faccia principale rimane esclusa molta sezione trasversale complessiva della feature (da box) @@ -6941,7 +6946,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end end - -- se posso in effetti fare fresatura con aggregato flottante + -- FRESATURA SPECIALE CON AGGREGATO FLOTTANTE if bPocketFloatingAggregate then -- inserisco la lavorazione di svuotatura local sName = 'Float_Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) @@ -6964,7 +6969,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa -- imposto uso faccia local nFaceUse = BL.GetNearestParalOpposite( vtN) EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse) - -- piccolo offser radiale per essere sicuri di lavorare anche con tasca larga come diametro fresa + -- piccolo offset radiale per essere sicuri di lavorare anche con tasca larga come diametro fresa EgtSetMachiningParam( MCH_MP.OFFSR, -0.01) -- imposto posizione braccio porta testa @@ -6989,7 +6994,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa return false, sErr end - -- se riconosciuta gestione 3 facce (limitatamente per ora alla feature 20) + -- CASO SPECIALE 3 FACCE (se rimane esclusa molta sezione trasversale complessiva della feature, solo per feature 20) elseif bSpecial3faces and Proc.Prc == 20 then -- se smusso non è esclusivo if nChamfer < 2 then @@ -7115,7 +7120,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa if not bOk then return false, sWarn end end end - -- altrimenti lavorazione di svuotatura o contornatura + + -- SVUOTATURA O FRESATURA: si valuta se si può fare svuotatura o se provare altro else local bUseOtherFace local bLapJointAngTrasm = false @@ -7273,7 +7279,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa EgtErase( nSurfPartId) end end - -- ricerca lavorazione + + -- ricerca lavorazione di svuotatura local sPocketing local _, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillUp, bMillDown) if not sMyPocketing and bMillUp then @@ -7320,7 +7327,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local nQAntisplintResult = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') or 0 -- se lavorazione fresa come lama disabilito eventuale antischeggia if bSpecialMillOnSide then nQAntisplintResult = 0 end - -- se non trovata una svuotatura adatta + + -- NO SVUOTATURA (si deve provare altro) if not sPocketing then -- se forma a L provo con contornatura if bIsL and not bSpecialMillOnSide and not bForceSideMill then @@ -7666,6 +7674,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end end end + + -- SVUOTATURA OK else -- se devo inserire il chamfer if ( ( Proc.Fct == 3 and bIsU) or (Proc.Fct == 2 and bIsL)) and nChamfer > 0 then From 993a0228949dedcea07d80bab1d0cf6582f40c8a Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Thu, 19 Feb 2026 15:55:36 +0100 Subject: [PATCH 10/21] In LapJoint aggiunta gestione lato aperto in feature lunghe spezzate --- LuaLibs/ProcessLapJoint.lua | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 81935ed..1a15e11 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3537,7 +3537,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin return false, sErr end -- aggiungo geometria - EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef)}}) + if Proc.LoopIdFacInd then + EgtSetMachiningGeometry( { Proc.LoopIdFacInd}) + else + EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef)}}) + end -- imposto uso faccia EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT) -- imposto posizione braccio porta testa @@ -7235,6 +7239,11 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa nUseRoughTool = 1 end end + -- se presente curva da lavorare con lato aperto + if Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1 then + sMchFind = 'OpenPocket' + nUseRoughTool = 0 + end -- se abilitato rinvio da sotto if bLapJointAngTrasm then if not EgtEndsWith( sMchFind, '_AT') then @@ -8007,9 +8016,27 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead) local bPrevBhSideMill for i = 1, #vAddId do local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD) - local nFct = EgtSurfTmFacetCount( vAddId[i]) + local nFct = EgtSurfTmFacetCount( vAddId[i]) local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces, OkFromBottom = Proc.OkFromBottom} Topology.Classify( AddProc, b3Raw) + + + if i > 1 and + ( ( Proc.Topology == 'Groove' and Proc.IsThrough and Proc.Fct == 3 and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right) + or ( Proc.Topology == 'Groove' and Proc.Fct == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)) + or Proc.Topology == 'Pocket') then + local nFacInd = BL.GetFaceWithMostAdj( AddProc, nPartId) + if type( nFacInd) == "number" and nFacInd >= 0 then + local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( vAddId[i], nFacInd, nAddGrpId) + if nLoopId and nLoopCnt == 1 then + local nEdgeId = BL.GetEdgeToMachineFromVector( vAddId[i], nFacInd, -X_AX()) + EgtSetInfo( nLoopId, 'OPEN', nEdgeId) + AddProc.LoopIdFacInd = nLoopId + end + end + end + + -- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil) local bOk, sMyWarn bOk, sMyWarn, bPrevBhSideMill = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId, dOvmHead, bAllWithEndCap, bPrevBhSideMill, bAllWithEndCap) From f52bf933a15c03d6e2c19caf56c23e58ebc9255c Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Thu, 19 Feb 2026 16:54:15 +0100 Subject: [PATCH 11/21] Aggiornamento Versione minima Cam5 --- Version.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version.lua b/Version.lua index 8f921ab..9cc5dfb 100644 --- a/Version.lua +++ b/Version.lua @@ -3,4 +3,4 @@ NAME = 'Beam' VERSION = '3.1a1' -MIN_EXE = '2.7f2' +MIN_EXE = '3.1a4' From 2c3aaf01dcb33a79c3777a8179c67a9c6c448b57 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Fri, 20 Feb 2026 10:02:34 +0100 Subject: [PATCH 12/21] In ProcessLapJoint : - Eliminata forzatura ZigZag per tasche strette e utensili < 90 - Forzato OpenOutRaw se ce l'apertura sulla curva --- LuaLibs/ProcessLapJoint.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 1a15e11..128ad47 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3575,8 +3575,6 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFaceRef, GDB_ID.ROOT) local bL = ( Proc.Fct < 4 or TestElleShape4( Proc) == 2) if bL and min( dH, dV) < 1.5 * dDiamTool then - EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.ZIGZAG) - EgtSetMachiningParam( MCH_MP.INVERT, false) if not bTipMill then EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX) EgtSetMachiningParam( MCH_MP.LITANG, dDiamTool) @@ -3601,7 +3599,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1)) sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) - if bOpenOutRaw then + if bOpenOutRaw or ( Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1) then sUserNotes = EgtSetValInNotes( sUserNotes, 'OpenOutRaw', 1) end EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) From 102bdc8018c1e0157356678860d9e46e4ec892cc Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 20 Feb 2026 12:00:52 +0100 Subject: [PATCH 13/21] - in FreeContoru.MakeByMill aggiunto Q10 per forzare MaxElev (come in LapJoint) --- LuaLibs/ProcessFreeContour.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index ea0a8c7..9309fc7 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -34,6 +34,7 @@ local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket local Q_IGNORE_LASER_PROBLEMS = 'Q07' local Q_FORCE_CLAMPABLE_AREA = 'Q08' local Q_INVERT_LAST_PATH = 'Q09' +local Q_MAX_ELEVATION = 'Q10' -- d --------------------------------------------------------------------- -- Riconoscimento della feature @@ -631,6 +632,14 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) EgtOutLog( sErr) return false, sErr end + -- eventuale elevazione forzata + local dCustomMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd') + if dCustomMaxElev and dCustomMaxElev < 1 then dCustomMaxElev = nil end + if dCustomMaxElev then + local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dCustomMaxElev, 1)) + EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) + end -- assegno affondamento EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) end From 67fa66cf4f878dbc59acdc68ef6e2cae1d7e414b Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 20 Feb 2026 12:28:25 +0100 Subject: [PATCH 14/21] - in LapJoint sistemati commenti --- LuaLibs/ProcessLapJoint.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 128ad47..b995872 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3536,7 +3536,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin EgtOutLog( sErr) return false, sErr end - -- aggiungo geometria + -- aggiungo geometria (se presente curva si lavora quella) if Proc.LoopIdFacInd then EgtSetMachiningGeometry( { Proc.LoopIdFacInd}) else @@ -8014,12 +8014,11 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead) local bPrevBhSideMill for i = 1, #vAddId do local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD) - local nFct = EgtSurfTmFacetCount( vAddId[i]) + local nFct = EgtSurfTmFacetCount( vAddId[i]) local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces, OkFromBottom = Proc.OkFromBottom} Topology.Classify( AddProc, b3Raw) - - - if i > 1 and + -- con specifiche topologie si lavora la curva e si forza il lato aperto dove finisce la lavorazione precedente + if i > 1 and ( ( Proc.Topology == 'Groove' and Proc.IsThrough and Proc.Fct == 3 and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right) or ( Proc.Topology == 'Groove' and Proc.Fct == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)) or Proc.Topology == 'Pocket') then @@ -8033,8 +8032,6 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead) end end end - - -- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil) local bOk, sMyWarn bOk, sMyWarn, bPrevBhSideMill = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId, dOvmHead, bAllWithEndCap, bPrevBhSideMill, bAllWithEndCap) From 468fb5debc3814e330928deb74b0af6aa38bb223 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Fri, 20 Feb 2026 14:33:46 +0100 Subject: [PATCH 15/21] In DtMortaise, migliorato ingresso/uscita in caso di mortasa con svuotatura --- LuaLibs/ProcessDtMortise.lua | 38 +++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/LuaLibs/ProcessDtMortise.lua b/LuaLibs/ProcessDtMortise.lua index f46e00b..8dd4887 100644 --- a/LuaLibs/ProcessDtMortise.lua +++ b/LuaLibs/ProcessDtMortise.lua @@ -638,20 +638,44 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- sistemo il lato e la direzione di lavoro EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT)) EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, false, true)) + local ptS = EgtSP( AuxId, GDB_ID.ROOT) + local ptE = EgtEP( AuxId, GDB_ID.ROOT) -- in presenza di pocket imposto dati ingresso e uscita if bPocket then + -- recupero il contorno della tasca (seconda curva ausiliaria) + local vAuxId = EgtGetInfo( Proc.Id, 'AUXID', 'vi') + -- si prende il centro del percorso da svuotare ( non si controlla che sia presente perchè già verificata in precedenza) + local ptPocketCenter = EgtGP( Proc.Id + vAuxId[2], GDB_ID.ROOT) + -- calcolo componente tangente e lineare di ingresso + local vtS = EgtSV( Proc.Id + vAuxId[1], GDB_ID.ROOT) -- vettore entrante percorso + local vtOffS = EgtSV( Proc.Id + vAuxId[1], GDB_ID.ROOT) ; vtOffS:rotate( vtExtr, 90) -- vettore da punto iniziale a centro utensile + local vtStartToCenter = ptPocketCenter - ( ptS + ( vtOffS * ( dToolDiam/2))) -- vettore da centro utensilenel punto iniziale e centro del percorso da svuotare + local dLenStartToCenter = vtStartToCenter:len() -- distanza da centro utensile a centro del percorso da svuotare + local dStartTangComp = abs( vtStartToCenter * vtS) -- prodotto scalare tra vettore entrante e vettore tra centro utensilee percordo da svuotare (componente tangente) + local dStartPerpComp = sqrt( dLenStartToCenter^2 - dStartTangComp^2) -- pitagora tra componente tangente e la lunghezza tra i due centri + -- calcolo componente tangente e lineare di uscita + local vtE = EgtEV( Proc.Id + vAuxId[1], GDB_ID.ROOT) + local vtOffE = EgtEV( Proc.Id + vAuxId[1], GDB_ID.ROOT) ; vtOffE:rotate( vtExtr, 90) + local vtEndToCenter = ptPocketCenter - ( ptE + ( vtOffE * ( dToolDiam/2))) + local dLenEndToCenter = vtEndToCenter:len() + local dEndTangComp = abs( vtEndToCenter * vtE) + local dEndPerpComp = sqrt( dLenEndToCenter^2 - dEndTangComp^2) + EgtSetMachiningParam( MCH_MP.STARTPOS, 5) EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT) - EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI) - EgtSetMachiningParam( MCH_MP.STARTADDLEN, 5) - EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) - EgtSetMachiningParam( MCH_MP.LITANG, dToolDiam / 2) - EgtSetMachiningParam( MCH_MP.LIPERP, 5) + EgtSetMachiningParam( MCH_MP.LITANG, dStartTangComp) + EgtSetMachiningParam( MCH_MP.LIPERP, dStartPerpComp) EgtSetMachiningParam( MCH_MP.LIELEV, 0) + + EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.TANGENT) + EgtSetMachiningParam( MCH_MP.LOTANG, dEndTangComp) + EgtSetMachiningParam( MCH_MP.LOPERP, dEndPerpComp) + EgtSetMachiningParam( MCH_MP.LOELEV, 0) + + EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) -- altrimenti verifico se sono bilanciati ingresso e uscita, per evitare inizio o fine nel legno else - local ptS = EgtSP( AuxId, GDB_ID.ROOT) - local ptE = EgtEP( AuxId, GDB_ID.ROOT) local dDistS = abs( ( ptS - rfDtMrt:getOrigin()) * rfDtMrt:getVersX()) local dDistE = abs( ( ptE - rfDtMrt:getOrigin()) * rfDtMrt:getVersX()) local dIni, dFin = EgtCurveDomain( AuxId) From eb1878c17cb7366e273333abf0259c7a1f60c9c6 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 24 Feb 2026 09:20:13 +0100 Subject: [PATCH 16/21] Definizione Parametro Q04=1 per esecuzione del solo contorno di un foro NON passante --- LuaLibs/BeamExec.lua | 12 ++++++++++-- LuaLibs/ProcessFreeContour.lua | 22 +++++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index b3e60f7..014afc2 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -164,6 +164,9 @@ EgtOutLog( ' BeamExec started', 1) EgtMdbSetGeneralParam( MCH_GP.MAXDEPTHSAFE, BD.COLL_SIC) EgtMdbSave() +-- variabili assegnazione parametri Q +local Q_ONLY_CONTOUR = 'Q04' -- i + ------------------------------------------------------------------------------------------------------------- local function IsHeadFeature( Proc, b3Raw, dCurrOvmH) -- feature sempre di testa o coda per il gruppo @@ -1507,8 +1510,13 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN bOk, sErr = Chamfer.Make( Proc, nPhase, nRawId, nPartId) -- se foratura ( 3/4-040-X) elseif Drill.Identify( Proc) then - -- esecuzione foratura - bOk, sErr = Drill.Make( Proc, nPhase, nRawId, nPartId) + -- Se impostata Q04 = 1 forza la contornatura + if ( EgtGetInfo( Proc.Id, Q_ONLY_CONTOUR, 'i') == 1) then + bOk, sErr = FreeContour.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) + else + -- esecuzione foratura + bOk, sErr = Drill.Make( Proc, nPhase, nRawId, nPartId) + end -- se giunzione francese ( 1/2-035-X) elseif FrenchRidgeLap.Identify( Proc) then -- esecuzione giunzione francese diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index 9309fc7..2ad22f0 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -29,6 +29,7 @@ local ML = require( 'MachiningLib') local Q_DIM_STRIP = 'Q01' -- d local Q_DEPTH_CHAMFER = 'Q02' -- d local Q_OVERMAT_FOR_FINISH = 'Q03' -- d +local Q_ONLY_CONTOUR = 'Q04' -- i, valido solo per drill local Q_ONLY_CHAMFER = 'Q00' -- i local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket local Q_IGNORE_LASER_PROBLEMS = 'Q07' @@ -135,7 +136,7 @@ function ProcessFreeContour.Classify( Proc, b3Raw) end --------------------------------------------------------------------- -local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead) +local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead, bContourFromDrill) local nChamfer = 0 -- ingombro del grezzo local b3Raw = EgtGetRawPartBBox( nRawId) @@ -186,6 +187,10 @@ local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead) return -1, 0, sErr end end + if bContourFromDrill then + nChamfer = 0 + dDepth = 0 + end return nChamfer, dDepth, sMilling end @@ -236,6 +241,7 @@ end local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- recupero l'ingombro del grezzo di appartenenza local b3Raw = EgtGetRawPartBBox( nRawId) + local bContourFromDrill = EgtGetInfo( Proc.Id, Q_ONLY_CONTOUR, 'i') == 1 -- ingombro del pezzo local Ls = EgtGetFirstNameInGroup( nPartId, 'Box') local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD) @@ -260,7 +266,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- verifico se in testa o coda local bHead = Proc.Head -- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva - local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true) + local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true, nil, bContourFromDrill) -- recupero la lavorazione local bTopHead = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.1) local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1) @@ -672,7 +678,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) end -- assegno lato di lavoro - if Proc.Grp == 0 then + if bContourFromDrill then + dWorkSide = MCH_MILL_WS.LEFT + elseif Proc.Grp == 0 then dWorkSide = MCH_MILL_WS.CENTER 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 dWorkSide = MCH_MILL_WS.LEFT @@ -704,6 +712,14 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToolInvert) EgtSetMachiningParam( MCH_MP.INVERT, bInvert) EgtSetMachiningParam( MCH_MP.WORKSIDE, dWorkSide) + -- setto valori specifici se lavorazione nel pieno del solo contorno di un foro + if bContourFromDrill and ( dDepthWork / (nStep + 1) > dToolDiam ) then + local dWorkStep = dDepthWork / ( dDepthWork / dToolDiam) + EgtSetMachiningParam( MCH_MP.STEP, dWorkStep) + EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.GLIDE) + EgtSetMachiningParam( MCH_MP.LIELEV, dWorkStep) + EgtSetMachiningParam( MCH_MP.LITANG, dWorkStep) + end -- posizione braccio porta testa From ae31898e05a92eb17586bc1dd429bfc69b5f90f8 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 24 Feb 2026 12:02:43 +0100 Subject: [PATCH 17/21] =?UTF-8?q?-=20Spostamento=20del=20richiamo=20all'in?= =?UTF-8?q?terno=20della=20Drill.Make=20-=20Piccole=20modifiche=20alla=20g?= =?UTF-8?q?estione=20-=20Step=20diventa=20il=2075%=20del=20teorico=20o=20s?= =?UTF-8?q?e=20pi=C3=B9=20piccolo,=20il=20diametro=20utensile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BeamExec.lua | 12 ++---------- LuaLibs/ProcessDrill.lua | 11 +++++++++-- LuaLibs/ProcessFreeContour.lua | 18 ++++++++++-------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 014afc2..a095279 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -164,9 +164,6 @@ EgtOutLog( ' BeamExec started', 1) EgtMdbSetGeneralParam( MCH_GP.MAXDEPTHSAFE, BD.COLL_SIC) EgtMdbSave() --- variabili assegnazione parametri Q -local Q_ONLY_CONTOUR = 'Q04' -- i - ------------------------------------------------------------------------------------------------------------- local function IsHeadFeature( Proc, b3Raw, dCurrOvmH) -- feature sempre di testa o coda per il gruppo @@ -1510,13 +1507,8 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN bOk, sErr = Chamfer.Make( Proc, nPhase, nRawId, nPartId) -- se foratura ( 3/4-040-X) elseif Drill.Identify( Proc) then - -- Se impostata Q04 = 1 forza la contornatura - if ( EgtGetInfo( Proc.Id, Q_ONLY_CONTOUR, 'i') == 1) then - bOk, sErr = FreeContour.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) - else - -- esecuzione foratura - bOk, sErr = Drill.Make( Proc, nPhase, nRawId, nPartId) - end + -- esecuzione foratura + bOk, sErr = Drill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- se giunzione francese ( 1/2-035-X) elseif FrenchRidgeLap.Identify( Proc) then -- esecuzione giunzione francese diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index adaf08c..49fa2b9 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -134,7 +134,8 @@ function ProcessDrill.Split( Proc, b3Raw) 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 + local bOnlyContour = ( EgtGetInfo( Proc.Id, 'Q04', 'i') == 1) + if ( not bTrySplit) or bOnlyContour then return false end -- restituisco se va fatto in doppio (solo fori orizzontali) @@ -341,7 +342,13 @@ end --------------------------------------------------------------------- -- Applicazione della lavorazione -function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) +function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) + -- Se forzato contorno foro forzo richiamo a FreeContour e uscita dalla funzione + if EgtGetInfo( Proc.Id, 'Q04', 'i') == 1 then + _G.package.loaded.ProcessFreeContour = nil + local FreeContour = require( 'ProcessFreeContour') + return FreeContour.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) + end -- default per costanti BD.DRILL_VX_MAX_ANGLEDRILL = ( BD.DRILL_VX_MAX_ANGLEDRILL or 0.928) -- ingombro del pezzo diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index 2ad22f0..9888a57 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -136,7 +136,7 @@ function ProcessFreeContour.Classify( Proc, b3Raw) end --------------------------------------------------------------------- -local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead, bContourFromDrill) +local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead) local nChamfer = 0 -- ingombro del grezzo local b3Raw = EgtGetRawPartBBox( nRawId) @@ -186,10 +186,8 @@ local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead, bCo EgtOutLog( sErr) return -1, 0, sErr end - end - if bContourFromDrill then - nChamfer = 0 - dDepth = 0 + else + sMilling = '' end return nChamfer, dDepth, sMilling @@ -266,7 +264,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- verifico se in testa o coda local bHead = Proc.Head -- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva - local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true, nil, bContourFromDrill) + local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true, nil) -- recupero la lavorazione local bTopHead = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.1) local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1) @@ -713,8 +711,8 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) EgtSetMachiningParam( MCH_MP.INVERT, bInvert) EgtSetMachiningParam( MCH_MP.WORKSIDE, dWorkSide) -- setto valori specifici se lavorazione nel pieno del solo contorno di un foro - if bContourFromDrill and ( dDepthWork / (nStep + 1) > dToolDiam ) then - local dWorkStep = dDepthWork / ( dDepthWork / dToolDiam) + if bContourFromDrill then + local dWorkStep = max( ( EgtGetMachiningParam( MCH_MP.STEP) or 0) * 0.75, dToolDiam) EgtSetMachiningParam( MCH_MP.STEP, dWorkStep) EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.GLIDE) EgtSetMachiningParam( MCH_MP.LIELEV, dWorkStep) @@ -1020,6 +1018,10 @@ function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) Q_DEPTH_CHAMFER = 'Q01' Q_DIM_STRIP = 'Q02' end + if Proc.Prc == 40 then + Q_DIM_STRIP = '' + Q_OVERMAT_FOR_FINISH = '' + end -- recupero la tipologia local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1) -- se svuotatura From ce05aed8c90f408c349e923dfc5c0b7026b002d8 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Wed, 25 Feb 2026 15:14:52 +0100 Subject: [PATCH 18/21] LapJoint, Features lunghe spezzate, forzato parametro invert=false se tasca larga come l'utensile (solo 1 passata senza ritorno all'esterno del pezzo) --- LuaLibs/ProcessLapJoint.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index b995872..3d7ad1d 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3575,6 +3575,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFaceRef, GDB_ID.ROOT) local bL = ( Proc.Fct < 4 or TestElleShape4( Proc) == 2) if bL and min( dH, dV) < 1.5 * dDiamTool then + EgtSetMachiningParam( MCH_MP.INVERT, false) if not bTipMill then EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX) EgtSetMachiningParam( MCH_MP.LITANG, dDiamTool) @@ -3599,7 +3600,16 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1)) sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) - if bOpenOutRaw or ( Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1) then + -- Se forzato lato aperto lavorazione da curva forzo OpenOutRaw + if( Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1) then + local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFaceRef, GDB_ID.ROOT) + -- Se larghezza tasca uguale a larghezza utensile non permetto Invert + if abs( min( dH, dV) - dDiamTool) < 50 * GEO.EPS_SMALL then + EgtSetMachiningParam( MCH_MP.INVERT, false) + end + bOpenOutRaw = true + end + if bOpenOutRaw then sUserNotes = EgtSetValInNotes( sUserNotes, 'OpenOutRaw', 1) end EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) From b150b5387d73082d6f8904a270b115a1cabbb487 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 25 Feb 2026 18:34:59 +0100 Subject: [PATCH 19/21] - in Long2Cut correzione al LeadIn/Out --- LuaLibs/ProcessLongDoubleCut.lua | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index 14bcb2b..08fbdd2 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -1277,26 +1277,28 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster local dLimitAngle = -0.5 - 20 * GEO.EPS_SMALL -- se facce ortogonali (concave), mantengo la lavorazione di testa sulla faccia più grande purchè non superi di 30 gradi il sottosquadra if bOrtho then - if vtN[vOrd[1]]:getZ() > 0.001 and vtN[vOrd[2]]:getZ() > 0.001 then - if vtN[vOrd[1]]:getZ() >= vtN[vOrd[2]]:getZ() then + local vtN1 = vtN[vOrd[1]] + local vtN2 = vtN[vOrd[2]] + if vtN1:getZ() > 0.001 and vtN2:getZ() > 0.001 then + if vtN1:getZ() >= vtN2:getZ() then nFin = 1 else nIni = 2 end else - if vtN[vOrd[1]]:getZ() < dLimitAngle then + if vtN1:getZ() < dLimitAngle then nIni = 2 - elseif vtN[vOrd[2]]:getZ() < dLimitAngle then + elseif vtN2:getZ() < dLimitAngle then nFin = 1 else - if vtN[vOrd[1]]:getZ() >= vtN[vOrd[2]]:getZ() then - if vtN[vOrd[1]]:getZ() < dLimitAngle then + if vtN1:getZ() >= vtN2:getZ() then + if vtN1:getZ() < dLimitAngle then nIni = 2 else nFin = 1 end else - if vtN[vOrd[1]]:getZ() < dLimitAngle then + if vtN1:getZ() < dLimitAngle then nIni = 2 else nFin = 1 @@ -1390,18 +1392,19 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster EgtOutLog( sErr) return false, sErr end + local dMySal, dMyEal = dSal, dEal if bFacesSwapped then - dSal, dEal = dEal, dSal + dMySal, dMyEal = dMyEal, dMySal end -- aggiungo geometria EgtSetMachiningGeometry( {{ Proc.Id, tFaceLong[vOrd[i]]}}) -- limito opportunamente la lavorazione if ( nSide == -1 and BD.DOWN_HEAD) then - EgtSetMachiningParam( MCH_MP.STARTADDLEN, dEal) - EgtSetMachiningParam( MCH_MP.ENDADDLEN, dSal) + EgtSetMachiningParam( MCH_MP.STARTADDLEN, dMyEal) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, dMySal) else - EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal) - EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal) + EgtSetMachiningParam( MCH_MP.STARTADDLEN, dMySal) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, dMyEal) end -- imposto posizione braccio porta testa per non ingombrare agli estremi EgtSetMachiningParam( MCH_MP.SCC, nSCC) From 57833ebad9a440a3868c88d5941762734c28cf1c Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 26 Feb 2026 11:34:41 +0100 Subject: [PATCH 20/21] - in ProcessDrill se foratura in doppio si aggiunge la nota LastStep per garantire che non ci siano collisioni tra le punte e prevenire extracorsa --- LuaLibs/ProcessDrill.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 49fa2b9..624bdc6 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -632,6 +632,8 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- aggiungo geometria EgtSetMachiningGeometry( {{ AuxId, -1}}) + -- eventuali note utente + local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' -- eventuale inversione if sType == 'Drill' or sType == 'Drill_H2' or sType == 'Drill_AT' or sType == 'AngleDrill' or sType == 'Predrill' then EgtSetMachiningParam( MCH_MP.INVERT, bToInvert) @@ -644,10 +646,14 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- imposto affondamento local dLastStepDepth if Proc.Double and Proc.Double > 0 then - if ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then - local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10 - dLastStepDepth = dDepth + dReduceDepth - dDepth = dDepth - dReduceDepth + if ( sType == 'Pocket_AT' or sType == 'Pocket') then + if bOpen then + local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10 + dLastStepDepth = dDepth + dReduceDepth + dDepth = dDepth - dReduceDepth + end + else + sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15) end if dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth' @@ -661,8 +667,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local dMinStartPos = 10 local dStartPos = max( dMinStartPos, dToolDbStartPos) EgtSetMachiningParam( MCH_MP.STARTPOS, dStartPos) - -- Note utente con dichiarazione nessuna generazione sfridi per Vmill - local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' + -- dichiarazione nessuna generazione sfridi per Vmill sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) -- aggiungo alle note massima elevazione (coincide con affondamento) local dCustomMaxElev From f0196334666d8754d4373bef1cc7d7dcb50c9a2b Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 26 Feb 2026 12:49:17 +0100 Subject: [PATCH 21/21] update version e log --- UpdateLog.txt | 11 +++++++++++ Version.lua | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index e8e06e1..d52e489 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,16 @@ ==== Beam Update Log ==== +Versione 3.1b1 (26/02/2026) +- Added : in LapJoint lunghe gestito Q14 per lavorare discorde +- Added : in forature ora sono possibili le DrillPocket in doppio (ultimo step fatto dalla testa principale) +- Added : in FreeContour (contornatura) aggiunta Q10 per forzare massima elevazione +- Modif : in LongDoubleCut e LapJoint lunghe migliorata la scelta della faccia da lavorare e altre migliorie +- Modif : in LapJoint migliorie alle svuotature +- Modif : in LapJoint lunghe, negli spezzoni successivi al primo, le svuotature considerano l'area svuotata precedente +- Fixed : in forature in doppio si garantisce l'ultimo step per evitare collisioni delle punte o finecorsa +- Fixed : in mortasa a coda di rondine tagliata corretti ingresso uscita in caso di svuotatura +- Fixed : in tagli di testa e coda corretti smussi con P08 e P09 + Versione 2.7l3 (23/12/2025) - Modif : nei fori che attraversano un taglio si decide la precedenza in base all'angolo tra foro e taglio stesso - Fixed : corretto precut in caso di sega a catena diff --git a/Version.lua b/Version.lua index 9cc5dfb..604b3d1 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '3.1a1' -MIN_EXE = '3.1a4' +VERSION = '3.1b1' +MIN_EXE = '3.1b1'