Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 187beba682 | |||
| 2f2b8589af | |||
| c3387ddad8 | |||
| 1221b82b03 | |||
| 8337129f91 | |||
| d2eebfeb61 |
+53
-56
@@ -1955,14 +1955,21 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
-- inversione direzione utensile
|
-- inversione direzione utensile
|
||||||
local bInvertMach = false
|
local bInvertMach = false
|
||||||
if nPathInt then
|
if nPathInt then
|
||||||
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale)
|
if bMillDown then
|
||||||
if vtN1:getZ() < BD.NZ_MINA and abs(vtN1:getZ()) >= 0.707 then
|
if vtN1:getZ() > 10 * GEO.EPS_SMALL then
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
bInvertMach = true
|
bInvertMach = true
|
||||||
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti
|
end
|
||||||
elseif not bDoubleSide and vtN1:getY() > GEO.EPS_SMALL then
|
else
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale)
|
||||||
bInvertMach = true
|
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
|
||||||
end
|
end
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
@@ -5713,17 +5720,8 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachin
|
|||||||
LeadIn.StartAddLength = BD.CUT_EXTRA
|
LeadIn.StartAddLength = BD.CUT_EXTRA
|
||||||
LeadOut.EndAddLength = BD.CUT_EXTRA
|
LeadOut.EndAddLength = BD.CUT_EXTRA
|
||||||
end
|
end
|
||||||
local vtN = Vector3d( FaceToMachine.VtN)
|
local ptP1 = Point3d( EdgeToMachine.ptStart)
|
||||||
local vtOrthO
|
local ptP2 = Point3d( EdgeToMachine.ptEnd)
|
||||||
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 bInvert = Machining.Invert
|
local bInvert = Machining.Invert
|
||||||
if bInvert then
|
if bInvert then
|
||||||
@@ -5734,16 +5732,6 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachin
|
|||||||
Machining.vtTg = vtTg
|
Machining.vtTg = vtTg
|
||||||
Machining.vtV = vtV1
|
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
|
else
|
||||||
if Machining.IsStartClosed then
|
if Machining.IsStartClosed then
|
||||||
LeadIn.StartAddLength = -dAddLengthToReduce
|
LeadIn.StartAddLength = -dAddLengthToReduce
|
||||||
@@ -5856,23 +5844,42 @@ function SawPlusChain.ApplyMachining( Machining, b3Raw)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function SawPlusChain.Saw.GetSCC( vtMachiningDirection)
|
function SawPlusChain.Saw.GetSCC( vtMachiningDirection, vtN, vtTg)
|
||||||
-- TODO implementare SCC come per FacesBySaw
|
-- TODO implementare SCC come per FacesBySaw
|
||||||
local nSCC = MCH_SCC.NONE
|
if not BD.TURN then
|
||||||
if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then
|
-- per ora aggregato usato in verticale solo in split e headcut; Fast non influenzata
|
||||||
nSCC = MCH_SCC.ADIR_ZP
|
if BD.C_SIMM and bMaximizeVerticalDepth then
|
||||||
elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then
|
nSCC = MCH_SCC.ADIR_ZM
|
||||||
nSCC = MCH_SCC.ADIR_ZM
|
elseif abs( vtMachiningDirection:getX()) > abs( vtMachiningDirection:getY()) - GEO.EPS_SMALL then
|
||||||
elseif AreSameVectorApprox( vtMachiningDirection, Y_AX()) then
|
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
|
||||||
nSCC = MCH_SCC.ADIR_YP
|
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||||
elseif AreOppositeVectorApprox( vtMachiningDirection, Y_AX()) then
|
nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||||
nSCC = MCH_SCC.ADIR_YM
|
else
|
||||||
elseif AreSameVectorApprox( vtMachiningDirection, X_AX()) then
|
nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
nSCC = MCH_SCC.ADIR_XP
|
end
|
||||||
elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then
|
else
|
||||||
nSCC = MCH_SCC.ADIR_XM
|
-- 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
|
end
|
||||||
|
|
||||||
return nSCC
|
return nSCC
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -5994,8 +6001,6 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
|
|||||||
Cutting.Faceuse = BL.GetNearestOrthoOpposite( -EdgeToMachine.ToolDirection)
|
Cutting.Faceuse = BL.GetNearestOrthoOpposite( -EdgeToMachine.ToolDirection)
|
||||||
end
|
end
|
||||||
Cutting.nEdgeFaceUse = EdgeToMachine.Id
|
Cutting.nEdgeFaceUse = EdgeToMachine.Id
|
||||||
-- SCC
|
|
||||||
Cutting.SCC = SawPlusChain.Saw.GetSCC( EdgeToMachine.ToolDirection)
|
|
||||||
-- asse bloccato
|
-- asse bloccato
|
||||||
Cutting.BlockedAxis = {}
|
Cutting.BlockedAxis = {}
|
||||||
Cutting.BlockedAxis.Orientation = 'perpendicular'
|
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())
|
Cutting.BlockedAxis.VtOut = EgtIf( FaceToMachine.VtN:getX() > 0, X_AX(), -X_AX())
|
||||||
-- approccio e retrazione
|
-- approccio e retrazione
|
||||||
Cutting.LeadIn, Cutting.LeadOut = SawPlusChain.CalculateLeadInOut( Cutting, EdgeToMachine, FaceToMachine, b3Raw)
|
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
|
-- eventuale step orizzontale
|
||||||
Cutting.HorizontalSteps = {}
|
Cutting.HorizontalSteps = {}
|
||||||
if Cutting.Tool.SideStep then
|
if Cutting.Tool.SideStep then
|
||||||
@@ -6036,25 +6043,15 @@ function SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
|
|||||||
local bIsCuttingOk = false
|
local bIsCuttingOk = false
|
||||||
local sCuttingOriginalMessage = Cutting.Message or ''
|
local sCuttingOriginalMessage = Cutting.Message or ''
|
||||||
local sCuttingApplyMessage = ''
|
local sCuttingApplyMessage = ''
|
||||||
local vtTg = Cutting.vtTg
|
|
||||||
local bInvert = Cutting.Invert
|
|
||||||
local dOriginalRadialOffset = Cutting.RadialOffset
|
local dOriginalRadialOffset = Cutting.RadialOffset
|
||||||
local dOriginalLeadInPerpDistance = Cutting.LeadIn.PerpDistance
|
local dOriginalLeadInPerpDistance = Cutting.LeadIn.PerpDistance
|
||||||
local dOriginalLeadInTangDistance = Cutting.LeadIn.TangentDistance
|
|
||||||
local dOriginalLeadOutPerpDistance = Cutting.LeadOut.PerpDistance
|
local dOriginalLeadOutPerpDistance = Cutting.LeadOut.PerpDistance
|
||||||
local dOriginalLeadOutTangDistance = Cutting.LeadOut.TangentDistance
|
|
||||||
|
|
||||||
for i = Cutting.HorizontalSteps.Count, 1, -1 do
|
for i = Cutting.HorizontalSteps.Count, 1, -1 do
|
||||||
Cutting.RadialOffset = dOriginalRadialOffset + Cutting.HorizontalSteps.StepLength * ( i - 1)
|
Cutting.RadialOffset = dOriginalRadialOffset + Cutting.HorizontalSteps.StepLength * ( i - 1)
|
||||||
local dOrthoOffsetStep = ( Cutting.RadialOffset * ( Cutting.vtV * vtTg))
|
|
||||||
-- update distanza perpendicolare attacco per contemplare l'offset applicato
|
-- update distanza perpendicolare attacco per contemplare l'offset applicato
|
||||||
Cutting.LeadIn.PerpDistance = dOriginalLeadInPerpDistance - Cutting.RadialOffset
|
Cutting.LeadIn.PerpDistance = dOriginalLeadInPerpDistance - Cutting.RadialOffset
|
||||||
Cutting.LeadIn.TangentDistance = dOriginalLeadInTangDistance + dOrthoOffsetStep + Cutting.LeadIn.StartAddLength
|
|
||||||
Cutting.LeadOut.PerpDistance = dOriginalLeadOutPerpDistance - Cutting.RadialOffset
|
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
|
-- applicazione lavorazione
|
||||||
bIsCuttingOk, sCuttingApplyMessage = SawPlusChain.ApplyMachining( Cutting, b3Raw)
|
bIsCuttingOk, sCuttingApplyMessage = SawPlusChain.ApplyMachining( Cutting, b3Raw)
|
||||||
-- update messaggi
|
-- update messaggi
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ local sEnableExtraBladeUpperFace = 'Q02' -- i
|
|||||||
local sDepthChamferMill = 'Q03' -- d
|
local sDepthChamferMill = 'Q03' -- d
|
||||||
local sOverMaterialForFinish = 'Q04' -- d
|
local sOverMaterialForFinish = 'Q04' -- d
|
||||||
local sPreemptiveChamfer = 'Q05' -- i
|
local sPreemptiveChamfer = 'Q05' -- i
|
||||||
|
local sDisableAntiSplint = 'Q19'
|
||||||
|
|
||||||
-- abilitazioni extra
|
-- abilitazioni extra
|
||||||
local dMakeAntiSplintOnHead = 1 -- valore impronta antischeggia, per disattivare settare = nil o = 0
|
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
|
local sMilling
|
||||||
-- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia
|
-- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia
|
||||||
local bMakeAs
|
local bMakeAs
|
||||||
|
local bDeleteAntiSplint = EgtGetInfo( Proc.Id, sDisableAntiSplint, 'i') == 1
|
||||||
local vtStart = EgtSV( AuxId, GDB_ID.ROOT)
|
local vtStart = EgtSV( AuxId, GDB_ID.ROOT)
|
||||||
if nSide == 0 then
|
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
|
bMakeAs = true
|
||||||
end
|
end
|
||||||
else
|
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
|
bMakeAs = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -531,7 +533,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
if bDouble then
|
if bDouble then
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName
|
local sName
|
||||||
if bMakeAs then
|
if bMakeAs and not bDeleteAntiSplint then
|
||||||
sName = 'ProfB_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
sName = 'ProfB_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
else
|
else
|
||||||
sName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
sName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
@@ -583,7 +585,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
ModifySideAndInvert( Proc, bHead)
|
ModifySideAndInvert( Proc, bHead)
|
||||||
end
|
end
|
||||||
-- se devo fare l'antischeggia in testa
|
-- 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))
|
local sNewName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
-- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale)
|
-- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale)
|
||||||
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
|
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
|
||||||
@@ -621,7 +623,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
-- inserisco la prima lavorazione
|
-- inserisco la prima lavorazione
|
||||||
local sName
|
local sName
|
||||||
if bMakeAs then
|
if bMakeAs and not bDeleteAntiSplint then
|
||||||
sName = 'Prof_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
sName = 'Prof_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
else
|
else
|
||||||
sName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
sName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
@@ -698,7 +700,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
ModifySideAndInvert( Proc, bHead)
|
ModifySideAndInvert( Proc, bHead)
|
||||||
end
|
end
|
||||||
-- se devo fare l'antischeggia in testa
|
-- 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))
|
local sNewName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
-- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale)
|
-- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale)
|
||||||
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
|
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
==== Beam Update Log ====
|
==== 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)
|
Versione 3.1g2 (17/07/2026)
|
||||||
- Modif : Diminuito LastStep forature in doppio
|
- Modif : Diminuito LastStep forature in doppio
|
||||||
|
|||||||
+1
-1
@@ -2,5 +2,5 @@
|
|||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '3.1g2'
|
VERSION = '3.1g4'
|
||||||
MIN_EXE = '3.1b1'
|
MIN_EXE = '3.1b1'
|
||||||
|
|||||||
Reference in New Issue
Block a user