From 104663a89a3c3bda2d86ac7fee21866a5c8f2038 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Tue, 15 Jul 2025 16:46:10 +0200 Subject: [PATCH 1/5] In LapJoint, riduzione massimo materiale lama per lavorazioni antischeggia di lama con direzione verticale. --- LuaLibs/ProcessLapJoint.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 88478c9..7630dca 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3398,6 +3398,10 @@ local function MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw, nFacInd, bReduceDe end end local dExtraOffs = 0 + -- se il taglio è praticamente verticale, riduto massimo materiale lama + if BD.DECR_VERT_CUT and vtN:getZ() > 0.985 then + dMaxDepth = dMaxDepth - BD.DECR_VERT_CUT - BD.COLL_SIC + end -- se profondità superiore al massimo lama modifico elevazione if dDepth > dMaxDepth then dExtraOffs = dMaxDepth - dDepth From 3755521d2e37ca32fe33f32c781b3a6789746fea Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Thu, 17 Jul 2025 10:01:28 +0200 Subject: [PATCH 2/5] =?UTF-8?q?In=20LapJoint,=20se=20bUseBHSideMill,=20si?= =?UTF-8?q?=20considera=20feature=20di=20coda=20a=20patto=20che=20il=20pez?= =?UTF-8?q?zo=20sia=20pi=C3=B9=20lungo=20di=20VERY=5FSHORT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLapJoint.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 7630dca..09cd342 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -794,7 +794,7 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw) -- verifico se è in coda local dEndDist = Proc.Box:getMin():getX() - b3Solid:getMin():getX() if ( dEndDist > BD.MAX_DIST_HTFEA) or bUseBHSideMill then - if not( BD.BH_MACHINE) and bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 then + if not( BD.BH_MACHINE) and bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 and b3Solid:getDimX() > BD.LEN_VERY_SHORT_PART then return true else return false From bfdf80a44acab6c0543762253f97d0f13fa2557e Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 21 Jul 2025 08:44:25 +0200 Subject: [PATCH 3/5] In ProfCamb, creato nuovo tipo di lavorazione 'Prof_end' ed eliminata gestione Q06 fatta in precedenza --- LuaLibs/ProcessProfCamb.lua | 50 +++++++++++++++---------------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 1778090..af4fc13 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -33,7 +33,6 @@ local sEnableExtraBladeUpperFace = 'Q02' -- i local sDepthChamferMill = 'Q03' -- d local sOverMaterialForFinish = 'Q04' -- d local sPreemptiveChamfer = 'Q05' -- i -local bUseSmallMill = 'Q06' -- i -- abilitazioni extra local dMakeAntiSplintOnHead = 1 -- valore impronta antischeggia, per disattivare settare = nil o = 0 @@ -208,36 +207,31 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly end --------------------------------------------------------------------- -function VerifySmallMillCanFinish( dDiamCurrentTool, dDepthProfile, nSide) - local dToolMaxDepthSmall, dToolDiamSmall +function VerifyOtherMillCanFinish( dDepthProfile, nSide) + local dToolMaxDepthFinish -- abilitazione lavorazione da sotto - local sMillType = 'Prof' - local sMillingSmall, _, _, bH2Small = ML.FindMilling( sMillType, nil, nil, nil, nil, true, nil, nil, nil, 'Smallest') - if not sMillingSmall then + local sMillType = 'Prof_end' + local sMillingFinish, _, _, _ = ML.FindMilling( sMillType, nil, nil, nil, nil, true, nil, nil, nil) + if not sMillingFinish then return false end -- Recupero i dati dell'utensile - if EgtMdbSetCurrMachining( sMillingSmall) then + if EgtMdbSetCurrMachining( sMillingFinish) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid)) then - dToolMaxDepthSmall = EgtTdbGetCurrToolMaxDepth() - dToolDiamSmall = EgtTdbGetCurrToolParam( MCH_TP.DIAM) - -- se non ci sono almeno 5mm di differenza si fa con utensile standard - if dDiamCurrentTool - 5 < dToolDiamSmall then - return false - end + dToolMaxDepthFinish = EgtTdbGetCurrToolMaxDepth() end else return false end - local bDouble = ( dDepthProfile + BD.CUT_EXTRA > dToolMaxDepthSmall) + local bDouble = ( dDepthProfile + BD.CUT_EXTRA > dToolMaxDepthFinish) -- se lavorazione in doppio richiesta, si verifica se richiesta testa sotto if bDouble and nSide == 0 then return false -- TODO macchine con BD.DOWN_HEAD potrebbero lavorare in doppio in questo caso! end - if not bDouble or ( dDepthProfile + BD.MILL_OVERLAP < dToolMaxDepthSmall * 2) then - return true, sMillingSmall, bDouble + if not bDouble or ( dDepthProfile + BD.MILL_OVERLAP < dToolMaxDepthFinish * 2) then + return true, sMillingFinish, bDouble end return false end @@ -506,12 +500,8 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end - local bUseSmallMillOnFinish = EgtGetInfo( Proc.Id, bUseSmallMill, 'i') == 1 - local sMillingSmall, bDoubleSmall - -- se serve fresa più piccola per finitura - if bUseSmallMillOnFinish then - bUseSmallMillOnFinish, sMillingSmall, bDoubleSmall = VerifySmallMillCanFinish( dMillDiam, dProfDepth, nSide) - end + -- se configurata fresa di finitura + local bUseOtherMillOnFinish, sFinishMilling, bDoubleFinishMill = VerifyOtherMillCanFinish( dProfDepth, nSide) -- se il chamfer non è esclusivo continuo con le altre lavorazioni if nChamfer < 2 then @@ -608,7 +598,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) nMchId = nMch2Id end -- se abilitata, aggiungo lavorazione di finitura - if bFinish and not bUseSmallMillOnFinish then + if bFinish and not bUseOtherMillOnFinish then -- inserisco la lavorazione local sNewName = 'ProfB_Fin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId)) @@ -723,7 +713,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) nMchId = nMch2Id end -- se abilitata, aggiungo lavorazione di finitura - if bFinish and not bUseSmallMillOnFinish then + if bFinish and not bUseOtherMillOnFinish then -- inserisco la lavorazione local sNewName = 'Prof_Fin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId)) @@ -780,12 +770,12 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end end -- se finitura con fresa piccola - if bFinish and bUseSmallMillOnFinish then - local sDepthSmall = EgtIf( bDoubleSmall, ( dProfDepth+ BD.MILL_OVERLAP ) / 2, dProfDepth + BD.CUT_EXTRA) + if bFinish and bUseOtherMillOnFinish then + local sDepthFinishMill = EgtIf( bDoubleFinishMill, ( dProfDepth+ BD.MILL_OVERLAP ) / 2, dProfDepth + BD.CUT_EXTRA) local sMachName = 'Fin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) - nMchId = EgtAddMachining( sMachName, sMillingSmall) + nMchId = EgtAddMachining( sMachName, sFinishMilling) if not nMchId then - local sErr = 'Error adding machining ' .. sMachName .. '-' .. sMillingSmall + local sErr = 'Error adding machining ' .. sMachName .. '-' .. sFinishMilling EgtOutLog( sErr) return false, sErr end @@ -793,7 +783,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) EgtSetMachiningGeometry( {{ AuxId, -1}}) -- imposto l'affondamento - EgtSetMachiningParam( MCH_MP.DEPTH, sDepthSmall) + EgtSetMachiningParam( MCH_MP.DEPTH, sDepthFinishMill) -- posizione braccio porta testa EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)) -- eseguo @@ -803,7 +793,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) return false, sErr end - if bDoubleSmall then + if bDoubleFinishMill then local sNewName = 'FinB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId)) EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) From 7447d3cc1b3535f4ee9b89e0d11347f196434ecc Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 23 Jul 2025 17:20:10 +0200 Subject: [PATCH 4/5] - in Mortise implementata lavorazione contorno non trimmato in caso di trim in/out non uniforme --- LuaLibs/ProcessLapJoint.lua | 10 ++++---- LuaLibs/ProcessMortise.lua | 51 +++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 09cd342..0bcd07b 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -7096,11 +7096,11 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead) nCapIdLeftSide = EgtSurfTmByFlatContour( nAddGrpId, nFirstId) if not nCapIdLeftSide then bAllWithEndCap = false end end - if nFirstId then - for nId = nFirstId, nFirstId + nPnt + nCrv + nSrf - 1 do - EgtErase( nId) - end - end + if nFirstId then + for nId = nFirstId, nFirstId + nPnt + nCrv + nSrf - 1 do + EgtErase( nId) + end + end end if i > 1 then -- taglio della superficie lato sinistro diff --git a/LuaLibs/ProcessMortise.lua b/LuaLibs/ProcessMortise.lua index 527173b..e29ce07 100644 --- a/LuaLibs/ProcessMortise.lua +++ b/LuaLibs/ProcessMortise.lua @@ -352,6 +352,57 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) if not bModif and not bOpenBtm then BL.SetOpenSide( AuxId, b3Solid) end + + -- caso speciale feature trimmata diversamente in/out: si ricostruisce la curva non trimmata + -- recupero gruppo per geometria addizionale + local nAddGrpId = BL.GetAddGroup( nPartId) + if not nAddGrpId then + local sErr = 'Error : missing AddGroup' + EgtOutLog( sErr) + return false, sErr + end + -- estrazione loop trimesh: se 1 contorno ha il fondo, se due contorni è passante. + -- se passante si deve discriminare se i due contorni sono uguali (passante standard, trimmata allo stesso modo in/out) oppure se un contorno è diverso dall'altro (e quindi non è trimmata in egual modo in/out) + -- se più di 2 contorni si rimane nel caso standard + local idCurve1, nIdCount = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId) + if nIdCount == 2 then + local idCurve2 = idCurve1 + 1 + local dCurveLength1 = EgtCurveLength( idCurve1) + local dCurveLength2 = EgtCurveLength( idCurve2) + if abs( dCurveLength1 - dCurveLength2) > 100 * GEO.EPS_SMALL then + -- riferimento curva ausiliaria + local frAuxId = Frame3d( EgtGP( AuxId, GDB_RT.GLOB), vtExtr) + -- box dei due contorni nel riferimento della faccia di fondo + local b3Curve1 = EgtGetBBoxRef( idCurve1, GDB_BB.STANDARD, frAuxId) + local b3Curve2 = EgtGetBBoxRef( idCurve2, GDB_BB.STANDARD, frAuxId) + -- per creare la curva non trimmata si creerà un piano di intersezione con la trimesh appena sopra al contorno più vicino a AuxId, ossia a ptOffset + local ptOffset = b3Curve1:getMax() + if b3Curve1:getMin():getZ() > b3Curve2:getMin():getZ() + 10 * GEO.EPS_SMALL then + ptOffset = b3Curve2:getMax() + end + -- ptOffset si sposta appena sopra per garantire l'intersezione + ptOffset = ptOffset + Vector3d( 0, 0, 100 * GEO.EPS_SMALL) + local ptOffsetGlob = Point3d( ptOffset) + ptOffsetGlob:toGlob( frAuxId) + EgtErase( { idCurve1, idCurve2} ) + -- intersezione piano a ptOffset con la trimesh: si ottiene la curva originale non trimmata + local nFirstId, nPnt, nCrv, nSrf = EgtPlaneSurfTmInters( ptOffsetGlob, frAuxId:getVersZ(), Proc.Id, nAddGrpId, GDB_RT.GLOB) + if nPnt == 0 and nCrv == 1 and nSrf == 0 then + EgtCloseCurveCompo( nFirstId) + local vtMove = -frAuxId:getVersZ() * ptOffset:getZ() + EgtMove( nFirstId, vtMove, GDB_RT.GLOB) + EgtErase( AuxId) + EgtChangeId( nFirstId, AuxId) + else + if nFirstId then + for nId = nFirstId, nFirstId + nPnt + nCrv + nSrf - 1 do + EgtErase( nId) + end + end + end + end + end + if bOpenBtm then -- creo superficie chiusa local nFlat = EgtSurfTmByFlatContour( EgtGetParent( AuxId), AuxId, 0.05) From 8c697d73ac04fa941e8507fe8cefdbf56ad561ad Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 5 Aug 2025 09:15:37 +0200 Subject: [PATCH 5/5] update version e log --- UpdateLog.txt | 8 +++++++- Version.lua | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index 70ab70a..c00d2c6 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,11 @@ ==== Beam Update Log ==== +Versione 2.7h1 (05/08/2025) +- Fixed : in Mortise migliorata la lavorazione in caso di feature trimmata +- Modif : in LapJoint, riduzione massimo materiale lama per lavorazioni antischeggia di lama con direzione verticale +- Modif : in LapJoint migliorie alla lavorazione tipo BlockHaus +- Modif : nei profili si usa il tipo lavorazione Prof_end per la finitura + Versione 2.7g5 (14/07/2025) - Fixed : in tagli di testa e coda corretti attacchi @@ -28,7 +34,7 @@ Versione 2.7f3 (19/06/2025) Versione 2.7f2 (18/06/2025) - Modif : in LongDoubleCut aggiunto messaggio feature non completa se utensile non arriva sul fondo - Modif : in StepJointNotch, se si forza truciolatore, si prende utensile più grande -- Fixed : in LapJoint, piccola correzione calcolo sovrapposizione trimesh per smuotatura +- Fixed : in LapJoint, piccola correzione calcolo sovrapposizione trimesh per svuotatura - Fixed : in LapJoint, per sovrapposizione in spezzatura, corretto caso tipo Tunnel Versione 2.7f1 (03/06/2025) diff --git a/Version.lua b/Version.lua index 7f655a8..98cf323 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.7g5' +VERSION = '2.7h1' MIN_EXE = '2.7f2'