Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a54d2315b |
@@ -2300,7 +2300,7 @@ function BeamExec.ProcessFeatures()
|
|||||||
BD.IMPROVE_HEAD_TAIL_DRILLINGS = true
|
BD.IMPROVE_HEAD_TAIL_DRILLINGS = true
|
||||||
end
|
end
|
||||||
-- costanti per doppio
|
-- costanti per doppio
|
||||||
MIRROR_DRILLINGS_MIN_DISTANCE = 25 --TODO spostare la variabile MinDistToolX1X2 nel BeamData e usare quella
|
MIRROR_DRILLINGS_MIN_DISTANCE = 40
|
||||||
MIRROR_POCKETS_MIN_DISTANCE = EgtIf( BD.DOWN_HEAD, 35, 50)
|
MIRROR_POCKETS_MIN_DISTANCE = EgtIf( BD.DOWN_HEAD, 35, 50)
|
||||||
-- verifica se possibile rotazione di 90 gradi
|
-- verifica se possibile rotazione di 90 gradi
|
||||||
BD.ROT90 = BD.ROT90 and Verify90DegRotation( EgtGetFirstRawPart())
|
BD.ROT90 = BD.ROT90 and Verify90DegRotation( EgtGetFirstRawPart())
|
||||||
@@ -2555,7 +2555,7 @@ function BeamExec.ProcessFeatures()
|
|||||||
local nNextRawId = EgtGetNextRawPart( nRawId)
|
local nNextRawId = EgtGetNextRawPart( nRawId)
|
||||||
if nNextRawId and EgtGetPartInRawPartCount( nNextRawId) == 0 and EgtGetRawPartBBox( nNextRawId):getDimX() < BD.MinRaw then
|
if nNextRawId and EgtGetPartInRawPartCount( nNextRawId) == 0 and EgtGetRawPartBBox( nNextRawId):getDimX() < BD.MinRaw then
|
||||||
EgtRemoveRawPartFromCurrPhase( nNextRawId)
|
EgtRemoveRawPartFromCurrPhase( nNextRawId)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
nPhase = EgtGetCurrPhase()
|
nPhase = EgtGetCurrPhase()
|
||||||
nDispId = EgtGetPhaseDisposition( nPhase)
|
nDispId = EgtGetPhaseDisposition( nPhase)
|
||||||
|
|||||||
+1
-3
@@ -1448,7 +1448,7 @@ function BeamLib.GetToolFromMachining( sMachiningName)
|
|||||||
Tool.Thickness = EgtTdbGetCurrToolParam( MCH_TP.THICK) or 0
|
Tool.Thickness = EgtTdbGetCurrToolParam( MCH_TP.THICK) or 0
|
||||||
Tool.CornerRadius = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or 0
|
Tool.CornerRadius = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or 0
|
||||||
-- fresa (TODO al momento aggiunte solo le informazioni che servono)
|
-- fresa (TODO al momento aggiunte solo le informazioni che servono)
|
||||||
elseif Tool.Type == MCH_TY.MILL_STD or Tool.Type == MCH_TY.MILL_NOTIP then
|
elseif Tool.Type == MCH_TY.MILL_STD or MCH_TY.MILL_NOTIP then
|
||||||
if BD.GetSetupInfo then
|
if BD.GetSetupInfo then
|
||||||
Tool.IsOnAggregate = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).bToolOnAggregate
|
Tool.IsOnAggregate = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).bToolOnAggregate
|
||||||
else
|
else
|
||||||
@@ -1459,8 +1459,6 @@ function BeamLib.GetToolFromMachining( sMachiningName)
|
|||||||
if Tool.StemDiameter > Tool.Diameter + GEO.EPS_SMALL then
|
if Tool.StemDiameter > Tool.Diameter + GEO.EPS_SMALL then
|
||||||
Tool.MaxDepth = Tool.MaxDepth - BD.COLL_SIC
|
Tool.MaxDepth = Tool.MaxDepth - BD.COLL_SIC
|
||||||
end
|
end
|
||||||
elseif Tool.Type == MCH_TY.DRILL_STD or Tool.Type == MCH_TY.DRILL_LONG then
|
|
||||||
Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0
|
|
||||||
-- altri utensili al momento non previsti
|
-- altri utensili al momento non previsti
|
||||||
else
|
else
|
||||||
error( 'Wrong tool type')
|
error( 'Wrong tool type')
|
||||||
|
|||||||
@@ -931,7 +931,7 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType,
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function FacesBySaw.CalcLeadInOutPerpGeom( ptP1, ptP2, vtV1, vtV2, vtN, dRad, vtRef, dCutExtra, b3Box)
|
function FacesBySaw.CalcLeadInOutPerpGeom( ptP1, ptP2, vtV1, vtV2, vtN, dRad, vtRef, dCutExtra, b3Box, bIsRightWorkside)
|
||||||
-- Mi assicuro che i vettori ingresso/uscita giacciano nel piano
|
-- Mi assicuro che i vettori ingresso/uscita giacciano nel piano
|
||||||
vtV1 = vtV1 - vtV1 * vtN * vtN ; vtV1:normalize()
|
vtV1 = vtV1 - vtV1 * vtN * vtN ; vtV1:normalize()
|
||||||
vtV2 = vtV2 - vtV2 * vtN * vtN ; vtV2:normalize()
|
vtV2 = vtV2 - vtV2 * vtN * vtN ; vtV2:normalize()
|
||||||
@@ -941,7 +941,7 @@ function FacesBySaw.CalcLeadInOutPerpGeom( ptP1, ptP2, vtV1, vtV2, vtN, dRad, vt
|
|||||||
-- Sistema di riferimento intrinseco al taglio
|
-- Sistema di riferimento intrinseco al taglio
|
||||||
local vtX = vtTg ^ vtN
|
local vtX = vtTg ^ vtN
|
||||||
local frFace = Frame3d( ptP1, vtX, vtTg, vtN)
|
local frFace = Frame3d( ptP1, vtX, vtTg, vtN)
|
||||||
local bRight = ( vtX * vtRef > 0)
|
local bRight = EgtIf( bIsRightWorkside == nil, ( vtX * vtRef > 0), bIsRightWorkside)
|
||||||
EgtOutLog( 'LioPerp --> Vref=' .. tostring( vtRef) .. ' V1=' .. tostring( vtV1) .. ' V2=' .. tostring( vtV2), 3)
|
EgtOutLog( 'LioPerp --> Vref=' .. tostring( vtRef) .. ' V1=' .. tostring( vtV1) .. ' V2=' .. tostring( vtV2), 3)
|
||||||
|
|
||||||
-- Versore di attacco e uscita
|
-- Versore di attacco e uscita
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
|
nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
|
||||||
-- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia
|
-- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia
|
||||||
TgA = CosB / sqrt( 1 - CosB * CosB)
|
TgA = CosB / sqrt( 1 - CosB * CosB)
|
||||||
local dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA
|
dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA
|
||||||
-- Per fori molto inclinati ( < 30 gradi) si usa la testa della macchina per l'accorciamento. Fast esclusa
|
-- Per fori molto inclinati ( < 30 gradi) si usa la testa della macchina per l'accorciamento. Fast esclusa
|
||||||
if BD.C_SIMM and CosB > 0.866 then
|
if BD.C_SIMM and CosB > 0.866 then
|
||||||
dSubL = ( 190 / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA - 116
|
dSubL = ( 190 / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA - 116
|
||||||
@@ -667,13 +667,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local Tool = BL.GetToolFromMachining( sDrilling)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10)
|
||||||
local dDrillbitTipLength_H1 = dMaxToolLength - Tool.Length
|
|
||||||
local sNotes = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES)
|
|
||||||
EgtTdbSetCurrTool( EgtGetValInNotes( sNotes, 'DOUBLE', 's') or Tool.Name)
|
|
||||||
local dDrillbitTipLength_H2 = ( EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or 0) - ( EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0)
|
|
||||||
EgtTdbSetCurrTool( Tool.Name)
|
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', ( MIRROR_DRILLINGS_MIN_DISTANCE + dDrillbitTipLength_H1 + dDrillbitTipLength_H2 + 10) / 2 + 1)
|
|
||||||
end
|
end
|
||||||
if dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then
|
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'
|
sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth'
|
||||||
|
|||||||
+98
-107
@@ -1792,9 +1792,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
dDepth, bOneShot)
|
dDepth, bOneShot)
|
||||||
|
|
||||||
-- recupero la lavorazione senza considerare l'elevazione perché viene calcolata l'elevazione utile
|
-- recupero la lavorazione senza considerare l'elevazione perché viene calcolata l'elevazione utile
|
||||||
local bTopHead = not( bMillDown and not bDoubleSide)
|
local sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, not( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide)
|
||||||
local bDownHead = bMillDown and not bDoubleSide
|
|
||||||
local sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, bTopHead, bDownHead)
|
|
||||||
if not sMilling then
|
if not sMilling then
|
||||||
local sMyWarn = 'Warning : SmallToolContour not found in library'
|
local sMyWarn = 'Warning : SmallToolContour not found in library'
|
||||||
EgtOutLog( sMyWarn)
|
EgtOutLog( sMyWarn)
|
||||||
@@ -1956,31 +1954,17 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
-- inversione direzione utensile
|
-- inversione direzione utensile
|
||||||
local bInvertMach = false
|
local bInvertMach = false
|
||||||
local bInvertTool = false
|
|
||||||
if nPathInt then
|
if nPathInt then
|
||||||
if bDownHead then
|
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale)
|
||||||
if vtN1:getZ() > 10 * GEO.EPS_SMALL then
|
if vtN1:getZ() < BD.NZ_MINA and abs(vtN1:getZ()) >= 0.707 then
|
||||||
bInvertTool = true
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
bInvertMach = true
|
bInvertMach = true
|
||||||
end
|
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti
|
||||||
elseif bMillDown and bDoubleSide then
|
elseif not bDoubleSide and vtN1:getY() > GEO.EPS_SMALL then
|
||||||
if vtN1:getZ() > 10 * GEO.EPS_SMALL and bDownHead then
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
bInvertTool = true
|
bInvertMach = 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
|
|
||||||
bInvertTool = 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() > 10 * GEO.EPS_SMALL then
|
|
||||||
bInvertTool = true
|
|
||||||
bInvertMach = true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bInvertMach)
|
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
if not BD.C_SIMM then
|
||||||
@@ -2055,7 +2039,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
-- imposto lato di lavoro sinistro
|
-- imposto lato di lavoro sinistro
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
-- imposto direzione utensile opposta
|
-- imposto direzione utensile opposta
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, not bInvertTool)
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
if not BD.C_SIMM then
|
||||||
@@ -2084,7 +2068,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dMachDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dMachDepth)
|
||||||
-- setto se devo invertire il percorso
|
-- setto se devo invertire il percorso
|
||||||
local bInvert = CheckToInvert( nIdPath, true)
|
local bInvert = CheckToInvert( nIdPath, true)
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, not EgtIf( bInvertMach, not bInvert, bInvert))
|
EgtSetMachiningParam( MCH_MP.INVERT, not bInvert)
|
||||||
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill e massima elevazione
|
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill e massima elevazione
|
||||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||||
@@ -4599,11 +4583,9 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
else
|
else
|
||||||
dMachDepth = dMaxDepthDn - ( dDepth / 2) - dCollSic
|
dMachDepth = dMaxDepthDn - ( dDepth / 2) - dCollSic
|
||||||
dElev = dMaxDepthDn
|
dElev = dMaxDepthDn
|
||||||
if dMaxDepthDn < ( dDepth / 2) + dCollSic + 100 * GEO.EPS_SMALL then
|
bComplete = false
|
||||||
bComplete = false
|
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
EgtOutLog( sWarn)
|
||||||
EgtOutLog( sWarn)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- se anche lavorando dal lato opposto non riesco a svuotare completamente la fessura
|
-- se anche lavorando dal lato opposto non riesco a svuotare completamente la fessura
|
||||||
@@ -4611,11 +4593,9 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
if dMaxDepth < ( dDepth / 2) + BD.CUT_EXTRA + dCollSic then
|
if dMaxDepth < ( dDepth / 2) + BD.CUT_EXTRA + dCollSic then
|
||||||
dMachDepth = dMaxDepth - (dDepth / 2) - dCollSic
|
dMachDepth = dMaxDepth - (dDepth / 2) - dCollSic
|
||||||
dElev = dMaxDepth
|
dElev = dMaxDepth
|
||||||
if dMaxDepth < ( dDepth / 2) + dCollSic + 100 * GEO.EPS_SMALL then
|
bComplete = false
|
||||||
bComplete = false
|
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
EgtOutLog( sWarn)
|
||||||
EgtOutLog( sWarn)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if bMakeContour then
|
if bMakeContour then
|
||||||
@@ -4914,30 +4894,6 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
|
|||||||
EgtSetMachiningParam( MCH_MP.INVERT, not bInvert)
|
EgtSetMachiningParam( MCH_MP.INVERT, not bInvert)
|
||||||
-- setto l'offset pari allo spessore lama
|
-- setto l'offset pari allo spessore lama
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSL, -dSawThick)
|
EgtSetMachiningParam( MCH_MP.OFFSL, -dSawThick)
|
||||||
local LeadIn = {
|
|
||||||
dStartAddLen = EgtGetMachiningParam( MCH_MP.STARTADDLEN),
|
|
||||||
dLeadInTangDist = EgtGetMachiningParam( MCH_MP.LITANG),
|
|
||||||
dLeadInPerpDist = EgtGetMachiningParam( MCH_MP.LIPERP),
|
|
||||||
dLeadInElev = EgtGetMachiningParam( MCH_MP.LIELEV),
|
|
||||||
dLeadInCompLen = EgtGetMachiningParam( MCH_MP.LICOMPLEN)
|
|
||||||
}
|
|
||||||
local LeadOut = {
|
|
||||||
dEndAddLen = EgtGetMachiningParam( MCH_MP.ENDADDLEN),
|
|
||||||
dLeadOutTangDist = EgtGetMachiningParam( MCH_MP.LOTANG),
|
|
||||||
dLeadOutPerpDist = EgtGetMachiningParam( MCH_MP.LOPERP),
|
|
||||||
dLeadOutElev = EgtGetMachiningParam( MCH_MP.LOELEV),
|
|
||||||
dLeadOutCompLen = EgtGetMachiningParam( MCH_MP.LOCOMPLEN)
|
|
||||||
}
|
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, LeadOut.dEndAddLen)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LITANG, LeadOut.dLeadOutTangDist)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, LeadOut.dLeadOutPerpDist)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LIELEV, LeadOut.dLeadOutElev)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LICOMPLEN, LeadOut.dLeadOutCompLen)
|
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, LeadIn.dStartAddLen)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LOTANG, LeadIn.dLeadInTangDist)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, LeadIn.dLeadInPerpDist)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LOELEV, LeadIn.dLeadInElev)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LOCOMPLEN, LeadIn.dLeadInCompLen)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -5706,7 +5662,7 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachine, b3Raw)
|
function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachine, b3Raw, Proc)
|
||||||
-- TODO implementare le funzioni di Tool Collision Avoidance (vedi wiki e FacesBysaw -> CalcLeadInOutPerpGeom)
|
-- TODO implementare le funzioni di Tool Collision Avoidance (vedi wiki e FacesBysaw -> CalcLeadInOutPerpGeom)
|
||||||
|
|
||||||
-- si determina l'eventuale riduzione da applicare in caso di inizio o fine chiusi
|
-- si determina l'eventuale riduzione da applicare in caso di inizio o fine chiusi
|
||||||
@@ -5757,18 +5713,49 @@ 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 vtOrthO
|
||||||
|
if EdgeToMachine.Elevation > - 10 * GEO.EPS_SMALL then
|
||||||
|
vtOrthO = Vector3d( EdgeToMachine.ToolDirection)
|
||||||
|
else
|
||||||
|
vtOrthO = -Vector3d( EdgeToMachine.ToolDirection)
|
||||||
|
end
|
||||||
local ptP1 = Point3d( EdgeToMachine.ptStart)
|
local ptP1 = Point3d( EdgeToMachine.ptStart)
|
||||||
local ptP2 = Point3d( EdgeToMachine.ptEnd)
|
local ptP2 = Point3d( EdgeToMachine.ptEnd)
|
||||||
|
local Edges = BL.GetEdgesInfo( Proc, FaceToMachine.Id)
|
||||||
|
local vtV1 = -Vector3d( Edges[EdgeToMachine.PreviousEdgeIndex].vtEdge)
|
||||||
|
local vtV2 = Vector3d( Edges[EdgeToMachine.NextEdgeIndex].vtEdge)
|
||||||
|
|
||||||
local bInvert = Machining.Invert
|
local bInvert = Machining.Invert
|
||||||
if bInvert then
|
if bInvert then
|
||||||
ptP1, ptP2 = ptP2, ptP1
|
ptP1, ptP2 = ptP2, ptP1
|
||||||
vtV1, vtV2 = vtV2, vtV1
|
vtV1, vtV2 = vtV2, vtV1
|
||||||
end
|
end
|
||||||
local vtTg = ptP2 - ptP1 ; vtTg:normalize()
|
local vtTg = ptP2 - ptP1 ; vtTg:normalize()
|
||||||
Machining.vtTg = vtTg
|
|
||||||
Machining.vtV = vtV1
|
|
||||||
|
|
||||||
|
-- Versore di riferimento
|
||||||
|
local vtRef = Vector3d( vtTg)
|
||||||
|
vtRef:rotate( vtN, EgtIf( bInvert, -90, 90))
|
||||||
|
|
||||||
|
local bIsRightWorkside = Machining.Workside == MCH_MILL_WS.RIGHT
|
||||||
|
if bIsRightWorkside ~= bInvert--[[ and EdgeToMachine.Id ~= FaceToMachine.Edges.BottomEdge.Id]] then
|
||||||
|
vtV1 = -vtV1
|
||||||
|
vtV2 = -vtV2
|
||||||
|
end
|
||||||
|
|
||||||
|
local b3Box = BBox3d( b3Raw)
|
||||||
|
b3Box:expand( BD.CUT_SIC)
|
||||||
|
local ptPa1 = ptP1 + LeadIn.StartAddLength * -vtTg
|
||||||
|
local ptPa2 = ptP2 + LeadOut.EndAddLength * vtTg
|
||||||
|
|
||||||
|
Machining.vtTg = vtTg
|
||||||
|
LeadIn.vtV1 = vtV1
|
||||||
|
LeadOut.vtV2 = vtV2
|
||||||
|
LeadIn.ptP1 = ptP1
|
||||||
|
LeadOut.ptP2 = ptP2
|
||||||
|
Machining.vtOffset = vtRef
|
||||||
|
|
||||||
|
LeadIn.TangentDistance, LeadIn.PerpDistance, LeadOut.TangentDistance, LeadOut.PerpDistance = Fbs.CalcLeadInOutPerpGeom( ptPa1, ptPa2, vtV1, vtV2, vtN, ( Machining.Tool.Diameter / 2), vtRef, -Machining.RadialOffset, b3Box, bIsRightWorkside)
|
||||||
else
|
else
|
||||||
if Machining.IsStartClosed then
|
if Machining.IsStartClosed then
|
||||||
LeadIn.StartAddLength = -dAddLengthToReduce
|
LeadIn.StartAddLength = -dAddLengthToReduce
|
||||||
@@ -5881,42 +5868,23 @@ function SawPlusChain.ApplyMachining( Machining, b3Raw)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function SawPlusChain.Saw.GetSCC( vtMachiningDirection, vtN, vtTg)
|
function SawPlusChain.Saw.GetSCC( vtMachiningDirection)
|
||||||
-- TODO implementare SCC come per FacesBySaw
|
-- TODO implementare SCC come per FacesBySaw
|
||||||
if not BD.TURN then
|
local nSCC = MCH_SCC.NONE
|
||||||
-- per ora aggregato usato in verticale solo in split e headcut; Fast non influenzata
|
if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then
|
||||||
if BD.C_SIMM and bMaximizeVerticalDepth then
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
nSCC = MCH_SCC.ADIR_ZM
|
elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then
|
||||||
elseif abs( vtMachiningDirection:getX()) > abs( vtMachiningDirection:getY()) - GEO.EPS_SMALL then
|
nSCC = MCH_SCC.ADIR_ZM
|
||||||
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
|
elseif AreSameVectorApprox( vtMachiningDirection, Y_AX()) then
|
||||||
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
elseif AreOppositeVectorApprox( vtMachiningDirection, Y_AX()) then
|
||||||
else
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
elseif AreSameVectorApprox( vtMachiningDirection, X_AX()) then
|
||||||
end
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
else
|
elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then
|
||||||
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
|
nSCC = MCH_SCC.ADIR_XM
|
||||||
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
|
||||||
|
|
||||||
@@ -6038,15 +6006,15 @@ 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'
|
||||||
Cutting.BlockedAxis.VtN = FaceToMachine.VtN
|
Cutting.BlockedAxis.VtN = FaceToMachine.VtN
|
||||||
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, Proc)
|
||||||
-- 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
|
||||||
@@ -6080,15 +6048,38 @@ 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)
|
local dRadialStep = Cutting.HorizontalSteps.StepLength * ( i - 1)
|
||||||
|
local dDirectionProportion = ( Cutting.LeadIn.vtV1 * vtTg)
|
||||||
|
Cutting.RadialOffset = dOriginalRadialOffset + dRadialStep
|
||||||
|
local dStepOffset = Cutting.RadialOffset - dOriginalRadialOffset
|
||||||
|
local dTangOffsetStep = ( Cutting.RadialOffset * dDirectionProportion)
|
||||||
|
local bTiltedSlot = abs( dDirectionProportion) > 0 + 10 * GEO.EPS_SMALL
|
||||||
|
local bIsRightWorkside = Cutting.Workside == MCH_MILL_WS.RIGHT
|
||||||
|
|
||||||
-- 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.LeadOut.PerpDistance = dOriginalLeadOutPerpDistance - Cutting.RadialOffset
|
local b3Box = BBox3d( b3Raw)
|
||||||
|
b3Box:expand( BD.CUT_SIC)
|
||||||
|
local ptPa1 = Cutting.LeadIn.ptP1 + ( Cutting.LeadIn.StartAddLength - dTangOffsetStep) * -vtTg + dStepOffset * Cutting.LeadIn.vtV1
|
||||||
|
local ptPa2 = Cutting.LeadOut.ptP2 + ( Cutting.LeadOut.EndAddLength + dTangOffsetStep) * vtTg + dStepOffset * Cutting.LeadOut.vtV2
|
||||||
|
|
||||||
|
Cutting.LeadIn.TangentDistance, Cutting.LeadIn.PerpDistance, Cutting.LeadOut.TangentDistance, Cutting.LeadOut.PerpDistance = Fbs.CalcLeadInOutPerpGeom( ptPa1, ptPa2, Cutting.LeadIn.vtV1, Cutting.LeadOut.vtV2, Cutting.BlockedAxis.VtN, ( Cutting.Tool.Diameter / 2), Cutting.vtOffset, -Cutting.RadialOffset, b3Box, bIsRightWorkside)
|
||||||
|
--Cutting.LeadIn.PerpDistance = dOriginalLeadInPerpDistance - dRadialStep --dOriginalLeadInPerpDistance - Cutting.RadialOffset
|
||||||
|
--Cutting.LeadIn.TangentDistance = dOriginalLeadInTangDistance + dTangOffsetStep --+ Cutting.LeadIn.StartAddLength
|
||||||
|
--Cutting.LeadOut.PerpDistance = dOriginalLeadOutPerpDistance - dRadialStep --- Cutting.RadialOffset
|
||||||
|
--Cutting.LeadOut.TangentDistance = dOriginalLeadOutTangDistance - dTangOffsetStep --- Cutting.LeadOut.EndAddLength
|
||||||
|
|
||||||
|
Cutting.LeadIn.StartAddLength = Cutting.LeadIn.StartAddLength + EgtIf( bTiltedSlot, - ( dTangOffsetStep + Cutting.LeadIn.StartAddLength), 0)
|
||||||
|
Cutting.LeadOut.EndAddLength = Cutting.LeadOut.EndAddLength + EgtIf( bTiltedSlot, ( dTangOffsetStep + Cutting.LeadOut.EndAddLength), 0)
|
||||||
-- applicazione lavorazione
|
-- applicazione lavorazione
|
||||||
bIsCuttingOk, sCuttingApplyMessage = SawPlusChain.ApplyMachining( Cutting, b3Raw)
|
bIsCuttingOk, sCuttingApplyMessage = SawPlusChain.ApplyMachining( Cutting, b3Raw)
|
||||||
-- update messaggi
|
-- update messaggi
|
||||||
@@ -8218,7 +8209,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||||
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
|
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
|
||||||
bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid,
|
bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid,
|
||||||
dDepth, bOneShot)
|
dDepth, bOneShotm)
|
||||||
if not bOk then return false, sWarn2 end
|
if not bOk then return false, sWarn2 end
|
||||||
if sWarn2 then
|
if sWarn2 then
|
||||||
if not sWarn then sWarn = '' end
|
if not sWarn then sWarn = '' end
|
||||||
@@ -8310,7 +8301,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||||
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
|
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
|
||||||
bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid,
|
bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid,
|
||||||
dDepth, bOneShot)
|
dDepth, bOneShotm)
|
||||||
if not bOk then return false, sWarn2 end
|
if not bOk then return false, sWarn2 end
|
||||||
if sWarn2 then
|
if sWarn2 then
|
||||||
if not sWarn then sWarn = '' end
|
if not sWarn then sWarn = '' end
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ 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
|
||||||
@@ -302,14 +301,13 @@ 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') or 0) == 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 and not bDeleteAntiSplint then
|
if abs(vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
|
||||||
bMakeAs = true
|
bMakeAs = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if abs( vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs( dMakeAntiSplintOnHead) > 0 and not bDeleteAntiSplint then
|
if abs(vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
|
||||||
bMakeAs = true
|
bMakeAs = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,23 +1,5 @@
|
|||||||
==== Beam Update Log ====
|
==== Beam Update Log ====
|
||||||
|
|
||||||
Versione 3.1h2 (24/08/2026)
|
|
||||||
- Fixed : in Drill - Fori in doppio con utensili lunghi, corretto calcolo LastStep
|
|
||||||
- Fixed : AntiSplintBySaw - Se inverte lavorazione, inverte anche i parametri di LeadIn e LeadOut
|
|
||||||
|
|
||||||
Versione 3.1h1 (05/08/2026)
|
|
||||||
- Modif : in Pocket non eseguo lavorazione di pulizia tasca (laterale) se le lavorazioni sopra e sotto arrivano esattamente a metà tasca (senza affondamento extra)
|
|
||||||
- Modif : in RoundCleanContour - tasca passante lavorata solo da sopra o da sotto e fresa di contorno non lavora tutto, attiva lavorazione in doppio
|
|
||||||
|
|
||||||
Versione 3.1g5 (31/07/2026)
|
|
||||||
- Fixed : in RoundCleanContour per tasche a 3 facce a U in doppio
|
|
||||||
|
|
||||||
Versione 3.1g4 (31/07/2026)
|
|
||||||
- Modif : in ProfCamb aggiunta Q19, se = 1 disabilita lavorazione AntiSplint
|
|
||||||
- Fixed : in RoundCleanContour per tasche a 3 facce a U MillDown
|
|
||||||
|
|
||||||
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
|
||||||
- Modif : ScarfJoint tra le feature da eseguire dopo i fori che la attraversano
|
- Modif : ScarfJoint tra le feature da eseguire dopo i fori che la attraversano
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
-- Version.lua by Egaltech s.r.l. 2026/08/05
|
-- Version.lua by Egaltech s.r.l. 2026/05/31
|
||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '3.1h2'
|
VERSION = '3.1g2'
|
||||||
MIN_EXE = '3.1b1'
|
MIN_EXE = '3.1b1'
|
||||||
|
|||||||
Reference in New Issue
Block a user