From 6ae1e94cd56ab736573e245a86fc003661a9276c Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Thu, 19 Mar 2026 17:13:43 +0100 Subject: [PATCH 1/7] In LapJoint - FacesBySaw, nelle Slot di testa con forma a U, forzata lavorazione concorde a discapito della direzione (da sotto a sopra o viceversa) --- LuaLibs/FacesBySaw.lua | 4 ++-- LuaLibs/ProcessLapJoint.lua | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/LuaLibs/FacesBySaw.lua b/LuaLibs/FacesBySaw.lua index 470df36..c3008a9 100644 --- a/LuaLibs/FacesBySaw.lua +++ b/LuaLibs/FacesBySaw.lua @@ -231,7 +231,7 @@ local function GetEdgeToMachineFromVector( nSurfId, nFacet, vtOrthO) end --------------------------------------------------------------------- -function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert, bMaximizeVerticalDepth, bSpecialTangentLeadInOut, sLeadInOutType, Par5Alternative, dActualElevation) +function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert, bMaximizeVerticalDepth, bSpecialTangentLeadInOut, sLeadInOutType, Par5Alternative, dActualElevation, bForceClimbCut) -- se lama con asse parallelo alla faccia, passo alla apposita funzione if ( Par5 == MCH_MILL_FU.PARAL_DOWN or Par5 == MCH_MILL_FU.PARAL_TOP or @@ -298,7 +298,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw if not BD.TURN or abs( ptP2:getY() - ptP1:getY()) < 250 then local bIsMachiningDownwards = ( ptP2:getZ() < ptP1:getZ() - 100 * GEO.EPS_SMALL) local bIsMachiningUpwards = ( ptP2:getZ() > ptP1:getZ() + 100 * GEO.EPS_SMALL) - if ( bIsSawCCW ~= bDownUp) and ( bIsMachiningDownwards or not ( bIsMachiningDownwards or bIsMachiningUpwards)) then + if ( bIsSawCCW ~= bDownUp) and ( bIsMachiningDownwards or not ( bIsMachiningDownwards or bIsMachiningUpwards) or bForceClimbCut) then bInvert = true elseif ( ( bIsSawCCW ~= bDownUp) ~= bIsMachiningDownwards) then if Par5Alternative then diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index b3b4591..b32b06b 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3316,7 +3316,8 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, end for i = 1, nStep do local dOffs = ( i - 1) * dStep - local bOk, sErr = Fbs.MakeOne( Proc.Id, nFacAdj, sCutting, dSawDiam, nFaceUse, -0.01, 0, BD.CUT_SIC, dOffs, 0, 0, nil, b3Raw) + local bForceClimbCut = true + local bOk, sErr = Fbs.MakeOne( Proc.Id, nFacAdj, sCutting, dSawDiam, nFaceUse, -0.01, 0, BD.CUT_SIC, dOffs, 0, 0, nil, b3Raw, nil, nil, nil, nil, nil, nil, bForceClimbCut) if not bOk then return bOk, sErr end end -- in base all'elevazione calcolo l'impronta della lama From 5dd839dace33b737425e58f7318587ec92252723 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 24 Mar 2026 15:48:06 +0100 Subject: [PATCH 2/7] - in LapJoint per Q02 solo contorno si inverte ordine lavorazione lato principale e opposto, in modo da avere sempre per ultima la lavorazione da sopra --- LuaLibs/ProcessLapJoint.lua | 154 ++++++++++++++++++------------------ 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index b32b06b..57e9ecd 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -2458,6 +2458,83 @@ local function MakeContourByMill( Proc, idContourPath, vtTunnelDirection, dTunne local bOppositMillingReachesHalfDepth = ToolOpposite.MaxDepth > dTunnelDepth / 2 + dCollSic - dDimStrip / 2 + -- eventuale lavorazione opposta + local bMillingOppositeOk + if bOppositeMillingNeeded then + local sName = 'ContourOppo_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) + local idMachining = EgtAddMachining( sName, sMillingOpposite) + if not idMachining then + local sErr = 'Error : impossible add machining ' .. sName .. '-' .. sMilling + return false, sErr + end + -- geometria + EgtSetMachiningGeometry( {{ idContourPath, -1}}) + -- lato di lavoro sinistro + EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) + -- inversione direzione utensile + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + -- SCC + local nSCC = MCH_SCC.NONE + if not BD.C_SIMM then + if AreSameOrOppositeVectorApprox( vtTunnelDirection, Z_AX()) then + nSCC = MCH_SCC.ADIR_YM + elseif abs( vtTunnelDirection:getX()) < 0.1 then + nSCC = EgtIf( BL.IsPartFinalPhase( nPhase), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP) + elseif vtTunnelDirection:getY() < GEO.EPS_SMALL then + nSCC = MCH_SCC.ADIR_YM + else + nSCC = MCH_SCC.ADIR_YP + end + end + EgtSetMachiningParam( MCH_MP.SCC, nSCC) + -- gestione attacco e uscita + if EgtCurveIsClosed( idContourPath) then + -- attacco e uscita a quarto di cerchio senza allungamenti a inizio e fine + EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT) + EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI) + EgtSetMachiningParam( MCH_MP.LITANG, 0) + EgtSetMachiningParam( MCH_MP.LIPERP, 0.5 * Tool.Diameter) + EgtSetMachiningParam( MCH_MP.LIELEV, 0) + EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) + else + -- nessun attacco e uscita, allungo inizio e fine di raggio utensile + 5mm (per evitare controllo collisioni) + EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.NONE) + EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI) + EgtSetMachiningParam( MCH_MP.STARTADDLEN, Tool.Diameter / 2 + 5) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, Tool.Diameter / 2 + 5) + end + -- affondamento - la curva è a metà tasca quindi affondamento 0 significa che la lavorazione arriva a metà tasca + local dDepth + -- si arriva a metà tasca + if bOppositMillingReachesHalfDepth then + dDepth = -dDimStrip / 2 + -- si arriva al massimo raggiungibile + else + dDepth = Tool.MaxDepth - dTunnelDepth / 2 - dCollSic + bIncomplete = true + end + EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) + -- Note utente con dichiarazione nessuna generazione sfridi per Vmill e massima elevazione + local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' + sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dTunnelDepth / 2 + dDepth, 1)) + EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) + -- eseguo + if ML.ApplyMachining( true, false) then + _, sApplyWarning = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( idMachining, false) + end + bMillingOppositeOk = true + -- altrimenti lavorazione non applicata + else + _, sApplyWarning = EgtGetLastMachMgrError() + EgtSetOperationMode( idMachining, false) + bMillingOppositeOk = false + end + end + -- applicazione lavorazione lato principale local sName = 'Contour_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local idMachining = EgtAddMachining( sName, sMilling) @@ -2546,83 +2623,6 @@ local function MakeContourByMill( Proc, idContourPath, vtTunnelDirection, dTunne bMillingOk = false end - -- eventuale lavorazione opposta - local bMillingOppositeOk - if bOppositeMillingNeeded then - local sName = 'ContourOppo_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) - local idMachining = EgtAddMachining( sName, sMillingOpposite) - if not idMachining then - local sErr = 'Error : impossible add machining ' .. sName .. '-' .. sMilling - return false, sErr - end - -- geometria - EgtSetMachiningGeometry( {{ idContourPath, -1}}) - -- lato di lavoro sinistro - EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) - -- inversione direzione utensile - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) - -- SCC - local nSCC = MCH_SCC.NONE - if not BD.C_SIMM then - if AreSameOrOppositeVectorApprox( vtTunnelDirection, Z_AX()) then - nSCC = MCH_SCC.ADIR_YM - elseif abs( vtTunnelDirection:getX()) < 0.1 then - nSCC = EgtIf( BL.IsPartFinalPhase( nPhase), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP) - elseif vtTunnelDirection:getY() < GEO.EPS_SMALL then - nSCC = MCH_SCC.ADIR_YM - else - nSCC = MCH_SCC.ADIR_YP - end - end - EgtSetMachiningParam( MCH_MP.SCC, nSCC) - -- gestione attacco e uscita - if EgtCurveIsClosed( idContourPath) then - -- attacco e uscita a quarto di cerchio senza allungamenti a inizio e fine - EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT) - EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI) - EgtSetMachiningParam( MCH_MP.LITANG, 0) - EgtSetMachiningParam( MCH_MP.LIPERP, 0.5 * Tool.Diameter) - EgtSetMachiningParam( MCH_MP.LIELEV, 0) - EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0) - EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) - else - -- nessun attacco e uscita, allungo inizio e fine di raggio utensile + 5mm (per evitare controllo collisioni) - EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.NONE) - EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI) - EgtSetMachiningParam( MCH_MP.STARTADDLEN, Tool.Diameter / 2 + 5) - EgtSetMachiningParam( MCH_MP.ENDADDLEN, Tool.Diameter / 2 + 5) - end - -- affondamento - la curva è a metà tasca quindi affondamento 0 significa che la lavorazione arriva a metà tasca - local dDepth - -- si arriva a metà tasca - if bOppositMillingReachesHalfDepth then - dDepth = -dDimStrip / 2 - -- si arriva al massimo raggiungibile - else - dDepth = Tool.MaxDepth - dTunnelDepth / 2 - dCollSic - bIncomplete = true - end - EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) - -- Note utente con dichiarazione nessuna generazione sfridi per Vmill e massima elevazione - local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' - sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) - sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dTunnelDepth / 2 + dDepth, 1)) - EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) - -- eseguo - if ML.ApplyMachining( true, false) then - _, sApplyWarning = EgtGetMachMgrWarning( 0) - if EgtIsMachiningEmpty() then - EgtSetOperationMode( idMachining, false) - end - bMillingOppositeOk = true - -- altrimenti lavorazione non applicata - else - _, sApplyWarning = EgtGetLastMachMgrError() - EgtSetOperationMode( idMachining, false) - bMillingOppositeOk = false - end - end - if bMillingOk or ( bOppositeMillingNeeded and bMillingOppositeOk) then local sWarning = '' if bIncomplete then From 7c9b20ae2ed07c5389b3b0d7f0c8dc2e0d398f6f Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 30 Mar 2026 11:08:56 +0200 Subject: [PATCH 3/7] - in ProcessDrill correzione in caso il PreferredSide non sia definito nella macchina --- LuaLibs/ProcessDrill.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 85da00a..7a37621 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -541,11 +541,13 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) if not bToInvert and Proc.Flg == 1 and bOpen and abs( vtExtr:getZ()) < 0.259 and abs( vtExtr:getY()) > 0.966 then local Tool = BL.GetToolFromMachining( sDrilling) -- lato testa e lato di lavoro devono corrispondere - if ( ( Tool.PreferredSide.bFront == true) and vtExtr:getY() > 10 * GEO.EPS_SMALL) - or ( ( Tool.PreferredSide.bBack == true) and vtExtr:getY() < - 10 * GEO.EPS_SMALL) then - ptCen = ptCen - vtExtr * dLen - vtExtr = - vtExtr - bToInvert = true + if Tool.PreferredSide then + if ( ( Tool.PreferredSide.bFront == true) and vtExtr:getY() > 10 * GEO.EPS_SMALL) + or ( ( Tool.PreferredSide.bBack == true) and vtExtr:getY() < - 10 * GEO.EPS_SMALL) then + ptCen = ptCen - vtExtr * dLen + vtExtr = - vtExtr + bToInvert = true + end end end -- Determino la faccia di inizio del foro e dati correlati From 1af37a55893bb03ea33e45171da97809e846c4ab Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 2 Apr 2026 17:44:24 +0200 Subject: [PATCH 4/7] - in BeamExec si abilita riduzione foratura con MaxElev anche per tagli di testa --- LuaLibs/BeamExec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index b225083..a2dce21 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -443,7 +443,7 @@ local function CalcHeadTailMachBeforeIntersDrillings( vProc, b3Raw) for i = 1, #vProc do local Proc = vProc[i] if Proc.Box and not Proc.Box:isEmpty() then - if Proc.Fct == 1 and BL.IsFeatureCuttingEntireSection( Proc.Box, b3Raw:getDimY(), b3Raw:getDimZ()) and ( Proc.Head or Proc.Tail) and Proc.Prc ~= 340 and Proc.Prc ~= 350 then + if Proc.Fct == 1 and BL.IsFeatureCuttingEntireSection( Proc.Box, b3Raw:getDimY(), b3Raw:getDimZ()) and ( Proc.Head or Proc.Tail) and Proc.Prc ~= 350 then if Proc.Head and Proc.Box:getCenter():getX() < dHeadX then dHeadX = Proc.Box:getCenter():getX() nHeadId = Proc.Id @@ -2211,14 +2211,14 @@ function GetFeatureInfoAndDependency( vProc, b3Raw, nPartId) Proc.PassedByHole = true end -- se taglio attraversato da foro, si definisce precedenza in base ad angolo - if Drill.Identify( Proc) and Cut.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then + if Drill.Identify( Proc) and ( Cut.Identify( ProcB) or ProcB.Prc == 340 or ProcB.Proc == 350) and Overlaps( Proc.Box, ProcB.Box) then -- recupero e verifico l'entità foro local DrillAuxId = ( EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0) + Proc.Id local vtDrillExtr = EgtCurveExtrusion( DrillAuxId, GDB_RT.GLOB) local bOpen = ( Proc.Fce ~= 0) and ( Proc.Fce ~= Proc.Fcs) local ptCut, vtCutN = EgtSurfTmFacetCenter( ProcB.Id, 0, GDB_ID.ROOT) local dMaxAngleDrillOnCut = BD.MAX_ANGLE_DRILL_CUT or 10 - if GetAngle( vtDrillExtr, vtCutN) > dMaxAngleDrillOnCut then + if ( GetAngle( vtDrillExtr, vtCutN) > dMaxAngleDrillOnCut) and not ( ProcB.Prc == 340 or ProcB.Proc == 350) then if bOpen and GetAngle( -vtDrillExtr, vtCutN) < dMaxAngleDrillOnCut then ProcB.Dependency = {} ProcB.Dependency.ExecBefore = Proc From be4575e9842da7f96dfedfeed26e318486398595 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 7 Apr 2026 14:58:39 +0200 Subject: [PATCH 5/7] =?UTF-8?q?-=20in=20DtMortise=20->=20CalcPathAtHeight?= =?UTF-8?q?=20ora=20lo=20spostamento=20viene=20fatto=20correttamente=20anc?= =?UTF-8?q?he=20nel=20caso=20di=20pi=C3=B9=20curve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessDtMortise.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/LuaLibs/ProcessDtMortise.lua b/LuaLibs/ProcessDtMortise.lua index 8dd4887..a38a4d9 100644 --- a/LuaLibs/ProcessDtMortise.lua +++ b/LuaLibs/ProcessDtMortise.lua @@ -136,9 +136,11 @@ local function CalcPathAtHeight( nProcId, AuxId, nAddGrpId, dHeight, dSideAng, b local vtBoxDiag = b3Solid:getMax() - b3Solid:getMin() local nCount NewAuxId, nCount = EgtTrimFlatCurveWithBox( NewAuxId, refBox, vtBoxDiag, true, true, GDB_RT.GLOB) - -- eseguo traslazione e offset per portarla sul top + -- per ogni curva creata, eseguo traslazione e offset per portarla sul top local vtMove = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) * ( dHeight - 10 * GEO.EPS_SMALL) - EgtMove( NewAuxId, vtMove, GDB_RT.GLOB) + for i = 1, nCount do + EgtMove( NewAuxId + i - 1, vtMove, GDB_RT.GLOB) + end -- se divisa in più parti, le unisco congiungendole con segmenti if nCount > 1 then if EgtGetType( NewAuxId) ~= GDB_TY.CRV_COMPO then @@ -147,7 +149,7 @@ local function CalcPathAtHeight( nProcId, AuxId, nAddGrpId, dHeight, dSideAng, b for i = 2, nCount do local CrvId = NewAuxId + i - 1 local ptStart = EgtSP( CrvId) - EgtAddCurveCompoLine( NewAuxId, ptStart) + EgtAddCurveCompoLine( NewAuxId, ptStart) EgtAddCurveCompoCurve( NewAuxId, CrvId) end end From 183a4a564a9c3341877a72409f49b26c708c3a00 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 7 Apr 2026 17:14:25 +0200 Subject: [PATCH 6/7] In ProcessLapJoint - aggiunto warning se non esiste il percorso e relativa disattivazione di esso in tutte le ApplyMachining(). --- LuaLibs/ProcessLapJoint.lua | 102 ++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 57e9ecd..ec49024 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1066,6 +1066,12 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId) local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end -- eventuale segnalazione ingombro di testa o coda UpdateEncumbrance( Proc, nRawId, b3Raw, b3Solid) @@ -1203,6 +1209,12 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead) local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end end end @@ -1238,6 +1250,12 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead) local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end -- eventuale segnalazione ingombro di testa o coda UpdateEncumbrance( Proc, nRawId, b3Raw, b3Solid) @@ -1407,6 +1425,12 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end return true, '', dTDiam end @@ -2977,6 +3001,12 @@ local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfI local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchId, false) return -1, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchId, false) + return false, sWarn + end end -- se non perpendicolare emetto un warning -- else @@ -3130,6 +3160,12 @@ local function MakeByMillAsSaw( Proc, nPhase, nRawId, nPartId, nFacInd, local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchId, false) + return false, sWarn + end end end -- in base all'elevazione calcolo l'impronta della lama @@ -3852,6 +3888,12 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin EgtSetOperationMode( nMchFId, false) return false, sErr end + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end -- se la lavorazione rovina il pezzo successivo emetto warning if ( not Proc.Tail or Proc.AdvTail) and Proc.AffectedFaces.Left and dDistToNextPiece < dDiamTool / 2 then @@ -3969,6 +4011,12 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchId, false) + return false, sWarn + end end else return false, sWarn @@ -4096,6 +4144,12 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end end end @@ -4539,6 +4593,12 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha EgtSetOperationMode( nMchFId, false) return -1, sErr end + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end end -- se non completo e U, cerco di lavorare anche la faccia di fondo (con il massimo affondamento possibile) @@ -4610,6 +4670,12 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha EgtSetOperationMode( nMchFId, false) return -1, sErr end + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end end end @@ -4722,6 +4788,12 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd, local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nIdMach, false) return false, false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nIdMach, false) + return false, sWarn + end end end end @@ -7163,6 +7235,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end -- se divisa in due metà if bDouble then @@ -7183,6 +7261,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFNId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFNId, false) + return false, sWarn + end end end end @@ -7263,6 +7347,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end -- CASO SPECIALE 3 FACCE (se rimane esclusa molta sezione trasversale complessiva della feature, solo per feature 20) @@ -7378,6 +7468,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa EgtSetOperationMode( nMchFId, false) return false, sErr end + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end -- se abilitato dal parametro Q inserisco foro sullo spigolo if EgtGetInfo( Proc.Id, Q_BORE_ON_CORNER, 'i') == 1 then @@ -8559,6 +8655,12 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, nPartId) local _, sErr = EgtGetLastMachMgrError() EgtSetOperationMode( nMchFId, false) return false, sErr + else + local _, sWarn = EgtGetMachMgrWarning( 0) + if EgtIsMachiningEmpty() then + EgtSetOperationMode( nMchFId, false) + return false, sWarn + end end -- eventuale segnalazione ingombro di testa o coda UpdateEncumbrance( Proc, nRawId, b3Raw, b3Solid) From e910d6e6ba2a29710bb6fa41825f2e207081f69a Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 8 Apr 2026 16:00:37 +0200 Subject: [PATCH 7/7] update log e version --- UpdateLog.txt | 6 ++++++ Version.lua | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index 46c214d..4f20572 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,4 +1,10 @@ ==== Beam Update Log ==== +Versione 3.1d1 (08/04/2026) +- Added : le forature vengono accorciate con massima elevazione anche in presenza di tagli di testa +- Modif : nelle slot con lama verticali si lavora sempre in concordanza +- Fixed : in DtMortise correzione a lavorazione antischeggia +- Fixed : in LapJoint, se lavorazione vuota, si disattiva sempre; in Q02 si lavora sempre prima il lato sotto. + Versione 3.1c2 (18/03/2026) - Added : in LapJoint (solo L030) aggiunto Q02 per fare solo contorno per forme a "C" e tunnel; Q17 spessore di eventuale codolo - Modif : per LapJoint e simili il Q06 per antischeggia ora contempla il valore 3 per scegliere la strategia in automatico (lama o fresa) diff --git a/Version.lua b/Version.lua index 27bc95d..1fdd5cf 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '3.1c2' +VERSION = '3.1d1' MIN_EXE = '3.1b1'