Compare commits

...

16 Commits

Author SHA1 Message Date
luca.mazzoleni 36f4014969 - in ProcessDrill in foratura in doppio si riduce lo step solo se foro passante e almeno 2 step 2025-08-08 09:52:14 +02:00
luca.mazzoleni 7248c44406 - migliorie a ottimizzazione teste 2025-08-07 17:37:37 +02:00
luca.mazzoleni 044a074b76 - in LapJoint migliorie a SawPlusChain 2025-08-06 17:26:15 +02:00
luca.mazzoleni c0e3dab107 Merge tag '2.7h1' into develop
2.7h1
2025-08-05 09:16:28 +02:00
luca.mazzoleni 2b2157c971 Merge branch 'release/2.7h1' 2025-08-05 09:16:18 +02:00
luca.mazzoleni 8c697d73ac update version e log 2025-08-05 09:15:37 +02:00
luca.mazzoleni c35d032da8 Merge branch 'feature/TrimmedMortiseFix' into develop 2025-07-23 18:10:36 +02:00
luca.mazzoleni 7447d3cc1b - in Mortise implementata lavorazione contorno non trimmato in caso di trim in/out non uniforme 2025-07-23 17:20:10 +02:00
andrea.villa bfdf80a44a In ProfCamb, creato nuovo tipo di lavorazione 'Prof_end' ed eliminata gestione Q06 fatta in precedenza 2025-07-21 08:44:25 +02:00
andrea.villa 3755521d2e In LapJoint, se bUseBHSideMill, si considera feature di coda a patto che il pezzo sia più lungo di VERY_SHORT 2025-07-17 10:01:28 +02:00
andrea.villa 104663a89a In LapJoint, riduzione massimo materiale lama per lavorazioni antischeggia di lama con direzione verticale. 2025-07-15 16:46:10 +02:00
luca.mazzoleni e322c15099 Merge branch 'master' into develop 2025-07-14 12:45:36 +02:00
luca.mazzoleni 5f55bc2f42 Merge branch 'develop' 2025-07-14 12:43:48 +02:00
luca.mazzoleni 6c3a16d59c update log e version 2025-07-14 12:43:23 +02:00
andrea.villa 8218fcc438 In FaceBySaw, corretto calcolo CompLength in caso di ?PerpendicularOutraw' 2025-07-14 12:41:49 +02:00
luca.mazzoleni 6a83320321 Merge tag '2.7g4' into develop
2.7g4
2025-07-11 17:44:17 +02:00
8 changed files with 116 additions and 47 deletions
+2 -2
View File
@@ -83,8 +83,8 @@ function MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, nFaceUse, dVzLimD
if BD.KIOTP then Ktp = BD.KIOTP end
if ( sLeadInOutType == 'PerpendicularOutraw') then
bLioTang = false
dLiCompLength = dActualElevation + EgtMdbGetGeneralParam( MCH_GP.SAFEZ) + dCutExtra
dLoCompLength = dActualElevation + EgtMdbGetGeneralParam( MCH_GP.SAFEZ) + dCutExtra
dLiCompLength = dActualElevation + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)
dLoCompLength = dActualElevation + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)
dLiTang = 1
dLoTang = 1
dLiPerp = 0
+2 -2
View File
@@ -80,7 +80,7 @@ end
-- setta ultimi testa e utensile utilizzati se compatibili con ottimizzazione testa
local function ConfirmNextMachining()
-- utensile corrente
local sToolUuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
local sToolUuid = EgtGetMachiningParam( MCH_MP.TUUID)
local sToolName = EgtTdbGetToolFromUUID( sToolUuid or '')
EgtTdbSetCurrTool( sToolName or '')
-- testa dell'utensile corrente
@@ -331,7 +331,7 @@ end
---------------------------------------------------------------------
local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
local bOptimizeHeads = BEAM and BEAM.BW and ( not sSortingCriterion or sSortingCriterion == '')
local bOptimizeHeads = ( not sSortingCriterion or sSortingCriterion == '')
if bTopHead == nil and bDownHead == nil then
bTopHead = true
bDownHead = false
+2 -2
View File
@@ -642,8 +642,8 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
local dStep = EgtGetMachiningParam( MCH_MP.STEP)
local nNumStep = ceil( dDepth/dStep)
local dRealStep = dDepth / nNumStep
-- Se nel penultimo step le punte si trovano più vicine del minimo ( MinDistX1X2 + Puntina centraggio H1 + puntina centraggio H2) ricalcolo facendo uno step in meno
if ( ( dLen / 2) - ( dRealStep * (nNumStep - 1))) * 2 < ( 40 + 10 + 10) then
-- Se foro passante e nel penultimo step le punte si trovano più vicine del minimo ( MinDistX1X2 + Puntina centraggio H1 + puntina centraggio H2) ricalcolo facendo uno step in meno
if bOpen and ( nNumStep > 1) and ( ( dLen / 2) - ( dRealStep * (nNumStep - 1))) * 2 < ( 40 + 10 + 10) then
dRealStep = ceil( dDepth / (nNumStep - 1))
EgtSetMachiningParam( MCH_MP.STEP, dRealStep)
sMyWarn ='Warning in drill-double : step changed to ' .. tostring(dRealStep) .. 'mm'
+28 -9
View File
@@ -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
@@ -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
@@ -5079,6 +5083,7 @@ function SawPlusChain.GetBottomFaceEdges( Proc, Face)
CurrentEdge.IsOpen = vEdges[j].Open
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
CurrentEdge.Id = j - 1
if CurrentEdge.AdjacentFaceId == Proc.MainFaces.LongFace.Id then
table.insert( Edges.LongEdges, CurrentEdge)
@@ -5124,6 +5129,7 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face)
CurrentEdge.IsOpen = vEdges[j].Open
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
CurrentEdge.Id = j - 1
if Proc.Topology == 'Tunnel' then
if CurrentEdge.AdjacentFaceId > -1 then
@@ -5273,6 +5279,9 @@ function SawPlusChain.ApplyMachining( Machining, b3Raw)
if Machining.MaxElev then
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', Machining.MaxElev)
end
if Machining.nEdgeFaceUse then
sUserNotes = EgtSetValInNotes( sUserNotes, 'EdgesFaceUse', EgtNumToString( Machining.nEdgeFaceUse))
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
local bIsApplyOk = ML.ApplyMachining( true, false)
@@ -5451,6 +5460,7 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
else
Cutting.Faceuse = BL.GetNearestOrthoOpposite( -EdgeToMachine.ToolDirection)
end
Cutting.nEdgeFaceUse = EdgeToMachine.Id
-- SCC
Cutting.SCC = SawPlusChain.Saw.GetSCC( EdgeToMachine.ToolDirection)
-- asse bloccato
@@ -5491,6 +5501,7 @@ end
function SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
local bIsCuttingOk = false
local sCuttingOriginalMessage = Cutting.Message or ''
local sCuttingApplyMessage = ''
local dOriginalRadialOffset = Cutting.RadialOffset
@@ -5505,7 +5516,9 @@ function SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
bIsCuttingOk, sCuttingApplyMessage = SawPlusChain.ApplyMachining( Cutting, b3Raw)
-- update messaggi
if sCuttingApplyMessage and #sCuttingApplyMessage > 0 then
sCuttingApplyMessage = sCuttingApplyMessage .. 'Apply : ' .. sCuttingApplyMessage .. '\n'
sCuttingApplyMessage = sCuttingOriginalMessage .. '\n' .. sCuttingApplyMessage .. 'Apply : ' .. sCuttingApplyMessage .. '\n'
else
sCuttingApplyMessage = sCuttingOriginalMessage
end
end
@@ -5762,7 +5775,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
return bIsCuttingOk, Cutting.Message
end
end
else
elseif Proc.IsParallel then
-- se la lama non è arrivata sul fondo e c'è almeno un lato aperto va lavorato
if Cutting.CanApply and Cutting.RadialOffset > 10 * GEO.EPS_SMALL then
-- eventuale lavorazione di lama - lato della tasca da cui inizia la lavorazione
@@ -5822,7 +5835,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
return bIsMortisingOk, Mortising.Message
end
end
else
elseif Proc.IsParallel then
-- se la sega a catena non è arrivata sul fondo e c'è almeno un lato aperto va lavorato
if Mortising.LongitudinalOffset > 10 * GEO.EPS_SMALL then
-- eventuale lavorazione di sega a catena - lato della tasca da cui inizia la lavorazione
@@ -6870,6 +6883,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
nil, nil, nil, b3Solid)
if not bOk then return false, sWarn2 end
end
-- dopo aver applicato gli antischeggia ricerco la svuotatura perchè l'ottimizzazione teste deve sapere quale è la lavorazione precedente
_, sPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillUp, bMillDown)
if not sPocketing and bMillUp then
_, sPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind)
bMillDown = false
end
-- se smusso non esclusivo
if nChamfer < 2 then
-- eseguo la svuotatura della faccia principale, mi restituisce id utensile, il diametro utensile per il foro opzionale
@@ -7092,11 +7111,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
+51
View File
@@ -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)
+20 -30
View File
@@ -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)
+10 -1
View File
@@ -1,5 +1,14 @@
==== 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
Versione 2.7g4 (11/07/2025)
- Fixed : in LapJoint 2 facce correzione nella scelta lama da sotto
@@ -25,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)
+1 -1
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '2.7g4'
VERSION = '2.7h1'
MIN_EXE = '2.7f2'