Compare commits

...

62 Commits

Author SHA1 Message Date
daniele.nicoli 36618ccc02 - AntiSplintBySaw - Se inverte lavorazione, inverte anche i parametri di LeadIn e LeadOut 2026-08-11 12:01:25 +02:00
daniele.nicoli e66038461d Merge tag '3.1h1' into develop
3.1h1
2026-08-05 15:50:01 +02:00
daniele.nicoli 1dc22e5af3 Merge branch 'release/3.1h1' 2026-08-05 15:49:26 +02:00
daniele.nicoli dfcb06c298 update versione e log 2026-08-05 15:47:29 +02:00
daniele.nicoli ef7d328eee Merge tag '3.1h1' into develop
3.1h1
2026-08-05 15:36:15 +02:00
daniele.nicoli 11683fa34d Merge branch 'release/3.1h1' 2026-08-05 15:33:52 +02:00
daniele.nicoli bec5751e8c - LapJoint, MakeByPockets - se lavorazione in doppio taglia fino a metà tasca e non oltre (+BD.CUT_EXTRA_MIN) la considero comunque completa e non eseguo lavorazione di pulizia laterale.
- LapJoint, MakeRoundCleanContour - se tasca passante solo da sopra o da sotto e fresa di contorno non lavora tutto, attiva lavorazione in doppio.
2026-08-04 09:45:13 +02:00
daniele.nicoli eb7a125aa0 Merge tag '3.1g5' into develop
3.1g5
2026-07-31 17:04:46 +02:00
daniele.nicoli e03f25247d Merge branch 'release/3.1g5' 2026-07-31 17:03:39 +02:00
daniele.nicoli 3c97e96e05 - RoundCleanContour per tasche a 3 facce a U in doppio correzione Invert e ToolInvert 2026-07-31 17:01:15 +02:00
daniele.nicoli b44a45e8b0 Merge tag '3.1g4' into develop
3.1g4
2026-07-31 11:17:32 +02:00
daniele.nicoli 3a878f5793 Merge branch 'release/3.1g4' 2026-07-31 11:15:20 +02:00
daniele.nicoli 9795bbdc80 - ProfCamb, piccola correzione commit precedente. 2026-07-31 10:03:59 +02:00
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
daniele.nicoli 771a56d832 - BeamLib - aumentati parametri che salva la funzione Edges
- LapJoint - Modifiche LeadInOut per SawPlusChain
- LapJoint - Aggiunto casi CleanCorner
2026-07-08 16:56:25 +02:00
daniele.nicoli f9a9c2412a Aggiunto To do nella selezione utensile/ottimizzazione teste 2026-06-26 14:55:29 +02:00
daniele.nicoli 0e1e27dc50 Merge branch 'master' into develop 2026-06-26 14:49:32 +02:00
andrea.villa b191fbdf1f Merge remote-tracking branch 'origin/develop' 2026-06-25 12:06:42 +02:00
andrea.villa 97db4b1614 Cambio versione per rilascio a cliente 2026-06-25 12:06:32 +02:00
andrea.villa 59ad02fcf8 Per identificare feature di testa, oltre che verificare se sia troncante, si controlla anche la feature taglio 2026-06-25 11:24:02 +02:00
daniele.nicoli d756e4c44d LapJoint - CleanCorner ora funziona anche su tasche a 3 facce a U. 2026-06-23 08:53:15 +02:00
daniele.nicoli d2a9e9e189 LapJoint - migliorata gestione BirdsMouth con più di 3 facce 2026-06-19 09:31:19 +02:00
andrea.villa 8925c73639 Merge branch 'master' into develop 2026-06-18 16:50:32 +02:00
andrea.villa a083405552 Merge remote-tracking branch 'origin/develop' 2026-06-18 16:50:12 +02:00
andrea.villa 287a5b118f Aggiornato versione e log per rilascio a cliente 2026-06-18 16:49:04 +02:00
andrea.villa a6a61a8980 In Drill, gestione delle svuotature in doppio tipo NT 2026-06-18 16:48:11 +02:00
andrea.villa e82f03f191 Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2026-06-17 09:39:39 +02:00
andrea.villa efdbe5c001 Merge remote-tracking branch 'origin/master' into develop 2026-06-17 09:39:34 +02:00
daniele.nicoli e3057a1e53 Merge branch 'master' into develop 2026-06-17 09:20:12 +02:00
andrea.villa cb1aa22e9b Merge remote-tracking branch 'origin/develop' 2026-06-17 09:15:07 +02:00
andrea.villa a275719560 Cambio versione per rilasdcio a cliente 2026-06-17 09:14:58 +02:00
daniele.nicoli 8e491efb5d Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2026-06-16 16:36:46 +02:00
daniele.nicoli e482c60775 ProcessDrill - Nei fori dritti su parete inclinata sposta la MaxElev tenendo conto di inclinazione della parete e ToolHolder 2026-06-16 16:36:39 +02:00
andrea.villa 2b9c8539de Essetre ha cambiato la Q dello smusso nella feature "Mortasa". Ora è Q01. 2026-06-16 16:25:31 +02:00
daniele.nicoli e557d57dae Aggiunti commenti ad ultima modifica 2026-06-16 08:51:14 +02:00
daniele.nicoli d377a33420 Merge branch 'test_AddVertDice_T#3031' into develop 2026-06-16 08:42:45 +02:00
daniele.nicoli f5a5350e70 ProcessCut - Aggiunti tagli verticali anche in caso di tagli inclinati su testa o coda per rendere più piccoli i pezzi che possono cadere sul motore 2026-06-16 08:16:04 +02:00
daniele.nicoli 0d7e9e09b3 Merge branch 'test_SkipMortCut_T#3005' into develop 2026-06-12 16:33:15 +02:00
daniele.nicoli 198031a3c1 ProcessMortise - Elimina i tagli del piano ed eventuale cubettatura se già presente da un'altra feature, prima eliminava quelli della feature dando problemi con l'ordinamento. 2026-06-12 16:03:49 +02:00
daniele.nicoli ce2fcf4a42 ProcessCut e FacesBySaw.MakeOne - Modifica non ancora funzionante 2026-06-12 12:09:26 +02:00
andrea.villa 2f312c5cb8 Aggiunto controllo su massima lunghezza pezzo processabile 2026-06-10 15:05:12 +02:00
daniele.nicoli c9fae12574 Merge remote-tracking branch 'origin/HEAD' into develop 2026-06-09 09:47:02 +02:00
daniele.nicoli a137794c75 Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2026-06-09 09:46:01 +02:00
daniele.nicoli dac5b40d3b LapJoint - non viene eseguito Antisplint su facce chiuse e limitate da altre facce 2026-06-09 09:45:56 +02:00
luca.mazzoleni d255d8aaa9 update log 2026-06-08 09:38:13 +02:00
daniele.nicoli ce3fbd9b93 LapJoint CleanCorner - corretto calcolo inclinazione utensile (per utensili con angoli diversi) corretta e ottimizzata funzione controllo collisioni CalcInterference() e aggiunta inclinazione utensile in caso di Proc=25 Q01=2 2026-06-05 15:53:39 +02:00
daniele.nicoli fad52a8483 Merge remote-tracking branch 'origin/master' into develop 2026-06-04 09:05:29 +02:00
14 changed files with 691 additions and 218 deletions
+18
View File
@@ -277,6 +277,15 @@ if bToProcess then
else else
vBeam[i].Box = b3Solid vBeam[i].Box = b3Solid
end end
if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then
local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
'out of machine limits (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') '
BEAM.ERR = 17
BEAM.MSG = sOut
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
PostErrView( BEAM.ERR, BEAM.MSG)
return
end
end end
-- Assegno lunghezza della barra -- Assegno lunghezza della barra
dBarLen = vBeam[1].Box:getDimX() + 10 dBarLen = vBeam[1].Box:getDimX() + 10
@@ -330,6 +339,15 @@ if bToProcess then
else else
vBeam[i].Box = b3Solid vBeam[i].Box = b3Solid
end end
if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then
local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
'out of machine limits (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') '
BEAM.ERR = 17
BEAM.MSG = sOut
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
PostErrView( BEAM.ERR, BEAM.MSG)
return
end
end end
end end
+25 -7
View File
@@ -443,7 +443,7 @@ local function CalcHeadTailMachBeforeIntersDrillings( vProc, b3Raw)
for i = 1, #vProc do for i = 1, #vProc do
local Proc = vProc[i] local Proc = vProc[i]
if Proc.Box and not Proc.Box:isEmpty() then if Proc.Box and not Proc.Box:isEmpty() then
if Proc.Fct == 1 and BL.IsFeatureCuttingEntireSection( Proc.Box, b3Raw:getDimY(), b3Raw:getDimZ()) and ( Proc.Head or Proc.Tail) and Proc.Prc ~= 350 then if Proc.Fct == 1 and ( BL.IsFeatureCuttingEntireSection( Proc.Box, b3Raw:getDimY(), b3Raw:getDimZ()) or Cut.Identify( Proc)) and ( Proc.Head or Proc.Tail) and Proc.Prc ~= 350 then
if Proc.Head and Proc.Box:getCenter():getX() < dHeadX then if Proc.Head and Proc.Box:getCenter():getX() < dHeadX then
dHeadX = Proc.Box:getCenter():getX() dHeadX = Proc.Box:getCenter():getX()
nHeadId = Proc.Id nHeadId = Proc.Id
@@ -915,6 +915,22 @@ local function ReorderFeatureWithDependency( vProc)
table.insert( vProc, nRefIndex, table.remove( vProc, i)) table.insert( vProc, nRefIndex, table.remove( vProc, i))
i = max( nRefIndex - 1, 1) i = max( nRefIndex - 1, 1)
end end
elseif Drill.Identify( vProc[i]) and vProc[i].Dependency and vProc[i].Dependency.ExecAfter and vProc[i].Dependency.ExecAfter.Id then
local nRefId = vProc[i].Dependency.ExecAfter.Id
local nRefIndex
for j = 1, #vProc do
if i ~= j and vProc[j].Id == nRefId then
nRefIndex = j
break
end
end
-- se il processo deve stare dopo, ma ora è prima
if nRefIndex and nRefIndex > i then
table.insert( vProc, nRefIndex, table.remove( vProc, i))
i = max( nRefIndex - 1, 1)
end
end end
i = i + 1 i = i + 1
end end
@@ -980,12 +996,12 @@ local function OrderFeatures( vProc, b3Raw, nPartId)
return true return true
end end
-- se primo è foro e secondo è un ribasso o tenone, il foro va sempre prima a meno che il ribasso non sia di testa -- 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 B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
return true return true
end 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 -- 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 B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
return false return false
end end
@@ -1641,7 +1657,8 @@ local function SetCutsOnFrontMortises( vProc)
-- verifico se i piani coincidono -- verifico se i piani coincidono
local bSamePlane = ( ptC1 and vtN1 and ptC2 and vtN2 and AreSameVectorApprox( vtN1, vtN2) and ( ptC2 - ptC1) * vtN1 < 1.0) local bSamePlane = ( ptC1 and vtN1 and ptC2 and vtN2 and AreSameVectorApprox( vtN1, vtN2) and ( ptC2 - ptC1) * vtN1 < 1.0)
if bSamePlane then if bSamePlane then
vProc[i].CutFront = vProc[j].Id --vProc[i].CutFront = vProc[j].Id
vProc[j].bSkipCut = true
end end
-- log -- log
local sMsg = string.format( 'Cut %d meet Mortise %d', vProc[i].Id, vProc[j].Id) .. EgtIf( bSamePlane, ' with same plane', '') local sMsg = string.format( 'Cut %d meet Mortise %d', vProc[i].Id, vProc[j].Id) .. EgtIf( bSamePlane, ' with same plane', '')
@@ -1658,7 +1675,8 @@ local function SetCutsOnFrontMortises( vProc)
-- verifico se i piani coincidono -- verifico se i piani coincidono
local bSamePlane = ( ptC1 and vtN1 and ptC2 and vtN2 and AreSameVectorApprox( vtN1, vtN2) and ( ptC2 - ptC1) * vtN1 < 1.0) local bSamePlane = ( ptC1 and vtN1 and ptC2 and vtN2 and AreSameVectorApprox( vtN1, vtN2) and ( ptC2 - ptC1) * vtN1 < 1.0)
if bSamePlane then if bSamePlane then
vProc[i].CutFront = vProc[j].Id --vProc[i].CutFront = vProc[j].Id
vProc[j].bSkipCut = true
end end
-- log -- log
local sMsg = string.format( 'Cut %d meet DtMortise %d', vProc[i].Id, vProc[j].Id) .. EgtIf( bSamePlane, ' with same plane', '') local sMsg = string.format( 'Cut %d meet DtMortise %d', vProc[i].Id, vProc[j].Id) .. EgtIf( bSamePlane, ' with same plane', '')
@@ -2209,8 +2227,8 @@ function GetFeatureInfoAndDependency( vProc, b3Raw, nPartId)
and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) and DtMortise.IsDeeper( ProcB, b3Raw) then and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) and DtMortise.IsDeeper( ProcB, b3Raw) then
Proc.PassedByDtMortise = true Proc.PassedByDtMortise = true
end end
-- se tenone è attraversato da foro allora il foro deve essere fatto prima -- se tenone o ScarfJoint sono attraversati da foro allora il foro deve essere fatto prima
if Tenon.Identify( Proc) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then if ( Tenon.Identify( Proc) or ScarfJoint.Identify( Proc)) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
Proc.PassedByHole = true Proc.PassedByHole = true
end end
-- se taglio attraversato da foro, si definisce precedenza in base ad angolo -- se taglio attraversato da foro, si definisce precedenza in base ad angolo
+29 -12
View File
@@ -1307,29 +1307,46 @@ function BeamLib.GetFacetsInfo( Proc, b3Raw)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function BeamLib.GetEdgesInfo( Proc, Face) function BeamLib.GetEdgesInfo( ProcOrId, FaceId)
-- disambiguazione feature vs id trimesh
local Proc = {}
if type( ProcOrId) == "table" then
Proc = ProcOrId
elseif type( ProcOrId) == "number" then
Proc.Id = ProcOrId
else
error( 'GetEdgesInfo : Only feature or trimesh supported')
end
local Edges = {} local Edges = {}
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT) local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, FaceId, GDB_ID.ROOT)
if nFaceType < 1 then if nFaceType < 1 then
for j = 1, #vEdges do for i = 1, #vEdges do
local nPreviousEdgeIndex = j - 1 local nPreviousEdgeIndex = i - 1
if j == 1 then if i == 1 then
nPreviousEdgeIndex = #vEdges nPreviousEdgeIndex = #vEdges
end end
local nNextEdgeIndex = j + 1 local nNextEdgeIndex = i + 1
if j == #vEdges then if i == #vEdges then
nNextEdgeIndex = 1 nNextEdgeIndex = 1
end end
local CurrentEdge = {} local CurrentEdge = {}
CurrentEdge.AdjacentFaceId = vEdges[j].Adj CurrentEdge.AdjacentFaceId = vEdges[i].Adj
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm) CurrentEdge.ToolDirection = Vector3d( vEdges[i].Norm)
CurrentEdge.Length = vEdges[j].Len CurrentEdge.Length = vEdges[i].Len
CurrentEdge.Elevation = vEdges[j].Elev CurrentEdge.Elevation = vEdges[i].Elev
CurrentEdge.IsOpen = vEdges[j].Open CurrentEdge.IsOpen = vEdges[i].Open
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open) CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open) CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
CurrentEdge.ptStart = Point3d( vEdges[i].Start)
CurrentEdge.ptEnd = Point3d( vEdges[nNextEdgeIndex].Start)
CurrentEdge.vtEdge = CurrentEdge.ptEnd - CurrentEdge.ptStart ; CurrentEdge.vtEdge:normalize()
CurrentEdge.Id = i - 1
CurrentEdge.PreviousEdgeIndex = nPreviousEdgeIndex
CurrentEdge.NextEdgeIndex = nNextEdgeIndex
table.insert( Edges, CurrentEdge) table.insert( Edges, CurrentEdge)
end end
+1
View File
@@ -409,6 +409,7 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
if nActiveHead == 0 then if nActiveHead == 0 then
return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams) return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams)
-- verifico se posso usare lo stesso utensile della testa attiva -- verifico se posso usare lo stesso utensile della testa attiva
--TODO - se arrivano altri ticket come 3044, valutare rimozione controllo nActiveHead e usare l'utensile già caricato anche se non è sulla testa attiva (ultima utilizzata)
elseif ( nActiveHead == 1 and not bH2 and sToolName == H1_TOOL) or ( nActiveHead == 2 and bH2 and sToolName == H2_TOOL) then elseif ( nActiveHead == 1 and not bH2 and sToolName == H1_TOOL) or ( nActiveHead == 2 and bH2 and sToolName == H2_TOOL) then
-- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo, a meno che non siano entrambi grandi (truciolatori) -- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo, a meno che non siano entrambi grandi (truciolatori)
if ( not sH1Param or not sH1Param.TDiam or ( sH1Param.TDiam < 75 and ToolParams.TDiam < 75 and sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam)) and ( not sH2Param or not sH2Param.TDiam or ( sH2Param.TDiam < 75 and ToolParams.TDiam < 75 and sH2Param.TDiam < 1.25 * ToolParams.TDiam)) then if ( not sH1Param or not sH1Param.TDiam or ( sH1Param.TDiam < 75 and ToolParams.TDiam < 75 and sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam)) and ( not sH2Param or not sH2Param.TDiam or ( sH2Param.TDiam < 75 and ToolParams.TDiam < 75 and sH2Param.TDiam < 1.25 * ToolParams.TDiam)) then
+48 -1
View File
@@ -479,12 +479,16 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
-- determino il modo di tagliare -- determino il modo di tagliare
local vtOrthoO local vtOrthoO
local bNoPerpCuts = false local bNoPerpCuts = false
local vtO
-- Se tagli ortogonali (indice dispari)
if i % 2 == 1 then if i % 2 == 1 then
vtOrthoO = Vector3d( vtN) vtOrthoO = Vector3d( vtN)
-- Se tagli perpendicolari (indice pari)
else else
local vtO -- Se elemento precedente contiene tagli ortogonali
if #vCuts[i-1] > 0 then if #vCuts[i-1] > 0 then
vtO = EgtSurfTmFacetNormVersor( vCuts[i-1][1], 0, GDB_ID.ROOT) vtO = EgtSurfTmFacetNormVersor( vCuts[i-1][1], 0, GDB_ID.ROOT)
-- Se elemento successivo contiene tagli ortogonali
elseif vCuts[i+1] and #vCuts[i+1] > 0 then elseif vCuts[i+1] and #vCuts[i+1] > 0 then
-- lunghezza faccia nell'eventuale direzione ortogonale -- lunghezza faccia nell'eventuale direzione ortogonale
local asseX = EgtSurfTmFacetNormVersor( vCuts[i+1][1], 0, GDB_ID.ROOT) local asseX = EgtSurfTmFacetNormVersor( vCuts[i+1][1], 0, GDB_ID.ROOT)
@@ -552,8 +556,51 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
end end
local bOk2, sErr2 = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut2, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw) local bOk2, sErr2 = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut2, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw)
if not bOk2 then return false, sErr2 end if not bOk2 then return false, sErr2 end
-- caso standard -- caso standard
else else
-- se necessario aggiungo tagli obliqui per cubettare pezzi lunghi che potrebbero cadere sul motore
if ( i % 2) == 0 and Proc.Fct == 1 and AreSameOrOppositeVectorApprox( vtO, Z_AX()) then
local vtOrthoVert = vtN ^ vtO
-- inverte direzione superfici per corretta direzione SCC
if ( vtN:getY() > 0 and vtOrthoVert:getY() > 0) or ( vtN:getY() < 0 and vtOrthoVert:getY() < 0) then
vtOrthoVert = -vtOrthoVert
end
local Frame = Frame3d( ptC, vtN, vtO)
local b3Fac = EgtGetBBoxRef( vCuts[i][1], GDB_BB.STANDARD, Frame)
-- se cubetto più grande di MAX_DIM_DICE
if abs( b3Fac:getDimY() - BD.MAX_DIM_DICE) > 10 * GEO.EPS_SMALL then
local nVerticalCuts = ceil( b3Fac:getDimY() / ( BD.MAX_LEN_DICE)) - 1
local dVerticalSliceDist = b3Fac:getDimY() / ( nVerticalCuts + 1)
-- selezione utensile
local dSawDiam = 400
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
end
end
-- crea faccia per tagli verticali e le taglia a dimensione corretta
for k = 1, nVerticalCuts do
local nFaceUse = BL.GetNearestOrthoOpposite( vtN)
local dVerticalCutOffset = dVerticalSliceDist * k
local sLeadInOutType = 'Perpendicular'
local nMergedParallelSurfId = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
local ptVertCut = EgtSurfTmFacetCenter( nMergedParallelSurfId, 0, GDB_ID.ROOT)
ptVertCut = ptVertCut + ( -b3Fac:getDimY()/2 + dVerticalCutOffset) * vtOrthoVert
local nSurfId = EgtSurfTmPlaneInBBox( nAddGrpId, ptVertCut, vtOrthoVert, b3Raw, GDB_RT.GLOB)
-- se non è il primo taglio parallelo taglia anche le superfici con la faccia parallela precedente
if i ~= 2 then
local nMergedPreviousParallelSurfId = EgtSurfTmBySewing( nAddGrpId, vCuts[i-2], false)
local ptOnPreviousParallelSurf = EgtSurfTmFacetCenter( nMergedPreviousParallelSurfId, 0, GDB_ID.ROOT)
EgtCutSurfTmPlane( nSurfId, ptOnPreviousParallelSurf, vtN, false, GDB_RT.GLOB)
end
EgtCutSurfTmPlane( nSurfId, ptVertCut, -vtN, false, GDB_RT.GLOB)
local bOk, sErr = Fbs.MakeOne( nSurfId, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1, BD.CUT_SIC, 0, 0, 0, '', b3Raw, nil, nil, nil, sLeadInOutType, nil, 0, nil)
if not bOk then return bOk, sErr end
end
end
end
-- lavoro la faccia -- lavoro la faccia
for j = 1, #vCuts[i] do for j = 1, #vCuts[i] do
-- se taglio dal basso -- se taglio dal basso
+11 -4
View File
@@ -348,6 +348,11 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if EgtGetInfo( Proc.Id, 'Q04', 'i') == 1 then if EgtGetInfo( Proc.Id, 'Q04', 'i') == 1 then
return FreeContour.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) return FreeContour.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end end
-- verifico se macchina configurata per avere le nuove svuotature in doppio
local sIniMachFile = EgtGetCurrMachineDir()..'\\'..EgtGetCurrMachineName()..'.ini'
local dPockDoubleNTActive = ( EgtGetStringFromIni( 'Machinings', 'PocketingDoubleNT', '0', sIniMachFile) == '1')
-- default per costanti -- default per costanti
BD.DRILL_VX_MAX_ANGLEDRILL = ( BD.DRILL_VX_MAX_ANGLEDRILL or 0.928) BD.DRILL_VX_MAX_ANGLEDRILL = ( BD.DRILL_VX_MAX_ANGLEDRILL or 0.928)
-- ingombro del pezzo -- ingombro del pezzo
@@ -594,8 +599,10 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local dHoleToCutDistance = vDistance[1] local dHoleToCutDistance = vDistance[1]
-- se il taglio accorcia realmente il foro -- se il taglio accorcia realmente il foro
if ( dHoleToCutDistance > 10 * GEO.EPS_SMALL or Proc.AffectedFaces.Right) and dHoleToCutDistance < dLen then if ( dHoleToCutDistance > 10 * GEO.EPS_SMALL or Proc.AffectedFaces.Right) and dHoleToCutDistance < dLen then
local dToolTipFromCenterDrill = ( ( dDiam / 2) - ( dToolDiam / 2))
local dExtraSicDistFromThToTiltedCut = sqrt( ( dToolTipFromCenterDrill / CosB)^2 - dToolTipFromCenterDrill^2) + sqrt( ( ( dDiamTh / 2) / CosB)^2 - (dDiamTh / 2)^2)
dMaxDepth = dMaxDepthOri dMaxDepth = dMaxDepthOri
dMaxElev = dLen - dHoleToCutDistance dMaxElev = dLen - ( dHoleToCutDistance - dExtraSicDistFromThToTiltedCut)
bTryDrill = true bTryDrill = true
local dToolAddLength = dLen - dMaxElev local dToolAddLength = dLen - dMaxElev
-- se l'utensile è comunque troppo corto lavoro il massimo possibile -- se l'utensile è comunque troppo corto lavoro il massimo possibile
@@ -651,7 +658,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local dLastStepDepth local dLastStepDepth
if Proc.Double and Proc.Double > 0 then if Proc.Double and Proc.Double > 0 then
if ( sType == 'Pocket_AT' or sType == 'Pocket') then if ( sType == 'Pocket_AT' or sType == 'Pocket') then
if bOpen then if not dPockDoubleNTActive and bOpen then
local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10 local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10
dLastStepDepth = dDepth + dReduceDepth dLastStepDepth = dDepth + dReduceDepth
dDepth = dDepth - dReduceDepth dDepth = dDepth - dReduceDepth
@@ -660,7 +667,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end end
end end
else else
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15) sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10)
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'
@@ -721,7 +728,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sWarn return false, sWarn
else else
-- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step -- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step
if Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then if not dPockDoubleNTActive and Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then
if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then
sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
return false, sMyWarn return false, sMyWarn
+1 -1
View File
@@ -236,7 +236,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- verifico se frontale -- verifico se frontale
local bFront = ( Proc.Prc == 56) local bFront = ( Proc.Prc == 56)
-- se mortasa di fronte, eseguo il taglio della faccia -- se mortasa di fronte, eseguo il taglio della faccia
if bFront then if bFront and not Proc.bSkipCut then
-- verifico esista la faccia di taglio -- verifico esista la faccia di taglio
local ptCutC, vtCutN = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT) local ptCutC, vtCutN = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
if ptCutC and vtCutN and AreSameVectorApprox( vtExtr, vtCutN) then if ptCutC and vtCutN and AreSameVectorApprox( vtExtr, vtCutN) then
+435 -113
View File
@@ -1004,7 +1004,7 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Lavorazione con fresa -- Lavorazione con fresa
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId) local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId, nForcedFacInd, nSideInd)
-- recupero l'ingombro del grezzo di appartenenza -- recupero l'ingombro del grezzo di appartenenza
local b3Raw = EgtGetRawPartBBox( nRawId) local b3Raw = EgtGetRawPartBBox( nRawId)
-- recupero l'ingombro della trave -- recupero l'ingombro della trave
@@ -1015,13 +1015,16 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
return false, sErr return false, sErr
end end
-- verifico il numero di facce della tacca -- verifico il numero di facce della tacca
if not nForcedFacInd then
assert( ( Proc.Fct == 1), 'Error : MakeOneFaceByMill in LapJoint with ' .. tostring( Proc.Fct) .. ' faces') assert( ( Proc.Fct == 1), 'Error : MakeOneFaceByMill in LapJoint with ' .. tostring( Proc.Fct) .. ' faces')
nForcedFacInd = 0
end
-- dati della faccia -- dati della faccia
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT) local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nForcedFacInd, GDB_ID.ROOT)
-- verifico se orientata verso l'alto -- verifico se orientata verso l'alto
local bUp = ( vtN:getZ() >= BD.NZ_MINA) local bUp = ( vtN:getZ() >= BD.NZ_MINA)
-- scelta faccia da lavorare -- scelta faccia da lavorare
local nFacInd = 0 local nFacInd = nForcedFacInd
-- recupero la lavorazione -- recupero la lavorazione
local sMilling = ML.FindMilling( 'BirdsMouth') local sMilling = ML.FindMilling( 'BirdsMouth')
if not sMilling then if not sMilling then
@@ -1029,6 +1032,16 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
EgtOutLog( sErr) EgtOutLog( sErr)
return false, sErr return false, sErr
end end
local dTDiam = 50
local dMaxMat = 0
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
end
end
dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam
-- inserisco la lavorazione di fresatura -- inserisco la lavorazione di fresatura
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sMilling) local nMchFId = EgtAddMachining( sName, sMilling)
@@ -1039,8 +1052,17 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
end end
-- aggiungo geometria -- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nFacInd}}) EgtSetMachiningGeometry( {{ Proc.Id, nFacInd}})
-- imposto uso faccia e lato correzione -- imposto uso faccia e lato correzione se forzate da fuori forzo lavorazione della faccia
if vtN:getX() > 0 then if nSideInd and nForcedFacInd then
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.NONE)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, -dTDiam / 2)
EgtSetMachiningParam( MCH_MP.STARTADDLEN, -dTDiam / 2)
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'EdgesFaceUse', EgtNumToString( nSideInd))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
EgtSetMachiningParam( MCH_MP.LIPERP, dTDiam / 2)
EgtSetMachiningParam( MCH_MP.LOPERP, dTDiam / 2)
elseif vtN:getX() > 0 then
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_LEFT, MCH_MILL_FU.PARAL_LEFT)) EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_LEFT, MCH_MILL_FU.PARAL_LEFT))
else else
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_RIGHT, MCH_MILL_FU.PARAL_RIGHT)) EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_RIGHT, MCH_MILL_FU.PARAL_RIGHT))
@@ -1770,7 +1792,9 @@ 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 sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, not( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide) local bTopHead = not( 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)
@@ -1932,17 +1956,31 @@ 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
if vtN1:getZ() > 10 * GEO.EPS_SMALL then
bInvertTool = true
bInvertMach = true
end
elseif bMillDown and bDoubleSide then
if vtN1:getZ() > 10 * GEO.EPS_SMALL and bDownHead then
bInvertTool = true
bInvertMach = true
end
else
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale) -- 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 if vtN1:getZ() < BD.NZ_MINA and abs( vtN1:getZ()) >= 0.707 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) bInvertTool = true
bInvertMach = true bInvertMach = true
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti -- 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 elseif not bDoubleSide and vtN1:getY() > 10 * GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) bInvertTool = true
bInvertMach = 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
@@ -2017,7 +2055,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, true) EgtSetMachiningParam( MCH_MP.TOOLINVERT, not bInvertTool)
-- 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
@@ -2046,7 +2084,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 bInvert) EgtSetMachiningParam( MCH_MP.INVERT, not EgtIf( bInvertMach, not bInvert, 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)
@@ -2099,6 +2137,27 @@ local function MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3R
end end
end end
---------------------------------------------------------------------
local function CalcInterference( nNewProc, vtExtr, ptCentr, ToolData)
-- controllo collisione tagliente - finito
local ptCentrGrid1 = ptCentr + ( vtExtr * ( 10 * GEO.EPS_SMALL))
local frOriTool = Frame3d( ptCentrGrid1, vtExtr)
local bColl1 = EgtTestConeSurface( frOriTool, ToolData.dToolDiam/2, ToolData.dToolTotDiam/2, ToolData.dCutEdgeLen, nNewProc, 0, GDB_RT.GLOB)
if bColl1 then return true end
-- controllo collisione gambo - finito
local ptCentrGrid2 = ptCentr + ( vtExtr * ToolData.dCutEdgeLen)
frOriTool = Frame3d( ptCentrGrid2, vtExtr)
local bColl2 = EgtTestCylSurface( frOriTool, ( ToolData.dStemDiameter + ( 10 * GEO.EPS_SMALL)) / 2, ToolData.dStemLen, nNewProc, 0, GDB_RT.GLOB)
if bColl2 then return true end
-- controllo collisione TH - finito
local ptCentrGrid3 = ptCentr + ( vtExtr * ( ToolData.dCutEdgeLen + ToolData.dStemLen))
frOriTool = Frame3d( ptCentrGrid3, vtExtr)
local bColl3 = EgtTestCylSurface( frOriTool, ToolData.dDiamTh/2, ToolData.dLenTh, nNewProc, 0, GDB_RT.GLOB)
if bColl3 then return true end
-- restituisco risultato controllo collisioni
return false
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacInd, nAddGrpId, dDiam) local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacInd, nAddGrpId, dDiam)
@@ -2111,6 +2170,43 @@ local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacI
local sMilling local sMilling
local dMaxDepth = 0 local dMaxDepth = 0
-- recupero la lavorazione non calcolando l'elevazione
sMilling = ML.FindMilling( 'CleanCorner', ( 0.5 * dDiam))
if not sMilling then
local sErr = 'Error : CleanCorner not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- recupero i dati dell'utensile
local ToolData = {
dToolTotDiam = 20,
dToolDiam = 20,
dSideAng = 0,
dCutEdgeLen = 20,
dToolLength = 20,
dStemDiameter = 20,
dStemLen = 20,
dDiamTh = 20,
dLenTh = 20
}
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
ToolData.dToolTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) or ToolData.dToolTotDiam
ToolData.dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or ToolData.dToolDiam
ToolData.dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or ToolData.dSideAng
ToolData.dCutEdgeLen = abs( EgtTdbGetCurrToolParam( MCH_TP.THICK)) or ToolData.dCutEdgeLen
ToolData.dToolLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or ToolData.dToolLength
ToolData.dStemDiameter = EgtTdbGetCurrToolParam( MCH_TP.STEMDIAM) or ToolData.dStemDiameter
ToolData.dDiamTh = EgtTdbGetCurrToolThDiam() or ToolData.dDiamTh
ToolData.dLenTh = EgtTdbGetCurrToolThLength() or ToolData.dLenTh
-- calcolo il secondo diametro del cono
ToolData.dToolTotDiam = ToolData.dToolDiam + ( abs( ToolData.dCutEdgeLen) * tan( ToolData.dSideAng)) * 2
ToolData.dStemLen = ToolData.dToolLength - ToolData.dCutEdgeLen - ToolData.dLenTh
end
end
-- cerco l'angolo di riferimento dove applicare il percorso di pulitura, altrimenti esco -- cerco l'angolo di riferimento dove applicare il percorso di pulitura, altrimenti esco
local _, nIdLine, tFacAdj = ChooseCorner( Proc, nFacInd) local _, nIdLine, tFacAdj = ChooseCorner( Proc, nFacInd)
if #tFacAdj == 0 then if #tFacAdj == 0 then
@@ -2136,6 +2232,8 @@ local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacI
-- versore direzione -- versore direzione
local vtExtr = tFacAdj[nIdLine][nIdIniPoint] - tFacAdj[nIdLine][nIdEndPoint] local vtExtr = tFacAdj[nIdLine][nIdIniPoint] - tFacAdj[nIdLine][nIdEndPoint]
vtExtr:normalize() vtExtr:normalize()
-- versore direzione di uscita
local vtExtrExit
-- inserisco le prime tre linee -- inserisco le prime tre linee
if nIdIniPoint and nIdEndPoint then if nIdIniPoint and nIdEndPoint then
-- se fresatura da sotto salto la lavorazione -- se fresatura da sotto salto la lavorazione
@@ -2144,16 +2242,24 @@ local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacI
EgtOutLog( sErr) EgtOutLog( sErr)
return false, sErr return false, sErr
end end
-- sommo i tre versori per avre una direzione media -- sommo i tre versori per avere una direzione media
vtExtr = vtN1 + vtN2 + vtN3 vtExtrExit = vtN2 + vtN3
vtExtrExit:normalize()
-- calcolo la componente Z dipendente dall'angolo tilt
local dAlfa = EgtClamp( ToolData.dSideAng, 15, 30)
local dGamma = 90 - asin( sqrt( 2) * sin( dAlfa))
local dTanGamma = sin( dGamma) / cos( dGamma)
vtExtr = vtExtrExit + ( vtN2 ^ vtN3) * dTanGamma
vtExtr:normalize() vtExtr:normalize()
-- recupero la lavorazione non calcolando l'elevazione local vtCheck = Vector3d(vtExtr)
sMilling = ML.FindMilling( 'CleanCorner', ( 0.5 * dDiam))
if not sMilling then -- controllo se c'è collisione con le facce della superfice
local sErr = 'Error : CleanCorner not found in library' if CalcInterference( Proc.Id, vtCheck, tFacAdj[nIdLine][nIdEndPoint], ToolData) then
local sErr = 'Collision detected between clean corner tool and surface'
EgtOutLog( sErr) EgtOutLog( sErr)
return false, sErr return true, ''
end end
-- recupero i dati dell'utensile ( temporaneo, per compensare errore nella lavorazione) -- recupero i dati dell'utensile ( temporaneo, per compensare errore nella lavorazione)
if EgtMdbSetCurrMachining( sMilling) then if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
@@ -3480,7 +3586,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
-- se necessario, avverto limitazione dell'affondamento -- se necessario, avverto limitazione dell'affondamento
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel then if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel then
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1]) local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1].Id)
local dWorkEdgeWidth local dWorkEdgeWidth
for i = 1, #Edges do for i = 1, #Edges do
if Edges[i].AdjacentFaceId == nFacInd then if Edges[i].AdjacentFaceId == nFacInd then
@@ -3611,7 +3717,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
EgtSetMachiningParam( MCH_MP.DEPTH, dMachiningDepth) EgtSetMachiningParam( MCH_MP.DEPTH, dMachiningDepth)
-- si decidono lato di lavoro, inversione e estensione in base al lato aperto -- si decidono lato di lavoro, inversione e estensione in base al lato aperto
local nEdgeIndex = BL.GetEdgeToMachineFromVector( Proc.Id, nFacAdj, vtRef) local nEdgeIndex = BL.GetEdgeToMachineFromVector( Proc.Id, nFacAdj, vtRef)
local EdgesEgt = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1]) local EdgesEgt = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1].Id)
local CurrentEdge = EdgesEgt[nEdgeIndex+1] local CurrentEdge = EdgesEgt[nEdgeIndex+1]
local dStartAddLen = 0 local dStartAddLen = 0
local dEndAddLen = 0 local dEndAddLen = 0
@@ -3962,7 +4068,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
-- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente -- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente
local dDiffFromSqAng = dAng + 90 local dDiffFromSqAng = dAng + 90
-- informazioni sul lato da lavorare -- informazioni sul lato da lavorare
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nSideFace + 1]) local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nSideFace + 1].Id)
local EdgeToMachine = {} local EdgeToMachine = {}
for i = 1, #Edges do for i = 1, #Edges do
local CurrentEdge = Edges[i] local CurrentEdge = Edges[i]
@@ -4493,21 +4599,25 @@ 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
-- setto i parametri affondamento ed emetto warning -- setto i parametri affondamento ed emetto warning
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
-- inserisco la lavorazione di contornatura -- inserisco la lavorazione di contornatura
sName = 'ProfOppo_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) sName = 'ProfOppo_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
@@ -4699,7 +4809,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
end end
end end
end end
return 1, sWarn, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId return 1, sWarn, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, nil, sPocketing
end end
end end
end end
@@ -4732,6 +4842,16 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
local dSawThick = 0 local dSawThick = 0
local dMaxDepth = 200 local dMaxDepth = 200
local bAdj, dAng, dExtraOffs, sWarn2, nIdMach local bAdj, dAng, dExtraOffs, sWarn2, nIdMach
-- Se faccia sulla quale cerca di applicare l'antisplint è chiusa e limitata da altre facce non lo applica
local FacetEdge = BL.GetEdgesInfo( Proc, Proc.Face[nFacet+1].Id)
for nEdge = 1, #FacetEdge do
if AreSameVectorApprox( FacetEdge[nEdge].ToolDirection, vtN) and ( not FacetEdge[nEdge].IsStartOpen or not FacetEdge[nEdge].IsEndOpen) and not FacetEdge[nEdge].IsOpen then
sWarn2 = 'Warning : antisplint not applicable on closed face'
if not sWarn then sWarn = '' end
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
return bMadeASbyBld, true, sWarn
end
end
bMadeASbyBld, sWarn2, nIdMach, dSawThick, dMaxDepth, bAdj, dAng, dExtraOffs = MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw, nFacInd, bReduceDepth, bMillDown) bMadeASbyBld, sWarn2, nIdMach, dSawThick, dMaxDepth, bAdj, dAng, dExtraOffs = MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw, nFacInd, bReduceDepth, bMillDown)
if not bMadeASbyBld then return bMadeASbyBld, false, sWarn2 end if not bMadeASbyBld then return bMadeASbyBld, false, sWarn2 end
if sWarn2 then if sWarn2 then
@@ -4794,6 +4914,30 @@ 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
@@ -5455,25 +5599,31 @@ function SawPlusChain.GetBottomFaceEdges( Proc, Face)
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT) local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
if nFaceType < 1 then if nFaceType < 1 then
for j = 1, #vEdges do for i = 1, #vEdges do
local nPreviousEdgeIndex = j - 1 local nPreviousEdgeIndex = i - 1
if j == 1 then if i == 1 then
nPreviousEdgeIndex = #vEdges nPreviousEdgeIndex = #vEdges
end end
local nNextEdgeIndex = j + 1 local nNextEdgeIndex = i + 1
if j == #vEdges then if i == #vEdges then
nNextEdgeIndex = 1 nNextEdgeIndex = 1
end end
local CurrentEdge = {} local CurrentEdge = {}
CurrentEdge.AdjacentFaceId = vEdges[j].Adj CurrentEdge.AdjacentFaceId = vEdges[i].Adj
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm) CurrentEdge.ToolDirection = Vector3d( vEdges[i].Norm)
CurrentEdge.Length = vEdges[j].Len CurrentEdge.Length = vEdges[i].Len
CurrentEdge.Elevation = vEdges[j].Elev CurrentEdge.Elevation = vEdges[i].Elev
CurrentEdge.IsOpen = vEdges[j].Open CurrentEdge.IsOpen = vEdges[i].Open
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open) CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open) CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
CurrentEdge.Id = j - 1 CurrentEdge.Id = i - 1
CurrentEdge.ptStart = Point3d( vEdges[i].Start)
CurrentEdge.ptEnd = Point3d( vEdges[nNextEdgeIndex].Start)
CurrentEdge.vtEdge = CurrentEdge.ptEnd - CurrentEdge.ptStart ; CurrentEdge.vtEdge:normalize()
CurrentEdge.Id = i - 1
CurrentEdge.PreviousEdgeIndex = nPreviousEdgeIndex
CurrentEdge.NextEdgeIndex = nNextEdgeIndex
if CurrentEdge.AdjacentFaceId == Proc.MainFaces.LongFace.Id then if CurrentEdge.AdjacentFaceId == Proc.MainFaces.LongFace.Id then
table.insert( Edges.LongEdges, CurrentEdge) table.insert( Edges.LongEdges, CurrentEdge)
@@ -5501,25 +5651,30 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face)
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT) local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
if nFaceType < 1 then if nFaceType < 1 then
for j = 1, #vEdges do for i = 1, #vEdges do
local nPreviousEdgeIndex = j - 1 local nPreviousEdgeIndex = i - 1
if j == 1 then if i == 1 then
nPreviousEdgeIndex = #vEdges nPreviousEdgeIndex = #vEdges
end end
local nNextEdgeIndex = j + 1 local nNextEdgeIndex = i + 1
if j == #vEdges then if i == #vEdges then
nNextEdgeIndex = 1 nNextEdgeIndex = 1
end end
local CurrentEdge = {} local CurrentEdge = {}
CurrentEdge.AdjacentFaceId = vEdges[j].Adj CurrentEdge.AdjacentFaceId = vEdges[i].Adj
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm) CurrentEdge.ToolDirection = Vector3d( vEdges[i].Norm)
CurrentEdge.Length = vEdges[j].Len CurrentEdge.Length = vEdges[i].Len
CurrentEdge.Elevation = vEdges[j].Elev CurrentEdge.Elevation = vEdges[i].Elev
CurrentEdge.IsOpen = vEdges[j].Open CurrentEdge.IsOpen = vEdges[i].Open
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open) CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open) CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
CurrentEdge.Id = j - 1 CurrentEdge.ptStart = Point3d( vEdges[i].Start)
CurrentEdge.ptEnd = Point3d( vEdges[nNextEdgeIndex].Start)
CurrentEdge.vtEdge = CurrentEdge.ptEnd - CurrentEdge.ptStart ; CurrentEdge.vtEdge:normalize()
CurrentEdge.Id = i - 1
CurrentEdge.PreviousEdgeIndex = nPreviousEdgeIndex
CurrentEdge.NextEdgeIndex = nNextEdgeIndex
if Proc.Topology == 'Tunnel' then if Proc.Topology == 'Tunnel' then
if CurrentEdge.AdjacentFaceId > -1 then if CurrentEdge.AdjacentFaceId > -1 then
@@ -5551,7 +5706,7 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face)
end end
function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine) function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachine, b3Raw)
-- 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
@@ -5602,6 +5757,18 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine)
LeadIn.StartAddLength = BD.CUT_EXTRA LeadIn.StartAddLength = BD.CUT_EXTRA
LeadOut.EndAddLength = BD.CUT_EXTRA LeadOut.EndAddLength = BD.CUT_EXTRA
end end
local ptP1 = Point3d( EdgeToMachine.ptStart)
local ptP2 = Point3d( EdgeToMachine.ptEnd)
local bInvert = Machining.Invert
if bInvert then
ptP1, ptP2 = ptP2, ptP1
vtV1, vtV2 = vtV2, vtV1
end
local vtTg = ptP2 - ptP1 ; vtTg:normalize()
Machining.vtTg = vtTg
Machining.vtV = vtV1
else else
if Machining.IsStartClosed then if Machining.IsStartClosed then
LeadIn.StartAddLength = -dAddLengthToReduce LeadIn.StartAddLength = -dAddLengthToReduce
@@ -5714,9 +5881,28 @@ 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
-- 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 if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then
nSCC = MCH_SCC.ADIR_ZP nSCC = MCH_SCC.ADIR_ZP
elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then
@@ -5730,16 +5916,17 @@ function SawPlusChain.Saw.GetSCC( vtMachiningDirection)
elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then
nSCC = MCH_SCC.ADIR_XM nSCC = MCH_SCC.ADIR_XM
end end
end
return nSCC return nSCC
end end
function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, EdgeToMachine) function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, EdgeToMachine, b3Raw)
local Cutting = {} local Cutting = {}
Cutting.CanApply = true Cutting.CanApply = true
Cutting.Message = '' Cutting.Message = ''
Cutting.ProcId = Proc.Id Cutting.ProcId = Proc.Id
EdgeToMachine.FaceId = FaceToMachine.Id
local dPocketHeight = 0 local dPocketHeight = 0
if Proc.Topology == 'Tunnel' then if Proc.Topology == 'Tunnel' then
@@ -5851,15 +6038,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) 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
@@ -5893,10 +6080,10 @@ 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 dOriginalRadialOffset = Cutting.RadialOffset local dOriginalRadialOffset = Cutting.RadialOffset
local dOriginalLeadInPerpDistance = Cutting.LeadIn.PerpDistance local dOriginalLeadInPerpDistance = Cutting.LeadIn.PerpDistance
local dOriginalLeadOutPerpDistance = Cutting.LeadOut.PerpDistance local dOriginalLeadOutPerpDistance = Cutting.LeadOut.PerpDistance
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)
-- update distanza perpendicolare attacco per contemplare l'offset applicato -- update distanza perpendicolare attacco per contemplare l'offset applicato
@@ -6143,9 +6330,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
-- lavorazione di lama - fondo della tasca o fino a massimo materiale se tunnel -- lavorazione di lama - fondo della tasca o fino a massimo materiale se tunnel
local Cutting = {} local Cutting = {}
if Proc.Topology == 'Tunnel' then if Proc.Topology == 'Tunnel' then
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[1]) Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[1], b3Raw)
else else
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.BottomEdge) Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.BottomEdge, b3Raw)
end end
local bIsCuttingOk = false local bIsCuttingOk = false
if Cutting.CanApply then if Cutting.CanApply then
@@ -6157,7 +6344,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
local dBottomDepthToMachine = Cutting.RadialOffset local dBottomDepthToMachine = Cutting.RadialOffset
-- lato opposto del tunnel -- lato opposto del tunnel
if Proc.Topology == 'Tunnel' then if Proc.Topology == 'Tunnel' then
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[2]) Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[2], b3Raw)
bIsCuttingOk = false bIsCuttingOk = false
if Cutting.CanApply then if Cutting.CanApply then
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw) bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
@@ -6170,7 +6357,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
if Cutting.CanApply and Cutting.RadialOffset > 10 * GEO.EPS_SMALL then if Cutting.CanApply and Cutting.RadialOffset > 10 * GEO.EPS_SMALL then
-- eventuale lavorazione di lama - lato della tasca da cui inizia la lavorazione -- eventuale lavorazione di lama - lato della tasca da cui inizia la lavorazione
if Proc.MainFaces.LongFace.Edges.BottomEdge.IsStartOpen then if Proc.MainFaces.LongFace.Edges.BottomEdge.IsStartOpen then
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.StartEdge) Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.StartEdge, b3Raw)
bIsCuttingOk = false bIsCuttingOk = false
if Cutting.CanApply then if Cutting.CanApply then
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw) bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
@@ -6181,7 +6368,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
end end
-- eventuale lavorazione di lama - lato della tasca in cui finisce la lavorazione -- eventuale lavorazione di lama - lato della tasca in cui finisce la lavorazione
if Proc.MainFaces.LongFace.Edges.BottomEdge.IsEndOpen then if Proc.MainFaces.LongFace.Edges.BottomEdge.IsEndOpen then
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.EndEdge) Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.EndEdge, b3Raw)
bIsCuttingOk = false bIsCuttingOk = false
if Cutting.CanApply then if Cutting.CanApply then
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw) bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
@@ -6283,24 +6470,6 @@ local function ReorderFacesFromTab( nIdSurf, vFace)
return nIdSurf return nIdSurf
end end
---------------------------------------------------------------------
local function CalcInterference( nNewProc, vtExtr, ptCentr, dDiam1, dDiam2,
dTall1, dTall2, dDiam3, dTall3)
local ptCentrGrid1 = ptCentr + ( vtExtr * 0.01)
local frOriTool = Frame3d( ptCentrGrid1, vtExtr)
local bColl1 = EgtTestConeSurface( frOriTool, dDiam1/2, dDiam2/2, dTall1, nNewProc, 0, GDB_RT.GLOB)
if bColl1 then return true end
local ptCentrGrid2 = ptCentr + ( vtExtr * ( dTall1 + 0.01))
frOriTool = Frame3d( ptCentrGrid2, vtExtr)
local bColl2 = EgtTestCylSurface( frOriTool, dDiam2/2, dTall2, nNewProc, 0, GDB_RT.GLOB)
if bColl2 then return true end
local ptCentrGrid3 = ptCentr + ( vtExtr * ( dTall2 + 0.01))
frOriTool = Frame3d( ptCentrGrid3, vtExtr)
local bColl3 = EgtTestCylSurface( frOriTool, dDiam3/2, dTall3, nNewProc, 0, GDB_RT.GLOB)
if bColl3 then return true end
-- restituisco risultato controllo collisioni
return false
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function MakeLocalSurf( ptP1, ptP2, ptP3, nAddGrpId) local function MakeLocalSurf( ptP1, ptP2, ptP3, nAddGrpId)
@@ -6331,8 +6500,7 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nAddGrpId, local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
dToolDiam, sMilling, dOffsAng, dToolDiam, sMilling, dOffsAng,
dDiam1, dDiam2, dTall1, ToolData, bMakeLocSurf, vFace, vtN)
dTall2, dDiam3, dTall3, bMakeLocSurf, vFace, vtN)
-- variabili costruzione geometria -- variabili costruzione geometria
local pAuxId = {} local pAuxId = {}
@@ -6412,8 +6580,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nAdd
vtCheck:rotate( vtN, dOffsAng) vtCheck:rotate( vtN, dOffsAng)
end end
-- controllo se c'è collisione con le facce della superfice -- controllo se c'è collisione con le facce della superfice
if CalcInterference( nNewProc.Id, vtCheck, tFacAdj[nIdEndPoint], dDiam1, dDiam2, if CalcInterference( nNewProc.Id, vtCheck, tFacAdj[nIdEndPoint], ToolData) then
dTall1, dTall2, dDiam3, dTall3) then
local sErr = 'Collision detect from clean corner tool and surface' local sErr = 'Collision detect from clean corner tool and surface'
EgtOutLog( sErr) EgtOutLog( sErr)
return true, '' return true, ''
@@ -6561,32 +6728,39 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
-- se ripresa angolo con fresa cono 60° con ripresa -- se ripresa angolo con fresa cono 60° con ripresa
-- recupero la lavorazione di fresatura -- recupero la lavorazione di fresatura
sMilling, dMaxDepth = ML.FindMilling( 'CleanCorner60') sMilling, dMaxDepth = ML.FindMilling( 'CleanCorner')
if not sMilling then if not sMilling then
local sErr = 'Error : CleanCorner 60 not found in library' local sErr = 'Error : CleanCorner not found in library'
EgtOutLog( sErr) EgtOutLog( sErr)
return false, sErr return false, sErr
end end
-- recupero i dati dell'utensile -- recupero i dati dell'utensile
local dMillDiam = 20 local ToolData = {
local dMillTotDiam = 20 dToolTotDiam = 20,
local dMillDiamTh = 20 dToolDiam = 20,
local dToolLength = 20 dSideAng = 0,
local dThickTool = 20 dCutEdgeLen = 20,
local dSideAng = 0 dToolLength = 20,
dStemDiameter = 20,
dStemLen = 20,
dDiamTh = 20,
dLenTh = 20
}
if EgtMdbSetCurrMachining( sMilling) then if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh ToolData.dToolTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) or ToolData.dToolTotDiam
dMillTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) or dMillTotDiam ToolData.dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or ToolData.dToolDiam
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng ToolData.dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or ToolData.dSideAng
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam ToolData.dCutEdgeLen = abs( EgtTdbGetCurrToolParam( MCH_TP.THICK)) or ToolData.dCutEdgeLen
dThickTool = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dThickTool ToolData.dToolLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or ToolData.dToolLength
dToolLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dToolLength ToolData.dStemDiameter = EgtTdbGetCurrToolParam( MCH_TP.STEMDIAM) or ToolData.dStemDiameter
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth -- qui è la distanza dal portautensile ToolData.dDiamTh = EgtTdbGetCurrToolThDiam() or ToolData.dDiamTh
ToolData.dLenTh = EgtTdbGetCurrToolThLength() or ToolData.dLenTh
-- calcolo il secondo diametro del cono -- calcolo il secondo diametro del cono
dMillTotDiam = dMillDiam + ( abs(dThickTool) * tan(dSideAng)) * 2 ToolData.dToolTotDiam = ToolData.dToolDiam + ( abs( ToolData.dCutEdgeLen) * tan( ToolData.dSideAng)) * 2
ToolData.dStemLen = ToolData.dToolLength - ToolData.dCutEdgeLen - ToolData.dLenTh
end end
end end
-- copio la feature nel layer di appoggio -- copio la feature nel layer di appoggio
@@ -6623,12 +6797,15 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
-- aggiungo geometria -- aggiungo geometria
local j = EgtIf( i < #vFace, i + 1, EgtIf( bClosed, 1, nil)) local j = EgtIf( i < #vFace, i + 1, EgtIf( bClosed, 1, nil))
if not j then return true end if not j then return true end
if vFace[j].PPrev then
local nFace2 = vFace[j].Fac local nFace2 = vFace[j].Fac
-- punto in comune tra le due facce (punto precedente della faccia [j]) -- punto in comune tra le due facce (punto precedente della faccia [j])
ptLoc1 = vFace[j].PPrev ptLoc1 = vFace[j].PPrev
-- punto precedente (punto precedente della faccia [i]) -- punto precedente (punto precedente della faccia [i])
if vFace[i].PPrev then if vFace[i].PPrev then
ptLoc3 = vFace[i].PPrev ptLoc3 = vFace[i].PPrev
elseif vFace[i].PNoPrev then
ptLoc3 = vFace[i].PNoPrev
else else
if abs( vtN:getZ()) > abs( vtN:getY()) then if abs( vtN:getZ()) > abs( vtN:getY()) then
ptLoc3 = Point3d( vFace[i].Cen:getX(), vFace[i].Cen:getY(), ptLoc1:getZ()) ptLoc3 = Point3d( vFace[i].Cen:getX(), vFace[i].Cen:getY(), ptLoc1:getZ())
@@ -6640,13 +6817,23 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
local k = EgtIf( j < #vFace, j + 1, EgtIf( bClosed, 1, nil)) 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 -- se è un percorso aperto prendo il punto medio della seconda faccia come punto locale 2
if not k then if not k then
if abs( vtN:getZ()) > abs( vtN:getY()) then if vFace[j].PNoSucc then
ptLoc2 = vFace[j].PNoSucc
elseif abs( vtN:getZ()) > abs( vtN:getY()) then
ptLoc2 = Point3d( vFace[j].Cen:getX(), vFace[j].Cen:getY(), ptLoc1:getZ()) ptLoc2 = Point3d( vFace[j].Cen:getX(), vFace[j].Cen:getY(), ptLoc1:getZ())
else else
ptLoc2 = Point3d( vFace[j].Cen:getX(), ptLoc1:getY(), vFace[j].Cen:getZ()) ptLoc2 = Point3d( vFace[j].Cen:getX(), ptLoc1:getY(), vFace[j].Cen:getZ())
end end
else else
if vFace[j].PNoSucc then
ptLoc2 = vFace[j].PNoSucc
elseif vFace[k].PPrev then
ptLoc2 = vFace[k].PPrev 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 end
-- ricavo i punti e l'angolo interno -- ricavo i punti e l'angolo interno
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc.Id, nFace1, nFace2, GDB_ID.ROOT) local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc.Id, nFace1, nFace2, GDB_ID.ROOT)
@@ -6664,25 +6851,23 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
-- primo taglio -- primo taglio
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId, local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
dToolDiam, sMilling, -dAngOffs, dToolDiam, sMilling, -dAngOffs,
dMillDiam, dMillTotDiam, abs( dThickTool), ToolData, bMakeLocSurf, vFace, vtN)
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace, vtN)
if not bOk then return bOk, sErr end if not bOk then return bOk, sErr end
-- secondo taglio -- secondo taglio
bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId, bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
dToolDiam, sMilling, dAngOffs, dToolDiam, sMilling, dAngOffs,
dMillDiam, dMillTotDiam, abs( dThickTool), ToolData, bMakeLocSurf, vFace, vtN)
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace, vtN)
if not bOk then return bOk, sErr end if not bOk then return bOk, sErr end
-- altrimenti ho un solo percorso -- altrimenti ho un solo percorso
else else
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId, local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
dToolDiam, sMilling, 0, dToolDiam, sMilling, 0,
dMillDiam, dMillTotDiam, abs( dThickTool), ToolData, bMakeLocSurf, vFace, vtN)
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace, vtN)
if not bOk then return bOk, sErr end if not bOk then return bOk, sErr end
end end
end end
end end
end
-- passo alla successiva -- passo alla successiva
i = i + 1 i = i + 1
end end
@@ -6715,7 +6900,60 @@ local function GetOtherRegions( nPartId)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function GetFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToolThick, nAddGrpId, nPartId, vtNBottom) local function GetCleanCornerFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToolThick, nAddGrpId, nPartId, vtNBottom, Proc)
local function GetCleanCornerPointIfNoAdj( nNewProc, Proc, nFac, vFace, ptAdjP1, ptAdjP2)
local ptPNoPrev
local bAdj, ptLocP1, ptLocP2, dAng
if not ptAdjP1 and not ptAdjP2 then
bAdj, ptLocP1, ptLocP2, dAng = EgtSurfTmFacetsContact( nNewProc, nFac+1, nFac, GDB_ID.ROOT)
else
bAdj = true
ptLocP1 = ptAdjP1
ptLocP2 = ptAdjP2
end
if bAdj then
local vEdges = BL.GetEdgesInfo( nNewProc, nFac)
for j = 1, #vEdges do
if #vEdges == 4 and ( not AreSamePointApprox( vEdges[j].ptStart, ptLocP1) and not AreSamePointApprox( vEdges[j].ptStart, ptLocP2)) and
( not AreSamePointApprox( vEdges[j].ptEnd, ptLocP1) and not AreSamePointApprox( vEdges[j].ptEnd, ptLocP2)) then
-- se rivolto verso Z
if abs( vtNBottom:getZ()) > abs( vtNBottom:getY()) then
if vEdges[j].ptStart:getZ() < vEdges[j].ptEnd:getZ() then
ptPNoPrev = vEdges[j].ptStart
break
else
ptPNoPrev = vEdges[j].ptEnd
break
end
else
if vtNBottom:getY() > 0 then
ptPNoPrev = EgtIf( vEdges[j].ptStart:getY() < vEdges[j].ptEnd:getY(), vEdges[j].ptStart, vEdges[j].ptEnd)
break
else
ptPNoPrev = EgtIf( vEdges[j].ptStart:getY() > vEdges[j].ptEnd:getY(), vEdges[j].ptStart, vEdges[j].ptEnd)
break
end
end
elseif #vEdges == 3 then
if not AreSamePointApprox( vEdges[j].ptStart, ptLocP1) then
ptPNoPrev = vEdges[j].ptStart
break
elseif not AreSamePointApprox( vEdges[j].ptStart, ptLocP2) then
ptPNoPrev = vEdges[j].ptStart
break
elseif not AreSamePointApprox( vEdges[j].ptEnd, ptLocP1) then
ptPNoPrev = vEdges[j].ptEnd
break
elseif not AreSamePointApprox( vEdges[j].ptEnd, ptLocP2) then
ptPNoPrev = vEdges[j].ptEnd
break
end
end
end
end
return ptPNoPrev
end
local nNumFacet = EgtSurfTmFacetCount( nNewProc) local nNumFacet = EgtSurfTmFacetCount( nNewProc)
local vFace = {} local vFace = {}
@@ -6732,14 +6970,17 @@ local function GetFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToolThick, nAd
local _, dLen, dWidth = BL.GetFaceHvRefDim( nNewProc, nFac) local _, dLen, dWidth = BL.GetFaceHvRefDim( nNewProc, nFac)
-- recupero l'angolo con la faccia precedente -- recupero l'angolo con la faccia precedente
local bAdj, ptLocP1, ptLocP2, dAng = EgtSurfTmFacetsContact( nNewProc, nPrecFac, nFac, GDB_ID.ROOT) 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 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) -- verifico che l'adiacenza sia veramente con il precedente (percorro con normale a destra)
if bAdj then if bAdj then
if ( vtN ^ ( ptLocP1 - ptCen)) * vtNBottom > 0 then if ( vtN ^ ( ptLocP1 - ptCen)) * vtNBottom > 0 then
bAdj = false bAdj = false
end end
end end
-- salvo i dati
vFace[i] = { Fac = nFac, Cen = ptCen, Norm = vtN, Len = dLen, Width = dWidth, AngPrev = EgtIf( bAdj, dAng, 0)}
if bAdj then if bAdj then
-- se rivolto verso Z -- se rivolto verso Z
if abs( vtNBottom:getZ()) > abs( vtNBottom:getY()) then if abs( vtNBottom:getZ()) > abs( vtNBottom:getY()) then
@@ -6755,6 +6996,10 @@ local function GetFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToolThick, nAd
vFace[i].PPrev = EgtIf( ptLocP1:getY() > ptLocP2:getY(), ptLocP1, ptLocP2) vFace[i].PPrev = EgtIf( ptLocP1:getY() > ptLocP2:getY(), ptLocP1, ptLocP2)
end end
end end
local bAdj_2, ptLocP1_2, ptLocP2_2, dAng_2 = EgtSurfTmFacetsContact( nNewProc, nFac, nFac+1, GDB_ID.ROOT)
if not bAdj_2 and Proc.Fct > 3 then
vFace[i].PNoSucc = GetCleanCornerPointIfNoAdj( nNewProc, Proc, nFac, vFace[i], ptLocP1, ptLocP2)
end
end end
end end
-- analizzo le facce -- analizzo le facce
@@ -7449,15 +7694,35 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end end
-- provo con contornatura -- provo con contornatura
local dDiamTool = 20 local dDiamTool = 20
local nChoosenFacInd = nFacInd2
local dChoosenFacElev = dFacElev2
if bIsL then if bIsL then
local bOk, sErr local bOk, sErr
bOk, sWarn, dDiamTool = MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev, dCollSic, true, sMilling, nFacInd2, dFacElev2) bOk, sWarn, dDiamTool = MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev, dCollSic, true, sMilling, nFacInd2, dFacElev2)
if not bOk then return bOk, sWarn end if not bOk then return bOk, sWarn end
else
-- provo ancora con la pocketing dell'altra faccia
local sPocketing = ML.FindPocketing( sMchFind, dDiam, dFacElev + dCollSic)
if sPocketing then
nChoosenFacInd = nFacInd
dChoosenFacElev = dFacElev
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacInd+1].Id)
local nSideInd
for i = 1, #Edges do
if Edges[i].AdjacentFaceId == nFacInd2 then
nSideInd = i - 1
break
end
end
-- se pocketing ok forza facet e spigolo di lavoro
bOk, sWarn = MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId, nFacInd2, nSideInd)
if not bOk then return bOk, sWarn end
else else
local sErr = 'Error : Impossible mill special LapJoint' local sErr = 'Error : Impossible mill special LapJoint'
EgtOutLog( sErr) EgtOutLog( sErr)
return false, sErr return false, sErr
end end
end
-- inserisco la lavorazione di svuotatura -- inserisco la lavorazione di svuotatura
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sPocketing) local nMchFId = EgtAddMachining( sName, sPocketing)
@@ -7467,7 +7732,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
return false, sErr return false, sErr
end end
-- aggiungo geometria -- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nFacInd2}}) EgtSetMachiningGeometry( {{ Proc.Id, nChoosenFacInd}})
-- imposto uso faccia -- imposto uso faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT) EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
-- imposto posizione braccio porta testa -- imposto posizione braccio porta testa
@@ -7482,7 +7747,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end end
-- imposto elevazione -- imposto elevazione
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dFacElev2, 1)) sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dChoosenFacElev, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo -- eseguo
if not ML.ApplyMachining( true, false) then if not ML.ApplyMachining( true, false) then
@@ -7953,7 +8218,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, bOneShotm) dDepth, bOneShot)
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
@@ -8006,7 +8271,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
bSetOpenBorders = true bSetOpenBorders = true
end end
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId,
bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders, bIsU, bIsL) bOrthoFaces, sPocketing = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders, bIsU, bIsL)
if nOk == -3 then if nOk == -3 then
bTryWithBlades = true bTryWithBlades = true
elseif nOk == -2 then elseif nOk == -2 then
@@ -8040,17 +8305,55 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end end
-- se abilitato dal parametro Q inserisco pulitura spigoli o contorno con fresa più piccola -- se abilitato dal parametro Q inserisco pulitura spigoli o contorno con fresa più piccola
local nContourSmallTool = EgtGetInfo( Proc.Id, Q_CONTOUR_SMALL_TOOL, 'i') or 0 local nContourSmallTool = EgtGetInfo( Proc.Id, Q_CONTOUR_SMALL_TOOL, 'i') or 0
local nCleanCorner = EgtGetInfo( Proc.Id, Q_CLEAN_CORNER, 'i') or 0
if nContourSmallTool > 0 then if nContourSmallTool > 0 then
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, bOneShotm) dDepth, bOneShot)
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
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
end end
end end
-- se richiesta pulizia spigoli con fresa a V
if nCleanCorner > 0 then
local dMaxToolMaterial = 0
if EgtMdbSetCurrMachining( sPocketing) then
local sTuuidPk = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidPk) or '') then
dMaxToolMaterial = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxToolMaterial
end
end
local nNewProc
local vtSpec = vtN
if not ( Proc.Fct == 3 and bIsU) then
nNewProc = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacInd, vtN)
-- se U passante ricavo vettore da "sopra" con componente Z forzata in positivo
else
nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local nNumFacet = EgtSurfTmFacetCount( nNewProc)
-- vettore normale ad una delle facce adiacenti
local vtOther = EgtSurfTmFacetNormVersor( Proc.Id, Proc.Face[nFacInd+1].Adjacencies[1], GDB_ID.ROOT)
-- ricavo vettore verso l'alto (simulo faccia di fondo)
vtSpec = vtN ^ vtOther
-- se negativo in Z forzo positivo
if vtSpec:getZ() < 0 then
vtSpec:mirror(vtSpec)
end
ReorderFaces( nNewProc, nNumFacet, vtSpec)
-- normale della lavorazione clean corner
vtN = vtSpec
end
local vFace, dDepth = GetCleanCornerFacesData( nNewProc, dDiamTool, dMaxToolMaterial, ( dDiamTool/2), nAddGrpId, Proc.PartId, vtN, Proc)
local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dDiamTool, nAddGrpId, nNewProc, vtN)
if not bCleanCornerOk then return false, sCleanCornerWarn end
if sCleanCornerWarn then
if not sWarn then sWarn = '' end
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sCleanCornerWarn, sCleanCornerWarn)
end
end
end end
end end
bOk = true bOk = true
@@ -8266,8 +8569,27 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- se richiesta pulizia spigoli con fresa a V -- se richiesta pulizia spigoli con fresa a V
if nCleanCorner > 0 then if nCleanCorner > 0 then
local dThElev = dToolThDiameter / 2 * sqrt( vtN:getX() * vtN:getX() + vtN:getY() * vtN:getY()) local dThElev = dToolThDiameter / 2 * sqrt( vtN:getX() * vtN:getX() + vtN:getY() * vtN:getY())
local nNewProc = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacInd, vtN) local nNewProc
local vFace, dDepth = GetFacesData( nNewProc, dToolDiameter, dMaxToolMaterial, ( dToolDiameter/2), nAddGrpId, Proc.PartId, vtN) local vtSpec = vtN
if not ( Proc.Fct == 3 and bIsU) then
nNewProc = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacInd, vtN)
-- se U passante ricavo vettore da "sopra" con componente Z forzata in positivo
else
nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local nNumFacet = EgtSurfTmFacetCount( nNewProc)
-- vettore normale ad una delle facce adiacenti
local vtOther = EgtSurfTmFacetNormVersor( Proc.Id, Proc.Face[nFacInd+1].Adjacencies[1], GDB_ID.ROOT)
-- ricavo vettore verso l'alto (simulo faccia di fondo)
vtSpec = vtN ^ vtOther
-- se negativo in Z forzo positivo
if vtSpec:getZ() < 0 then
vtSpec:mirror(vtSpec)
end
ReorderFaces( nNewProc, nNumFacet, vtSpec)
-- normale della lavorazione clean corner
vtN = vtSpec
end
local vFace, dDepth = GetCleanCornerFacesData( nNewProc, dToolDiameter, dMaxToolMaterial, ( dToolDiameter/2), nAddGrpId, Proc.PartId, vtN, Proc)
local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dToolDiameter, nAddGrpId, nNewProc, vtN) local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dToolDiameter, nAddGrpId, nNewProc, vtN)
if not bCleanCornerOk then return false, sCleanCornerWarn end if not bCleanCornerOk then return false, sCleanCornerWarn end
if sCleanCornerWarn then if sCleanCornerWarn then
+2 -2
View File
@@ -32,7 +32,7 @@ local BD = require( 'BeamData')
local ML = require( 'MachiningLib') local ML = require( 'MachiningLib')
-- variabili assegnazione parametri Q -- variabili assegnazione parametri Q
local Q_DEPTH_CHAMFER = 'Q02' -- d local Q_DEPTH_CHAMFER = 'Q01' -- d
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Riconoscimento della feature -- Riconoscimento della feature
@@ -467,7 +467,7 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end end
-- se mortasa di fronte, eseguo il taglio della faccia -- se mortasa di fronte, eseguo il taglio della faccia
if bFront then if bFront and not Proc.bSkipCut then
-- verifico esista la faccia di taglio -- verifico esista la faccia di taglio
local ptCutC, vtCutN = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT) local ptCutC, vtCutN = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
if ptCutC and vtCutN and AreSameVectorApprox( vtExtr, vtCutN) then if ptCutC and vtCutN and AreSameVectorApprox( vtExtr, vtCutN) then
+4 -2
View File
@@ -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') 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 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
+8
View File
@@ -89,6 +89,14 @@ local function MyProcessInputData()
else else
vBeam[i].Box = b3Solid vBeam[i].Box = b3Solid
end end
if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then
local sOut = 'Lunghezza (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
'oltre i limiti della macchina (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') '
EgtOutLog( sOut)
EgtOutBox( sOut, 'Lavora Travi', 'WARNING')
EgtDraw()
return false
end
end end
dRawW = vBeam[1].Box:getDimY() dRawW = vBeam[1].Box:getDimY()
dRawH = vBeam[1].Box:getDimZ() dRawH = vBeam[1].Box:getDimZ()
+33
View File
@@ -1,4 +1,37 @@
==== Beam Update Log ==== ==== Beam Update Log ====
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)
- 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
- Modif : Per identificare feature di testa, oltre che verificare se sia troncante, si controlla anche la feature taglio
- Added : LapJoint - CleanCorner per tasche a 3 facce a U
Versione 3.1f2 (18/06/2026)
- Added : Gestione svuotature in doppio tipo NT
Versione 3.1f1 (17/06/2026)
- Added : Tagli per dividere il cubetto in caso sia troppo lungo
- Modif : DepthChamfer su feature Mortase (050 e 051) cambio di Q. Prima era Q02, ora è Q01
Versione 3.1e2 (01/06/2026) Versione 3.1e2 (01/06/2026)
- Added : in Cut aggiunta Q18 per evitare di ruotare - Added : in Cut aggiunta Q18 per evitare di ruotare
+2 -2
View File
@@ -1,6 +1,6 @@
-- Version.lua by Egaltech s.r.l. 2026/05/31 -- Version.lua by Egaltech s.r.l. 2026/08/05
-- Gestione della versione di Beam -- Gestione della versione di Beam
NAME = 'Beam' NAME = 'Beam'
VERSION = '3.1e2' VERSION = '3.1h1'
MIN_EXE = '3.1b1' MIN_EXE = '3.1b1'