Compare commits

..

16 Commits

Author SHA1 Message Date
daniele.nicoli 187beba682 - ProfCamb - aggiunta Q19, se = 1 disabilita lavorazione AntiSplint.
- update versione e log
2026-07-30 17:09:42 +02:00
daniele.nicoli 2f2b8589af LapJoint - MakeRoundCleanContour, corretto caso tasca profonda a U aperta 2026-07-30 14:48:42 +02:00
luca.mazzoleni c3387ddad8 Merge tag '3.1g3' into develop
3.1g3
2026-07-24 10:32:52 +02:00
luca.mazzoleni 1221b82b03 Merge branch 'release/3.1g3' 2026-07-24 10:32:40 +02:00
luca.mazzoleni 8337129f91 update versione e log 2026-07-24 10:31:27 +02:00
daniele.nicoli d2eebfeb61 LapJoint - Slot - Calcolo leadin/out tornato allo stato della 3.1f3 per problemi con altri casi. Modificato calcolo SCC come da FaceBySaw. 2026-07-24 10:06:20 +02:00
daniele.nicoli b6ee713fa8 Merge remote-tracking branch 'origin/master' into develop 2026-07-22 11:43:36 +02:00
andrea.villa a60edc26b5 Merge branch 'develop' 2026-07-17 11:31:42 +02:00
andrea.villa 7b3db01f03 Cambio versione per rilascio a cliente 2026-07-17 11:30:57 +02:00
daniele.nicoli d837625d9a In BeamExec aggiunta ScarfJoint tra le feature da eseguire dopo i fori che la attraversano. 2026-07-17 11:15:27 +02:00
daniele.nicoli b562938867 In Drill - Diminuito LastStep forature in doppio (distanza alla quale smette foratura speculare e inizia alternata). 2026-07-15 09:49:39 +02:00
luca.mazzoleni 7bd07d8bfd Merge branch 'master' into develop 2026-07-14 09:22:55 +02:00
luca.mazzoleni 511ea1e7fb - update log e version 2026-07-14 09:22:12 +02:00
luca.mazzoleni 38135f12a8 Merge branch 'develop' 2026-07-14 09:19:03 +02:00
daniele.nicoli b812addab3 Merge branch 'Test_CpS_LeadIO' into develop 2026-07-09 09:50:18 +02:00
daniele.nicoli a56e8761d0 LapJoint - CleanCorner piccola correzione 2026-07-09 09:48:34 +02:00
6 changed files with 94 additions and 73 deletions
+4 -4
View File
@@ -996,12 +996,12 @@ local function OrderFeatures( vProc, b3Raw, nPartId)
return true
end
-- se primo è foro e secondo è un ribasso o tenone, il foro va sempre prima a meno che il ribasso non sia di testa
if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2) or Tenon.Identify(B2)) and B2.PassedByHole and
if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2) or Tenon.Identify(B2) or ScarfJoint.Identify(B2)) and B2.PassedByHole and
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
return true
end
-- se primo è un ribasso e secondo è un foro o tenone, il ribasso va sempre dopo a meno che il ribasso non sia di testa
if ( LapJoint.Identify(B1) or Mortise.Identify(B1) or Tenon.Identify(B1)) and B1.PassedByHole and Drill.Identify(B2) and
if ( LapJoint.Identify(B1) or Mortise.Identify(B1) or Tenon.Identify(B1) or ScarfJoint.Identify(B1)) and B1.PassedByHole and Drill.Identify(B2) and
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
return false
end
@@ -2227,8 +2227,8 @@ function GetFeatureInfoAndDependency( vProc, b3Raw, nPartId)
and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) and DtMortise.IsDeeper( ProcB, b3Raw) then
Proc.PassedByDtMortise = true
end
-- se tenone è attraversato da foro allora il foro deve essere fatto prima
if Tenon.Identify( Proc) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
-- se tenone o ScarfJoint sono attraversati da foro allora il foro deve essere fatto prima
if ( Tenon.Identify( Proc) or ScarfJoint.Identify( Proc)) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
Proc.PassedByHole = true
end
-- se taglio attraversato da foro, si definisce precedenza in base ad angolo
+1 -1
View File
@@ -667,7 +667,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
end
else
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15)
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10)
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'
+66 -61
View File
@@ -1955,14 +1955,21 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
-- inversione direzione utensile
local bInvertMach = false
if nPathInt then
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale)
if vtN1:getZ() < BD.NZ_MINA and abs(vtN1:getZ()) >= 0.707 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
bInvertMach = true
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti
elseif not bDoubleSide and vtN1:getY() > GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
bInvertMach = true
if bMillDown then
if vtN1:getZ() > 10 * GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
bInvertMach = true
end
else
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale)
if vtN1:getZ() < BD.NZ_MINA and abs(vtN1:getZ()) >= 0.707 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
bInvertMach = true
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti
elseif not bDoubleSide and vtN1:getY() > GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
bInvertMach = true
end
end
end
-- imposto posizione braccio porta testa
@@ -5713,17 +5720,8 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachin
LeadIn.StartAddLength = BD.CUT_EXTRA
LeadOut.EndAddLength = BD.CUT_EXTRA
end
local vtN = Vector3d( FaceToMachine.VtN)
local vtOrthO
if EdgeToMachine.Elevation > - 10 * GEO.EPS_SMALL then
vtOrthO = Vector3d( EdgeToMachine.ToolDirection)
else
vtOrthO = -Vector3d( EdgeToMachine.ToolDirection)
end
local ptP1 = Point3d( FaceToMachine.Edges.BottomEdge.ptStart)
local ptP2 = Point3d( FaceToMachine.Edges.BottomEdge.ptEnd)
local vtV1 = -Vector3d( FaceToMachine.Edges.SideEdges.StartEdge.vtEdge)
local vtV2 = Vector3d( FaceToMachine.Edges.SideEdges.EndEdge.vtEdge)
local ptP1 = Point3d( EdgeToMachine.ptStart)
local ptP2 = Point3d( EdgeToMachine.ptEnd)
local bInvert = Machining.Invert
if bInvert then
@@ -5734,16 +5732,6 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachin
Machining.vtTg = vtTg
Machining.vtV = vtV1
-- Versore di riferimento
local vtRef = Vector3d( vtTg)
vtRef:rotate( vtN, EgtIf( bInvert, -90, 90))
local b3Box = BBox3d( b3Raw)
b3Box:expand( BD.CUT_SIC)
local ptPa1 = ptP1 + LeadIn.StartAddLength * -vtTg
local ptPa2 = ptP2 + LeadOut.EndAddLength * vtTg
LeadIn.TangentDistance, LeadIn.PerpDistance, LeadOut.TangentDistance, LeadOut.PerpDistance = Fbs.CalcLeadInOutPerpGeom( ptPa1, ptPa2, vtV1, vtV2, vtN, ( Machining.Tool.Diameter / 2), vtRef, -Machining.RadialOffset, b3Box)
else
if Machining.IsStartClosed then
LeadIn.StartAddLength = -dAddLengthToReduce
@@ -5856,23 +5844,42 @@ function SawPlusChain.ApplyMachining( Machining, b3Raw)
end
function SawPlusChain.Saw.GetSCC( vtMachiningDirection)
function SawPlusChain.Saw.GetSCC( vtMachiningDirection, vtN, vtTg)
-- TODO implementare SCC come per FacesBySaw
local nSCC = MCH_SCC.NONE
if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then
nSCC = MCH_SCC.ADIR_ZP
elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then
nSCC = MCH_SCC.ADIR_ZM
elseif AreSameVectorApprox( vtMachiningDirection, Y_AX()) then
nSCC = MCH_SCC.ADIR_YP
elseif AreOppositeVectorApprox( vtMachiningDirection, Y_AX()) then
nSCC = MCH_SCC.ADIR_YM
elseif AreSameVectorApprox( vtMachiningDirection, X_AX()) then
nSCC = MCH_SCC.ADIR_XP
elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then
nSCC = MCH_SCC.ADIR_XM
if not BD.TURN then
-- per ora aggregato usato in verticale solo in split e headcut; Fast non influenzata
if BD.C_SIMM and bMaximizeVerticalDepth then
nSCC = MCH_SCC.ADIR_ZM
elseif abs( vtMachiningDirection:getX()) > abs( vtMachiningDirection:getY()) - GEO.EPS_SMALL then
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
else
nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
end
else
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
nSCC = EgtIf( ( vtMachiningDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
else
nSCC = EgtIf( ( vtMachiningDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
end
end
else
if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then
nSCC = MCH_SCC.ADIR_ZP
elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then
nSCC = MCH_SCC.ADIR_ZM
elseif AreSameVectorApprox( vtMachiningDirection, Y_AX()) then
nSCC = MCH_SCC.ADIR_YP
elseif AreOppositeVectorApprox( vtMachiningDirection, Y_AX()) then
nSCC = MCH_SCC.ADIR_YM
elseif AreSameVectorApprox( vtMachiningDirection, X_AX()) then
nSCC = MCH_SCC.ADIR_XP
elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then
nSCC = MCH_SCC.ADIR_XM
end
end
return nSCC
end
@@ -5994,8 +6001,6 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
Cutting.Faceuse = BL.GetNearestOrthoOpposite( -EdgeToMachine.ToolDirection)
end
Cutting.nEdgeFaceUse = EdgeToMachine.Id
-- SCC
Cutting.SCC = SawPlusChain.Saw.GetSCC( EdgeToMachine.ToolDirection)
-- asse bloccato
Cutting.BlockedAxis = {}
Cutting.BlockedAxis.Orientation = 'perpendicular'
@@ -6003,6 +6008,8 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
Cutting.BlockedAxis.VtOut = EgtIf( FaceToMachine.VtN:getX() > 0, X_AX(), -X_AX())
-- approccio e retrazione
Cutting.LeadIn, Cutting.LeadOut = SawPlusChain.CalculateLeadInOut( Cutting, EdgeToMachine, FaceToMachine, b3Raw)
-- SCC
Cutting.SCC = SawPlusChain.Saw.GetSCC( EdgeToMachine.ToolDirection, FaceToMachine.VtN, Cutting.vtTg)
-- eventuale step orizzontale
Cutting.HorizontalSteps = {}
if Cutting.Tool.SideStep then
@@ -6036,25 +6043,15 @@ function SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
local bIsCuttingOk = false
local sCuttingOriginalMessage = Cutting.Message or ''
local sCuttingApplyMessage = ''
local vtTg = Cutting.vtTg
local bInvert = Cutting.Invert
local dOriginalRadialOffset = Cutting.RadialOffset
local dOriginalLeadInPerpDistance = Cutting.LeadIn.PerpDistance
local dOriginalLeadInTangDistance = Cutting.LeadIn.TangentDistance
local dOriginalLeadOutPerpDistance = Cutting.LeadOut.PerpDistance
local dOriginalLeadOutTangDistance = Cutting.LeadOut.TangentDistance
for i = Cutting.HorizontalSteps.Count, 1, -1 do
Cutting.RadialOffset = dOriginalRadialOffset + Cutting.HorizontalSteps.StepLength * ( i - 1)
local dOrthoOffsetStep = ( Cutting.RadialOffset * ( Cutting.vtV * vtTg))
-- update distanza perpendicolare attacco per contemplare l'offset applicato
Cutting.LeadIn.PerpDistance = dOriginalLeadInPerpDistance - Cutting.RadialOffset
Cutting.LeadIn.TangentDistance = dOriginalLeadInTangDistance + dOrthoOffsetStep + Cutting.LeadIn.StartAddLength
Cutting.LeadOut.PerpDistance = dOriginalLeadOutPerpDistance - Cutting.RadialOffset
Cutting.LeadOut.TangentDistance = dOriginalLeadOutTangDistance - dOrthoOffsetStep - Cutting.LeadOut.EndAddLength
Cutting.LeadIn.StartAddLength = Cutting.LeadIn.StartAddLength - dOrthoOffsetStep - Cutting.LeadIn.StartAddLength
Cutting.LeadOut.EndAddLength = Cutting.LeadOut.EndAddLength + dOrthoOffsetStep + Cutting.LeadOut.EndAddLength
-- applicazione lavorazione
bIsCuttingOk, sCuttingApplyMessage = SawPlusChain.ApplyMachining( Cutting, b3Raw)
-- update messaggi
@@ -6780,9 +6777,9 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
end
end
-- punto successivo ( precedente della faccia successiva)
local k = EgtIf( j < #vFace, j + 1, 1)
local k = EgtIf( j < #vFace, j + 1, EgtIf( bClosed, 1, nil))
-- se è un percorso aperto prendo il punto medio della seconda faccia come punto locale 2
if not bClosed then
if not k then
if vFace[j].PNoSucc then
ptLoc2 = vFace[j].PNoSucc
elseif abs( vtN:getZ()) > abs( vtN:getY()) then
@@ -6791,7 +6788,15 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
ptLoc2 = Point3d( vFace[j].Cen:getX(), ptLoc1:getY(), vFace[j].Cen:getZ())
end
else
ptLoc2 = vFace[k].PPrev
if vFace[j].PNoSucc then
ptLoc2 = vFace[j].PNoSucc
elseif vFace[k].PPrev then
ptLoc2 = vFace[k].PPrev
elseif abs( vtN:getZ()) > abs( vtN:getY()) then
ptLoc2 = Point3d( vFace[j].Cen:getX(), vFace[j].Cen:getY(), ptLoc1:getZ())
else
ptLoc2 = Point3d( vFace[j].Cen:getX(), ptLoc1:getY(), vFace[j].Cen:getZ())
end
end
-- ricavo i punti e l'angolo interno
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc.Id, nFace1, nFace2, GDB_ID.ROOT)
@@ -6930,7 +6935,7 @@ local function GetCleanCornerFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToo
local bAdj, ptLocP1, ptLocP2, dAng = EgtSurfTmFacetsContact( nNewProc, nPrecFac, nFac, GDB_ID.ROOT)
-- salvo i dati
vFace[i] = { Fac = nFac, Cen = ptCen, Norm = vtN, Len = dLen, Width = dWidth, AngPrev = EgtIf( bAdj, dAng, 0)}
if not bAdj then
if not bAdj and Proc.Fct > 3 then
vFace[i].PNoPrev = GetCleanCornerPointIfNoAdj( nNewProc, Proc, nFac, vFace[i], nil, nil)
end
-- verifico che l'adiacenza sia veramente con il precedente (percorro con normale a destra)
@@ -6955,7 +6960,7 @@ local function GetCleanCornerFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToo
end
end
local bAdj_2, ptLocP1_2, ptLocP2_2, dAng_2 = EgtSurfTmFacetsContact( nNewProc, nFac, nFac+1, GDB_ID.ROOT)
if not bAdj_2 then
if not bAdj_2 and Proc.Fct > 3 then
vFace[i].PNoSucc = GetCleanCornerPointIfNoAdj( nNewProc, Proc, nFac, vFace[i], ptLocP1, ptLocP2)
end
end
+8 -6
View File
@@ -33,6 +33,7 @@ local sEnableExtraBladeUpperFace = 'Q02' -- i
local sDepthChamferMill = 'Q03' -- d
local sOverMaterialForFinish = 'Q04' -- d
local sPreemptiveChamfer = 'Q05' -- i
local sDisableAntiSplint = 'Q19'
-- abilitazioni extra
local dMakeAntiSplintOnHead = 1 -- valore impronta antischeggia, per disattivare settare = nil o = 0
@@ -301,13 +302,14 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local sMilling
-- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia
local bMakeAs
local bDeleteAntiSplint = EgtGetInfo( Proc.Id, sDisableAntiSplint, 'i') == 1
local vtStart = EgtSV( AuxId, GDB_ID.ROOT)
if nSide == 0 then
if abs(vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
if abs( vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs( dMakeAntiSplintOnHead) > 0 and not bDeleteAntiSplint then
bMakeAs = true
end
else
if abs(vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
if abs( vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs( dMakeAntiSplintOnHead) > 0 and not bDeleteAntiSplint then
bMakeAs = true
end
end
@@ -531,7 +533,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if bDouble then
-- inserisco la lavorazione
local sName
if bMakeAs then
if bMakeAs and not bDeleteAntiSplint then
sName = 'ProfB_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
else
sName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
@@ -583,7 +585,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
ModifySideAndInvert( Proc, bHead)
end
-- se devo fare l'antischeggia in testa
if bMakeAs then
if bMakeAs and not bDeleteAntiSplint then
local sNewName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
-- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale)
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
@@ -621,7 +623,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- inserisco la prima lavorazione
local sName
if bMakeAs then
if bMakeAs and not bDeleteAntiSplint then
sName = 'Prof_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
else
sName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
@@ -698,7 +700,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
ModifySideAndInvert( Proc, bHead)
end
-- se devo fare l'antischeggia in testa
if bMakeAs then
if bMakeAs and not bDeleteAntiSplint then
local sNewName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
-- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale)
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
+14
View File
@@ -1,4 +1,18 @@
==== Beam Update Log ====
Versione 3.1g4 (30/07/2026)
- Fixed : in RoundCleanContour per tasche a 3 facce a U MillDown
- Modif : in ProfCamb aggiunta Q19, se = 1 disabilita lavorazione AntiSplint
Versione 3.1g3 (24/07/2026)
- Fixed : in slot con lama corretta scelta SCC
Versione 3.1g2 (17/07/2026)
- Modif : Diminuito LastStep forature in doppio
- Modif : ScarfJoint tra le feature da eseguire dopo i fori che la attraversano
Versione 3.1g1 (14/07/2026)
- Modif : in slot con lama migliorati attacchi inclinati
- Modif : in CleanCorner migliorie
Versione 3.1f3 (25/06/2026)
- Modif : LapJoint - migliorata gestione BirdsMouth con più di 3 facce
+1 -1
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '3.1f3'
VERSION = '3.1g4'
MIN_EXE = '3.1b1'