Compare commits

...

68 Commits

Author SHA1 Message Date
luca.mazzoleni b7837fe95c Merge branch 'release/2.7e2' 2025-05-23 18:29:59 +02:00
luca.mazzoleni d66eaf5322 - update version e log 2025-05-23 17:38:25 +02:00
andrea.villa 05ecf76312 In DTMortise, si fa trim quando il percorso è in basso. 2025-05-16 17:10:05 +02:00
andrea.villa 6e3a1ddc7a In FBS ripristinato calcolo vtFaceUse, risolto casi ambigui a 45° con nuovo comando EdgesFaceUse. 2025-05-09 12:31:11 +02:00
andrea.villa df47691da1 In ScarfJoint corretto caso in cui faccia di fondo sia più alta rispetto a faccia verticale centrale 2025-05-09 10:05:04 +02:00
andrea.villa 8a2200e0de Aumentato angolo limite per lavorazioni verso il basso, da 5° a 7° 2025-05-08 14:51:19 +02:00
luca.mazzoleni 0136ccac19 Merge tag '2.7e1' into develop
2.7e1
2025-05-05 16:58:07 +02:00
luca.mazzoleni 7ee683aeb8 Merge branch 'release/2.7e1' 2025-05-05 16:57:56 +02:00
luca.mazzoleni e81d1aef66 update log e version 2025-05-05 16:57:35 +02:00
andrea.villa 5331466c4f In BatchProcess, anche se non è da riprocessare, si setta come nota sul MachGroup il nome del codice CNC da utilizzare 2025-04-30 16:15:21 +02:00
luca.mazzoleni 7a972cccc8 - in LapJoint se tunnel verticale lavorato solo da sopra e l'utensile non arriva, si restituisce warning 2025-04-28 19:07:22 +02:00
andrea.villa 2ed5af9661 In Drill, dopo che l'utensile è stato scelto si verifica compatibilità considerando angolo foro. Se non arriva in fondo, si cerca utensile più lungo. 2025-04-28 15:08:16 +02:00
andrea.villa e25c24a33a Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2025-04-23 15:21:16 +02:00
andrea.villa aeca298feb In SplitCut, si riduce percorso di taglio solo se il pezzo è effettivamente alto 2025-04-23 15:21:13 +02:00
luca.mazzoleni a09565cfb7 Merge branch 'master' into develop 2025-04-22 11:24:33 +02:00
luca.mazzoleni 862b375ee5 update log e version 2025-04-22 11:24:22 +02:00
luca.mazzoleni a34147ce15 - #CRITICAL# in LapJoint correzione parentesi che causavano la chiamata di LongCut in casi errati 2025-04-22 11:22:13 +02:00
luca.mazzoleni cb3ad1d24c Merge tag '2.7d2' into develop
2.7d2
2025-04-17 12:24:08 +02:00
luca.mazzoleni 06e266226a Merge branch 'release/2.7d2' 2025-04-17 12:24:00 +02:00
luca.mazzoleni 74b40a6ad7 update log e version 2025-04-17 12:23:40 +02:00
andrea.villa ab7971e5f9 - Aggiunto lettura Q03 su scanalatura epr forzare fresa
- In BeamLib, si considerano simili due facce che hanno elevazione oltre l'85%
2025-04-11 13:29:37 +02:00
luca.mazzoleni e188753f49 - in Cut se lungo, una faccia e rivolto sul retro verso l'alto si forzano i cubetti per evitare di rovinare il pezzo successivo
- in Cut, se taglio di coda anticipato, aggiunto messaggio che avvisa del possibile danneggiamento del pezzo successivo
2025-04-10 17:08:02 +02:00
andrea.villa 9b12a74591 In LapJoint, per abilitare lama da sotto non si verifica se esiste testa sotto, ma se è una FAST 2025-04-10 08:49:18 +02:00
andrea.villa e17e8189f7 In LapJoint, funzione SawPlusChain lavorazione di lama da sotto abilitata se la macchina ha solo la testa sopra 2025-04-10 08:29:38 +02:00
luca.mazzoleni a5d4503180 Merge tag '2.7d1' into develop
2.7d1
2025-04-04 12:15:59 +02:00
luca.mazzoleni 41f92e9dd4 Merge branch 'release/2.7d1' 2025-04-04 12:15:52 +02:00
luca.mazzoleni c5a6300d15 update log 2025-04-04 10:39:15 +02:00
andrea.villa bf5c12ec8a In FBS non si utilizza il vtFaceUse perchè in caso di edge a 45° sbaglia a concatenare edge da lavorare. Si è tornati alla gestione vecchia 2025-04-03 16:06:11 +02:00
andrea.villa 777ba74e4d - In FBS errore 'TwoFacesBySaw from bottom impossible' solo se entrambe le facce non sono ok
- In LapJoint, si controlla direzione faccia 1 e larghezza faccia 2 (e reciproci) per capire se si può lavorare con lama testa sotto
2025-04-03 15:28:31 +02:00
luca.mazzoleni 268e578125 - in Cut.Classify correzione 2025-04-03 12:04:28 +02:00
andrea.villa 13f0545ebe In HeadCut e Split, si aggiungono tagli extra orizzontali solo se il materiale da tagliare è meno di un cubetto. Altrimenti ci sarebbe collisione. 2025-04-02 11:01:04 +02:00
luca.mazzoleni 445a76f543 Merge tag '2.7d1' into develop
2.7d1
2025-04-01 09:09:36 +02:00
luca.mazzoleni 4b52653a2e Merge branch 'release/2.7d1' 2025-04-01 09:09:25 +02:00
luca.mazzoleni ced290604a update log e version 2025-04-01 09:09:16 +02:00
andrea.villa 2c68515b93 In HeadCut e Split, per decidere se BigSection, si somma CUT_EXTRA ( prima si utilizzava CUT_EXTRA_MIN) 2025-03-31 15:15:15 +02:00
luca.mazzoleni b26ad523ab Merge branch 'master' into develop 2025-03-24 18:00:43 +01:00
luca.mazzoleni cd346b8536 - in BatchProcessN piccola correzione per pezzi a caduta 2025-03-24 17:58:39 +01:00
luca.mazzoleni 2853731c4c Merge branch 'master' into develop 2025-03-24 16:06:06 +01:00
luca.mazzoleni d31efb1f2a - in BatchProcess (Ts7), in caso di verifica di un pezzo senza modifiche al btl, si riscrive il txt con lo stato precedente (informazioni salvate in nge) 2025-03-24 16:05:12 +01:00
andrea.villa e1702d1263 Corretto calcolo direzione di lavorazione in caso verticale e orizzontale entrambi a false. Se altezza faccia minore di massimo materiale, si fa orizzontale 2025-03-24 14:47:05 +01:00
andrea.villa 236254fed6 In Drill, calcolo AffectedFaces anche su Predrill 2025-03-20 11:59:55 +01:00
luca.mazzoleni 82f20f3c87 - correzione in log 2025-03-18 11:51:31 +01:00
luca.mazzoleni adc75c0504 Merge tag '2.7c1' into develop
2.7c1
2025-03-17 17:47:39 +01:00
luca.mazzoleni 761778b87c Merge branch 'release/2.7c1' 2025-03-17 17:47:29 +01:00
luca.mazzoleni 5fa40fad99 update version e log 2025-03-17 17:47:20 +01:00
luca.mazzoleni 8e608bd623 - in BeamExec aggiunto ritorno stato e messaggi a interfaccia per Double in tutti i casi 2025-03-17 10:15:36 +01:00
andrea.villa 60a1707d43 In Cut, se taglio rivolto verso il basso e non possibile tagliare di fianco, da fare in fase ribaltata 2025-03-13 09:55:09 +01:00
luca.mazzoleni 1848ed85d0 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2025-03-12 18:19:12 +01:00
luca.mazzoleni 197673de11 - in BacthProcess (Ts7) si forza ricalcolo ad ogni check o check+generate 2025-03-12 18:19:05 +01:00
andrea.villa 19e1d4e760 - In HeadCut e Split, per decidere se fare doppio taglio verticale, si controlla anche il massimo possibile e non solo il minimo per farlo scaturire.
- In LapJoint si anticipa controllo per decidere se feature di coda
2025-03-10 13:22:30 +01:00
luca.mazzoleni abb1509314 Merge tag '2.7b3' into develop
2.7b3
2025-03-03 09:25:30 +01:00
luca.mazzoleni b9e4d9b01f Merge branch 'release/2.7b3' 2025-03-03 09:25:19 +01:00
luca.mazzoleni fcb541175a - update log e version 2025-03-03 09:24:24 +01:00
andrea.villa 99e0b9967e In LapJoint, se feature interessa la coda e il pezzo è lungo, la lavorazione viene fatta dopo separazioone. Non ha senso farla prima se non ci sono problemi di pinzaggio, meglio farla dopo. 2025-02-25 13:20:24 +01:00
luca.mazzoleni b88caa12ab - in BeamLib GetToolFromMachining aggiunte informazioni testa
- in ProcessDrill modifiche alla gestione lato preferenziale
2025-02-25 11:23:16 +01:00
andrea.villa 40912bb7b7 In FbS, per TURN, se taglio con bilinea che forma un angolo ottuso, invece di fare retrazione (in alcuni casi non completa il taglio) si segue bilinea per il tratto che manca per completare taglio e poi si esce perpendicolarmente. 2025-02-25 08:54:16 +01:00
luca.mazzoleni 7d6903d181 update log 2025-02-24 15:28:22 +01:00
luca.mazzoleni 43cf75d400 - in lavorazione tipo BHSideMIll migliorati allungamenti in caso di feature obliqua 2025-02-24 14:18:15 +01:00
luca.mazzoleni 2fa3ea24a5 - in DiceCut piccola correzione per Turn
- in LapJoint in lavorazione tipo BH permessa U passante non parallela agli assi principali
2025-02-20 09:43:11 +01:00
luca.mazzoleni c82a27ebae - in ProcessDrill, per le forature passanti fatte da un solo lato, eventuale inversione foro in base al lato di lavoro e al lato testa dell'utensile scelto (BD.GetSetupInfo) 2025-02-18 17:44:13 +01:00
luca.mazzoleni a7df54d8d2 - corretto log 2025-02-07 12:13:11 +01:00
luca.mazzoleni e8d11f150e Merge tag '2.7b2' into develop
2.7b2
2025-02-05 15:03:46 +01:00
luca.mazzoleni 6d8bd01266 Merge branch 'release/2.7b2' 2025-02-05 15:03:25 +01:00
luca.mazzoleni 65a256ba7b update log e version 2025-02-05 15:02:57 +01:00
luca.mazzoleni d403f9cfcf - in BeamExec si consentono DrillPocket in doppio solo se foro non passante 2025-02-05 14:59:44 +01:00
luca.mazzoleni 30cc274c2e Merge tag '2.7b1' into develop
2.7b1
2025-02-04 17:55:56 +01:00
luca.mazzoleni 6564bdc74f Merge branch 'release/2.7b1' 2025-02-04 17:55:47 +01:00
luca.mazzoleni 6cdf1583c0 update log e version 2025-02-04 17:55:18 +01:00
16 changed files with 389 additions and 114 deletions
+53 -5
View File
@@ -101,6 +101,21 @@ local function WriteTimeToLogFile( dTime)
hFile:close()
end
-- Funzioni per riportare stato lavorazione o pezzo in nge
local function WriteErrToNge( nProcId, sErr, sMsg, sRot, sCutId, sTaskId)
EgtSetInfo( nProcId, 'STATUS.ERR', sErr)
EgtSetInfo( nProcId, 'STATUS.MSG', sMsg)
EgtSetInfo( nProcId, 'STATUS.ROT', sRot)
EgtSetInfo( nProcId, 'CUTID', sCutId)
EgtSetInfo( nProcId, 'TASKID', sTaskId)
end
local function WriteFallToNge( nPartId, sErr, sMsg, sCutId, sFall)
EgtSetInfo( nPartId, 'STATUS.ERR', sErr)
EgtSetInfo( nPartId, 'STATUS.MSG', sMsg)
EgtSetInfo( nPartId, 'CUTID', sCutId)
EgtSetInfo( nPartId, 'STATUS.FALL', sFall)
end
-- Funzione per gestire visualizzazione dopo errore
local function PostErrView( nErr, sMsg)
if nErr ~= 0 and ( BEAM.FLAG == 1 or BEAM.FLAG == 2) then
@@ -413,6 +428,9 @@ if bToProcess then
BEAM.CUTID = Stats[i].CutId
BEAM.TASKID = Stats[i].TaskId
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
if Stats[i].ProcId then
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
end
elseif Stats[i].Err > 0 then
nErrCnt = nErrCnt + 1
sOutput = sOutput .. string.format( '[%d,%d] %s\n', Stats[i].CutId, Stats[i].TaskId, sMsg)
@@ -422,6 +440,9 @@ if bToProcess then
BEAM.CUTID = Stats[i].CutId
BEAM.TASKID = Stats[i].TaskId
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
if Stats[i].ProcId then
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
end
elseif Stats[i].Err < 0 then
-- se segnalazione scarico pezzo standard, incompleto o a caduta
if Stats[i].Err == -100 or Stats[i].Err == -101 or Stats[i].Err == -102 then
@@ -430,6 +451,9 @@ if bToProcess then
BEAM.CUTID = Stats[i].CutId
BEAM.FALL = abs( Stats[i].Err + 100)
WriteFallToLogFile( BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
if Stats[i].ProcId then
WriteFallToNge( Stats[i].PartId, BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
end
-- altri avvertimenti
else
nWarnCnt = nWarnCnt + 1
@@ -440,6 +464,9 @@ if bToProcess then
BEAM.CUTID = Stats[i].CutId
BEAM.TASKID = Stats[i].TaskId
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
if Stats[i].ProcId then
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
end
end
end
end
@@ -455,35 +482,56 @@ if bToProcess then
PostWarnView( 19, sOutput)
end
-- Altrimenti carico il progetto salvato e dichiaro nessun errore
-- Altrimenti carico il progetto salvato, rileggo gli errori da nge e riscrivo il log txt con gli stati precedenti
else
EgtOutLog( ' +++ Loading Project already processed >>>')
-- Carico il progetto già fatto
EgtOpenFile( sNgeFile)
-- Dichiaro nessun errore
-- Riscrivo il log txt
local nPartId = EgtGetFirstPart()
while nPartId do
local nCutId = EgtGetInfo( nPartId, 'CUTID')
if nCutId then
-- stato a livello di singola feature
local nProcId = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nPartId, 'Processings') or GDB_ID.NULL)
while nProcId do
local bIsFea = EgtExistsInfo( nProcId, 'GRP') and EgtExistsInfo( nProcId, 'PRC')
local nTaskId = EgtGetInfo( nProcId, 'TASKID')
local sErr = EgtGetInfo( nProcId, 'STATUS.ERR') or 0
local sMsg = EgtGetInfo( nProcId, 'STATUS.MSG') or '---'
local sRot = EgtGetInfo( nProcId, 'STATUS.ROT') or 0
if bIsFea and nTaskId then
BEAM.ERR = 0
BEAM.MSG = '---'
BEAM.ROT = 0
BEAM.ERR = sErr
BEAM.MSG = sMsg
BEAM.ROT = sRot
BEAM.CUTID = nCutId
BEAM.TASKID = nTaskId
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
end
nProcId = EgtGetNext( nProcId)
end
-- stato a livello di pezzo
local sErr = EgtGetInfo( nPartId, 'STATUS.ERR') or 0
if sErr == -100 or sErr == -101 or sErr == -102 then
local sMsg = EgtGetInfo( nPartId, 'STATUS.MSG') or '---'
local sFall = EgtGetInfo( nPartId, 'STATUS.FALL') or 0
BEAM.ERR = sErr
BEAM.MSG = sMsg
BEAM.CUTID = nCutId
BEAM.FALL = sFall
WriteFallToLogFile( BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
end
end
nPartId = EgtGetNextPart( nPartId)
end
-- Aggiorno eventuali dati ausiliari
UpdateAuxData( sBtmFile)
-- Anche se non è da riprocessare, imposto nome file CN.
-- Se file TS7 importato da altro PC, 'BEAM.FILE' è cambiato da un PC all'altro. Di conseguenza si deve aggiornare nome file che si andrà a generare.
local _, sName, _ = EgtSplitPath( BEAM.FILE)
EgtSetInfo( EgtGetLastMachGroup(), 'NcName', sName .. '.cnc')
-- Passo in modalità lavora
EgtSetCurrMachGroup( EgtGetLastMachGroup())
-- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni
+49 -22
View File
@@ -1238,7 +1238,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
Proc.Flg = 0
Proc.Down = true
bAllOk = false
table.insert( Stats, {Err = 1, Msg='Error : impossible to machine by orientation', CutId=Proc.CutId, TaskId=Proc.TaskId})
table.insert( Stats, {Err = 1, Msg='Error : impossible to machine by orientation', CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id})
-- gestione feature di coda da lavorare ribaltata
elseif Proc.Tail and bDown then
Proc.Down = true
@@ -1259,12 +1259,12 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
elseif Proc.Flg == 0 then
bAllOk = false
Proc.ErrMsg = 'Error : out of the part'
table.insert( Stats, {Err = 1, Msg=Proc.ErrMsg, CutId=Proc.CutId, TaskId=Proc.TaskId})
table.insert( Stats, {Err = 1, Msg=Proc.ErrMsg, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id})
else
Proc.Flg = 0
bAllOk = false
if not Proc.ErrMsg then Proc.ErrMsg = 'Error : impossible to machine' end
table.insert( Stats, {Err = 1, Msg=Proc.ErrMsg, CutId=Proc.CutId, TaskId=Proc.TaskId})
table.insert( Stats, {Err = 1, Msg=Proc.ErrMsg, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id})
end
end
-- se necessario ribaltamento, assegno intestatura alla fase ribaltata
@@ -1826,7 +1826,10 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw)
sDrilling, sType, dMaxDepth = ML.FindDrilling( dDiam, 0, true, false, true)
dMachiningDepth = dMaxDepth or dMachiningDepth
end
if not sDrilling or ( sType ~= 'Drill' and sType ~= 'Pocket') or not EgtMdbSetCurrMachining( sDrilling) then
if not sDrilling
or ( sType ~= 'Drill' and ( sType ~= 'Pocket'or ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)))
or not EgtMdbSetCurrMachining( sDrilling) then
return
end
local dDrillingStep = EgtMdbGetCurrMachiningParam( MCH_MP.STEP)
@@ -1860,10 +1863,16 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw)
( BD.DOWN_HEAD and AreOppositeVectorApprox( vtExtr, Y_AX())) then
Proc.Double = 2
Proc.MachDepthDouble = dMachiningDepth
Proc.MirrorId = ProcToDisable.Id
Proc.MirrorCutId = ProcToDisable.CutId
Proc.MirrorTaskId = ProcToDisable.TaskId
DisableOtherDrilling( ProcToDisable, vProc)
elseif BD.DOWN_HEAD and AreSameVectorApprox( vtExtr, Z_AX()) then
Proc.Double = 3
Proc.MachDepthDouble = dMachiningDepth
Proc.MirrorId = ProcToDisable.Id
Proc.MirrorCutId = ProcToDisable.CutId
Proc.MirrorTaskId = ProcToDisable.TaskId
DisableOtherDrilling( ProcToDisable, vProc)
end
end
@@ -2169,13 +2178,19 @@ function BeamExec.ProcessFeatures()
end
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId})
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId})
else
table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId})
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId})
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
else
table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
end
-- se è taglio di separazione, verifico se ha già aggiunto una nuova fase oppure se è da creare
@@ -2259,13 +2274,19 @@ function BeamExec.ProcessFeatures()
end
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId})
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId})
else
table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId})
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId})
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
else
table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
end
if bOk then nSideMchOk = nSideMchOk + 1 end
@@ -2337,13 +2358,19 @@ function BeamExec.ProcessFeatures()
end
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
else
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId})
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
else
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
if Proc.Double == 2 or Proc.Double == 3 then
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
end
end
-- se era taglio di separazione, aggiungo nuova fase
+7 -1
View File
@@ -642,7 +642,7 @@ function BeamLib.GetFaceWithMostAdj( Proc, nPartId, bCompare3Fc, dCosSideAng)
-- premio quella che non è sottosquadra e che ha la X minore
local bDiffSmall = true
for i = 1, #dtElev do
if dtElev[i] > dMinElev + 5 or dtElev[i] > 80 then
if ( dtElev[i] > dMinElev + 5 or dtElev[i] > 80) and dMinElev < 0.85 * dtElev[i] then
bDiffSmall = false
end
end
@@ -1345,6 +1345,12 @@ function BeamLib.GetToolFromMachining( sMachiningName)
Tool.IsCCW = ( EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0)
Tool.Type = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
Tool.Diameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0
Tool.HeadType = {}
Tool.PreferredSide = {}
if BD.GetSetupInfo then
Tool.HeadType = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).HeadType
Tool.PreferredSide = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).PreferredSide
end
-- lama
if Tool.Type == MCH_TY.SAW_STD or Tool.Type == MCH_TY.SAW_FLAT then
Tool.Thickness = EgtTdbGetCurrToolParam(MCH_TP.THICK) or 0
+1 -1
View File
@@ -407,7 +407,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
local dNzLimDwnUp = BL.GetNzLimDownUp( BBoxRawPart)
-- se non c'è testa da sotto e normali senza componenti in Y con faccia quasi verticale e trave non alta, uso per offset i limiti dei tagli di testa e coda
if not BD.DOWN_HEAD and abs( vtNPlanes:getY()) < 0.1 and vtNPlanes:getZ() < 0.7071 and ( not vtNBond or abs( vtNBond:getY()) < 0.1) and BBoxRawPart:getDimZ() < BD.MIN_DIM_HBEAM then
if not BD.TURN and not BD.DOWN_HEAD and abs( vtNPlanes:getY()) < 0.1 and vtNPlanes:getZ() < 0.7071 and ( not vtNBond or abs( vtNBond:getY()) < 0.1) and BBoxRawPart:getDimZ() < BD.MIN_DIM_HBEAM then
OffsetO = dOrthoMaxDim or BD.MAX_DIM_HTCUT
end
+57 -12
View File
@@ -192,6 +192,27 @@ local function GetNameSolidFaceIncludingLine( b3Solid, ptP1Comp, ptP2Comp)
return false
end
---------------------------------------------------------------------
local function AreSameOrOppositeDirApprox( vDir1, vDir2)
if abs( abs( vDir1) - abs( vDir2)) < 10 * GEO.EPS_SMALL then
return true
else
return false
end
end
---------------------------------------------------------------------
local function GetEdgeToMachineFromVector( nSurfId, nFacet, vtOrthO)
local _, EdgesEgt = EgtSurfTmGetFacetOutlineInfo( nSurfId, nFacet, GDB_ID.ROOT)
for i = 1, #EdgesEgt do
if AreOppositeVectorApprox( EdgesEgt[i].Norm, vtOrthO) then
return ( i - 1)
end
end
return nil
end
---------------------------------------------------------------------
function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert, bMaximizeVerticalDepth, bSpecialTangentLeadInOut, bForceTangentLeadInOut, Par5Alternative)
-- se lama con asse parallelo alla faccia, passo alla apposita funzione
@@ -233,8 +254,9 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
if not dVzLimDwnUp then dVzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN, vtOrthO) end
local bDownHead = ( dVzLimDwnUp and dVzLimDwnUp < - 1.5)
local bDownUp = ( vtN:getZ() < dVzLimDwnUp)
-- linea o bilinea di lavorazione
local ptP1, ptPm, ptP2, vtV1, vtV2, dLen, dWidth = EgtSurfTmFacetOppositeSide( nSurfId, nFacet, vtOrthO, GDB_ID.ROOT)
if not dLen or dLen < 1.1 or not dWidth or dWidth < 1.1 then
local sWarn = 'Face ' .. string.format( '%d,%d', nSurfId, nFacet) .. ' skipped : too small'
EgtOutLog( sWarn, 1)
@@ -373,6 +395,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
local dLenLi = sqrt( dLiTang * dLiTang + dLiPerp * dLiPerp)
local dLenLo = sqrt( dLoTang * dLoTang + dLoPerp * dLoPerp)
local dLiCompLength = 0
local dLoCompLength = 0
-- attacco tangente
local dLi2Tang = 0
local dLi2Perp = 0
@@ -394,6 +417,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
end
local dLenLi2 = abs( dLi2Tang)
local dLenLo2 = abs( dLo2Tang)
local dBiLineaAddLength = 0
-- se il lato non lavorato della bilinea è aperto, setto entrata/uscita con la stessa direzione
if bIsBiLinea then
@@ -422,8 +446,9 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
local dDistPointToCenter = sqrt( dDistPtTang * dDistPtTang + dDistToCenter * dDistToCenter)
-- se distanza al punto è maggiore del raggio lama, significa che non ho già lavorato, quindi calcolo uscita opportunamente
if dDistPointToCenter > 0.5 * dSawDiam then
dBiLineaAddLength = dDistPointToCenter - ( 0.5 * dSawDiam)
dLoTang = -dAllEnd * dCosAlpha
dLoPerp = dDist2 * dSinAlpha
dLoPerp = dDist2 * dSinAlpha
end
end
end
@@ -455,11 +480,23 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
-- dLoPerp rimane invariato
end
elseif BD.TURN then
bLioTang = 2
local dMove = dist( ptP1, ptP2)
dLiTang, dLiPerp = dLi2Tang, dLi2Perp
dLoTang = -( dLiTang - dAccStart - dAccEnd + dMove)
dLoPerp = BD.COLL_SIC
-- se angolo bilinea ottuso si segue bilinea per un tratto per tagliare completamente cubetto a forma di rombo
if dCosAngleL1L2 > 0.707 and bIsBiLinea then
-- calcolo uscita per prolungare solo della parte mancante per completare il taglio
if dBiLineaAddLength > 0 then
dLoTang = dLoTang * ( dBiLineaAddLength + BD.COLL_SIC) / 100
dLoPerp = dLoPerp * ( dBiLineaAddLength + BD.COLL_SIC) / 100
end
-- aggiungo componente perpendicolare a percorso per ritornare dal punto di ingresso, altrimenti l'uscita viene allungata fino dall'altra parte del grezzo
dLoCompLength = 100
-- se angolo bilinea oltre 45°, faccio movimento in retrazione
else
bLioTang = 2
local dMove = dist( ptP1, ptP2)
dLoTang = -( dLiTang - dAccStart - dAccEnd + dMove)
dLoPerp = BD.COLL_SIC
end
else
bLioTang = true
dLiTang, dLiPerp, dLoTang, dLoPerp, dLiCompLength = dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp, dLi2CompLength
@@ -532,8 +569,18 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
EgtSetMachiningGeometry( {{ nSurfId, nFacet}})
-- imposto uso faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
local sNoteVtFaceUse = 'VtFaceUse=' .. EgtNumToString( vtOrthO:getX(),3) .. ',' .. EgtNumToString( vtOrthO:getY(),3) .. ',' .. EgtNumToString( vtOrthO:getZ(),3) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteVtFaceUse)
-- vtFaceUse non funziona correttaemnte in caso che il lato da lavorare sia a 45°. Potrebbe ritornare una trilinea, non gestibile. Quindi si setta l'EDGE
local nEdgeFaceUse = GetEdgeToMachineFromVector( nSurfId, nFacet, vtOrthO)
if nEdgeFaceUse and ( AreSameOrOppositeDirApprox( vtOrthO:getX(), 0.707) or AreSameOrOppositeDirApprox( vtOrthO:getY(), 0.707) or AreSameOrOppositeDirApprox( vtOrthO:getZ(), 0.707)) then
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
else
local sNoteVtFaceUse = 'VtFaceUse=' .. EgtNumToString( vtOrthO:getX(),3) .. ',' .. EgtNumToString( vtOrthO:getY(),3) .. ',' .. EgtNumToString( vtOrthO:getZ(),3) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteVtFaceUse)
-- imposto allungamenti iniziale e finale (in caso si utilizzi EDGE, non serve prolungare o accorciare)
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAllStart - dAccStart)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAllEnd - dAccEnd)
end
-- imposto posizione braccio porta testa
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- imposto inversione e lato correzione
@@ -551,9 +598,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
if BD.TURN and bLioTang == 2 then EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.PERP_TG) end
EgtSetMachiningParam( MCH_MP.LOTANG, dLoTang)
EgtSetMachiningParam( MCH_MP.LOPERP, dLoPerp)
-- imposto allungamenti iniziale e finale
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAllStart - dAccStart)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAllEnd - dAccEnd)
EgtSetMachiningParam( MCH_MP.LOCOMPLEN, dLoCompLength)
-- imposto angolo 3° asse rot
local sBlockedAxis = EgtIf( bMaximizeVerticalDepth, 'parallel', 'perpendicular')
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, sBlockedAxis, b3Raw, vtN, vtOrthO))
@@ -627,7 +672,7 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType,
local bFaceOk = {}
bFaceOk[1] = ( vtN[1]:getZ() >= ( BD.CUT_VZ_MIN or BD.NZ_MINB) or abs( vtN[1]:getY()) < 0.174 or ( Proc.AffectedFaces.Left ~= Proc.AffectedFaces.Right and Proc.Face[1].Elevation < dMaxDepth - 10 * GEO.EPS_SMALL))
bFaceOk[2] = ( vtN[2]:getZ() >= ( BD.CUT_VZ_MIN or BD.NZ_MINB) or abs( vtN[2]:getY()) < 0.174 or ( Proc.AffectedFaces.Left ~= Proc.AffectedFaces.Right and Proc.Face[2].Elevation < dMaxDepth - 10 * GEO.EPS_SMALL))
if not bDownHead and ( not bFaceOk[1] or not bFaceOk[2]) then
if not bDownHead and not bFaceOk[1] and not bFaceOk[2] then
local sErr = 'Error : TwoFacesBySaw from bottom impossible'
EgtOutLog( sErr)
return false, sErr
+5 -5
View File
@@ -342,8 +342,8 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
local ForStart = 1
local ForEnd = #Machinings
local ForStep = 1
-- le forature vanno scorse dal diametro maggiore al minore
if MachiningType == MCH_MY.DRILLING then
-- le forature vanno scorse dal diametro maggiore al minore, a meno che non sia stato passato un ordinamento specifico
if MachiningType == MCH_MY.DRILLING and ( not sSortingCriterion or sSortingCriterion == '') then
ForStart = #Machinings
ForEnd = 1
ForStep = -1
@@ -455,7 +455,7 @@ function MachiningLib.FindCutting( sType, bTopHead, bDownHead, dDepth, sSortingC
end
---------------------------------------------------------------------
function MachiningLib.FindDrilling( dDiam, dDepth, bTopHead, bDownHead, bExcludeH2, bAngleTransmission, bIsPredrill)
function MachiningLib.FindDrilling( dDiam, dDepth, bTopHead, bDownHead, bExcludeH2, bAngleTransmission, bIsPredrill, bExcludeH3, sSortingCriterion)
local MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5, sTypeMach
-- se il foro è un predrill, cerco solo punte abilitate al Predrill
if bIsPredrill then
@@ -463,9 +463,9 @@ function MachiningLib.FindDrilling( dDiam, dDepth, bTopHead, bDownHead, bExclude
else
sTypeMach = EgtIf( bAngleTransmission, 'Drill_AT', 'Drill')
end
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, sTypeMach, { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead, bExcludeH2)
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, sTypeMach, { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
if ( not MachiningName or MachiningName == '') then
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, EgtIf( bAngleTransmission, 'Pocket_AT', 'Pocket'), { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead)
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, EgtIf( bAngleTransmission, 'Pocket_AT', 'Pocket'), { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
end
if MachiningName and MachiningName ~= '' then
return MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5
+26 -8
View File
@@ -92,7 +92,7 @@ function ProcessCut.Classify( Proc, b3Raw)
-- calcolo l'ingombro orizzontale della faccia
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0)
-- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli oppure se tipo PF, taglio inclinato in Y e non taglio singolo orizzontale)
if DimH > 2 * BD.MAX_DIM_DICE or ( BD.C_SIMM and abs( vtN:getY()) > 0.1 and dMaxMat < DimH + BD.CUT_EXTRA) then
if DimH > 2 * BD.MAX_DIM_DICE or ( BD.C_SIMM and ( abs( vtN:getY()) > 0.1) and dMaxMat < DimH + BD.CUT_EXTRA) then
return true, true
end
end
@@ -262,6 +262,7 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione con testa da sopra
local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut)
local sWarn
-- ingombro del grezzo
b3Raw = b3Raw or EgtGetRawPartBBox( nRawId)
-- ingombro del pezzo
@@ -373,10 +374,17 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
end
-- verifico se necessari tagli supplementari o se presente superficie limitante
EgtOutLog( string.format( 'MaxDepth=%.1f MaxVertDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dMaxVertDepth, dCutH, dCutV), 3)
-- se lungo, una faccia e rivolto sul retro verso l'alto si forzano i cubetti per evitare di rovinare il pezzo successivo
local bForceDicing = ( Proc.Fct == 1 and Proc.AffectedFaces.Left and bLongCut and vtN:getZ() > 10 * GEO.EPS_SMALL and vtN:getY() < 10 * GEO.EPS_SMALL)
local vCuts = {}
if not Proc.AdvTail and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then
if ( ( not Proc.AdvTail) or bForceDicing) and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then
local ptExtra, vtExtra
local bAutoCalcSurf = true
if Proc.AdvTail then
-- do avviso che la lama può sbordare nel pezzo successivo
sWarn = 'Warning : Cut machining can damage next piece'
EgtOutLog( sWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
end
if bFillAreaPiece or bFillTail then
local ptMiddle = ( b3Solid:getMin() + b3Solid:getMax()) / 2
ptExtra = Point3d( b3Solid:getMin():getX() + 5*GEO.EPS_SMALL, ptMiddle:getY(), ptMiddle:getZ())
@@ -415,7 +423,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
end
end
-- se il taglio è più spesso della lama abilito il dicing, altrimenti no
if dMaxElev > dSawThick then
if ( dMaxElev > dSawThick) or bForceDicing then
vCuts = DC.GetDice( nAddGrpId, EgtIf( bForced, b3Raw, b3Solid), ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, dNewDiceDim)
-- se taglio sborda in coda e non è stato inserito nessun taglio a cubetti, lo rilancio con le dimensioni customizzate
if ( bFillTail or bCustDiceCut) and #vCuts == 0 then
@@ -608,7 +616,8 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
local vtOrthoO
if bFromBottom and dCutV < dMaxDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
vtOrthoO = -Z_AX()
elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
elseif ( bHorizCut or ( dCutV < dMaxDepth - BD.CUT_EXTRA and not bVertCutOk)) and
( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
vtOrthoO = Z_AX()
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and abs( vtN:getY()) > 0.259 and
vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
@@ -641,7 +650,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then return bOk, sErr end
end
return true
return true, sWarn
end
---------------------------------------------------------------------
@@ -866,22 +875,31 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
return false, sErr
end
local bNoDicing = false
local sWarn
-- se taglio con testa da sopra
if not bDownHead and not bDownTurn then
local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut)
bNoDicing = bNoDicing2
if not bOk then return false, sErr end
if not bOk then
return false, sErr
else
sWarn = sErr
end
-- altrimenti taglio con testa da sotto
else
local bOk, sErr = MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return false, sErr end
if not bOk then
return false, sErr
else
sWarn = sErr
end
end
-- Aggiornamento ingombro (se vero taglio o richiesto)
-- Se lascio il cordolo (bNoDicing) non aggiorno il grezzo perchè lo scarto rimane attaccato
if ( ProcessCut.Identify( Proc) or bUpdateIng) and not bNoDicing then
UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw)
end
return true
return true, sWarn
end
---------------------------------------------------------------------
+37 -5
View File
@@ -209,7 +209,8 @@ function ProcessDrill.AddPredrillFromDrillProc( Proc)
PredrillProc.MainId = Proc.MainId
PredrillProc.IsPredrill = true
PredrillProc.IsPredrillOf = Proc.Id
-- recupero l'elenco delle facce della parte interessate dalla feature
PredrillProc.AffectedFaces = BL.GetProcessAffectedFaces( PredrillProc)
return true, PredrillProc
end
end
@@ -388,6 +389,25 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
-- recupero la lavorazione
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill)
if sDrilling then
-- Determino la faccia di inizio del foro e dati correlati
local nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
-- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia
local TgA = CosB / sqrt( 1 - CosB * CosB)
local 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
if BD.C_SIMM and CosB > 0.866 then
dSubL = ( 190 / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA - 116
end
local dMaxDepthOri = dMaxDepth
dMaxDepth = min( dMaxDepth, max( dToolFreeLen - dSubL, 0))
-- se utensile scelto non arriva in fondo, cerco il più lungo
if dMaxDepth < GEO.EPS_SMALL * 10 then
sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill, nil, 'Longest')
end
end
if not sDrilling and dCheckDepth then
sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, 0, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill)
if sDrilling then dCheckDepth = nil end
@@ -482,16 +502,28 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
EgtOutLog( sErr)
return false, sErr
end
-- eventuale inversione foro in base al lato di lavoro e al lato testa dell'utensile scelto
-- se non già richiesta inversione e foro quasi orizzontale (15deg) passante
if not bToInvert and Proc.Flg == 1 and bOpen and abs( vtExtr:getZ()) < 0.259 and abs( vtExtr:getY()) > 0.966 then
local Tool = BL.GetToolFromMachining( sDrilling)
-- lato testa e lato di lavoro devono corrispondere
if ( ( Tool.PreferredSide.bFront == true) and vtExtr:getY() > 10 * GEO.EPS_SMALL)
or ( ( Tool.PreferredSide.bBack == true) and vtExtr:getY() < - 10 * GEO.EPS_SMALL) then
ptCen = ptCen - vtExtr * dLen
vtExtr = - vtExtr
bToInvert = true
end
end
-- Determino la faccia di inizio del foro e dati correlati
local nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
-- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia
local TgA = CosB / sqrt( 1 - CosB * CosB)
local dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA
TgA = CosB / sqrt( 1 - CosB * CosB)
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
if BD.C_SIMM and CosB > 0.866 then
dSubL = ( 190 / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA - 116
end
local dMaxDepthOri = dMaxDepth
dMaxDepthOri = dMaxDepth
dMaxDepth = min( dMaxDepth, max( dToolFreeLen - dSubL, 0))
-- Verifico inclinazione foro nei limiti
local bTryDrill = EgtIf( dMaxDepth > 0, ( CosB < BD.DRILL_VX_MAX), false)
+3 -3
View File
@@ -111,9 +111,6 @@ local function CalcTopPath( nProcId, AuxId, nAddGrpId, dAltMort, dSideAng, b3Sol
EgtAddCurveCompoLineTg( NewAuxId, 100, false)
EgtAddCurveCompoLineTg( NewAuxId, 100, true)
EgtMergeCurvesInCurveCompo( NewAuxId)
-- eseguo traslazione e offset per portarla sul top
local vtMove = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) * ( dAltMort - 10 * GEO.EPS_SMALL)
EgtMove( NewAuxId, vtMove, GDB_RT.GLOB)
local dOffset = dAltMort * tan( dSideAng)
if not EgtOffsetCurve( NewAuxId, dOffset) then return end
-- la limito entro la trave
@@ -121,6 +118,9 @@ local function CalcTopPath( nProcId, AuxId, nAddGrpId, dAltMort, dSideAng, b3Sol
local vtBoxDiag = b3Solid:getMax() - b3Solid:getMin()
local nCount
NewAuxId, nCount = EgtTrimFlatCurveWithBox( NewAuxId, refBox, vtBoxDiag, true, true, GDB_RT.GLOB)
-- eseguo traslazione e offset per portarla sul top
local vtMove = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) * ( dAltMort - 10 * GEO.EPS_SMALL)
EgtMove( NewAuxId, vtMove, GDB_RT.GLOB)
-- se divisa in più parti, le unisco congiungendole con segmenti
if nCount > 1 then
if EgtGetType( NewAuxId) ~= GDB_TY.CRV_COMPO then
+2 -2
View File
@@ -70,8 +70,8 @@ local function VerifyOrientation( Proc, vtN, b3Raw)
end
-- altrimenti
else
-- accetto fino a -5deg
return ( vtN:getZ() >= -0.088)
-- accetto fino a -7deg
return ( vtN:getZ() >= -0.122)
end
end
+9 -6
View File
@@ -406,17 +406,23 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
dSawThick2 = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick2
end
end
-- determino se lo spessore del materiale da rimuovere è eccessivo e quindi vanno fatti più tagli con offset
local nCuts = max( ceil( dOvmHead / (( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP) + 0.5)), 1)
local dOffsL = dOvmHead / nCuts
-- caratteristiche taglio
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
local bHorizCut = ( ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) and
( b3Raw:getDimY() < 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
-- verifico necessità di tagli aggiuntivi orizzontali o verticali
local dMinOvmHeadForAddeddCuts = 10.123
local bNeedVerticalAddedCuts = ( Proc.Face[1].WidthTrimmed > BD.MAX_LEN_DICE) and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL)
local bNeedHorizontalAddedCuts = ( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and not bBigSectionCut and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL)
local bNeedHorizontalAddedCuts = ( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and
not bBigSectionCut and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL) and
dOffsL < BD.MAX_DIM_DICE
-- dati lavorazioni sopra e sotto
local Cutting1Data = { sCutting = sCutting, dSawDiam = dSawDiam, dMaxDepth = dMaxDepth, dSawThick = dSawThick, dMaxVertDepth = dMaxVertDepth}
local Cutting2Data = { sCutting = sCutting2, dSawDiam = dSawDiam2, dMaxDepth = dMaxDepth2, dSawThick = dSawThick2}
@@ -428,9 +434,6 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
if not bNeedHCut and AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX()) < 10 * GEO.EPS_SMALL then
return true
end
-- determino se lo spessore del materiale da rimuovere è eccessivo e quindi vanno fatti più tagli con offset
local nCuts = max( ceil( dOvmHead / (( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP) + 0.5)), 1)
local dOffsL = dOvmHead / nCuts
-- se taglio per sezioni alte e larghe
if bBigSectionCut then
if dOvmHead > 0 then
+45 -19
View File
@@ -200,6 +200,7 @@ local function AssignQIdent( Proc)
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17 then
Q_DEPTH_CHAMFER = 'Q01' -- d
Q_ONLY_CHAMFER = 'Q02' -- i
Q_USE_MILL = 'Q03' -- i
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20 then
Q_DEPTH_CHAMFER = 'Q01' -- d
Q_USE_MILL = 'Q02' -- i
@@ -414,7 +415,7 @@ local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bP
end
---------------------------------------------------------------------
local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill, b3Raw)
-- se non feature BlockHausHalfLap e non abilitato parametro Q per lavorarlo di fianco e non macchina BH esco
local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
@@ -444,9 +445,13 @@ local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
-- le facce devono contenere X e quelle di chiusura devono essere perpendicolari a X
local bStopY, bStopZ
if not Proc.TopologyLongName then
Topology.Classify( Proc, b3Raw)
end
for i = 1, Proc.Fct do
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, i-1, GDB_ID.ROOT)
if abs( vtN:getX()) > 0.001 and abs( vtN:getX()) < 0.999962 then
-- permessa U passante non parallela agli assi principali
if abs( vtN:getX()) > 0.001 and abs( vtN:getX()) < 0.999962 and Proc.TopologyLongName ~= "Groove-Through-RightAngles-NotParallel-3" then
return false
end
if abs( vtN:getY()) > 0.866 then bStopY = true end
@@ -776,7 +781,7 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
-- in base al tipo di feature attribuisco il significato dei parametri Q
AssignQIdent( Proc)
-- se può essere fatto con utensile tipo lama
local bUseBHSideMill, bHead, bHeadDir = VerifyBHSideMill( Proc)
local bUseBHSideMill, bHead, bHeadDir = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
if bUseBHSideMill then
Proc.HeadDir = bHeadDir
end
@@ -784,7 +789,6 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
-- verifico se è in coda
local dEndDist = Proc.Box:getMin():getX() - b3Solid:getMin():getX()
if ( dEndDist > BD.MAX_DIST_HTFEA) or bUseBHSideMill then
if not( BD.BH_MACHINE) and bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 then
@@ -799,6 +803,12 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
( b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.Box:getDimX() > min( BD.MAX_LEN_HTFEA, 0.8 * b3Solid:getDimX())) then
return false
end
-- se interessa la coda, e pezzo lungo, si sposta dopo separazione
if b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.AffectedFaces.Left and Proc.Fct >= 2 then
return true
end
-- se una o due facce e interessa veramente la coda, allora di coda
if Proc.Fct <= 2 then
if Proc.Box:getMin():getX() < b3Solid:getMin():getX() + 1. then
@@ -836,7 +846,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
-- se 2 facce
elseif Proc.Fct == 2 then
-- se può essere fatto con utensile tipo lama
local bUseBHSideMill = VerifyBHSideMill( Proc)
local bUseBHSideMill = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
if bUseBHSideMill then
return true, false
end
@@ -916,7 +926,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
local rfFac, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
-- se può essere fatto con utensile tipo lama
local bUseBHSideMill, _, _, _, _, dTDiam = VerifyBHSideMill( Proc)
local bUseBHSideMill, _, _, _, _, dTDiam = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
if bUseBHSideMill then
if vtN:getZ() > -0.5 or b3Raw:getDimZ() - Proc.Box:getDimZ() < ( BD.MAX_DIST_BH_FROM_BOTTOM or 395) - dTDiam / 2 then
return true, false
@@ -5279,7 +5289,7 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
EgtOutLog( Cutting.Message)
end
end
if EdgeToMachine.ToolDirection:getZ() < BD.NZ_MINA then
if EdgeToMachine.ToolDirection:getZ() < BD.NZ_MINA and BD.C_SIMM then
Cutting.CanApply = false
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : skipped sawblade from bottom'
EgtOutLog( Cutting.Message)
@@ -5838,10 +5848,11 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
local sMyMchFind = 'Pocket'
local nOk, sErr
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho,
nLundIdFace = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, false, b3Solid, bClosedOrthoFaces)
nLundIdFace, sErr = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, false, b3Solid, bClosedOrthoFaces)
if nOk < 0 then
return false, sErr
elseif nOk > 0 then
sWarn = sErr
bTryWithBlades = false
end
end
@@ -5946,7 +5957,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
local bIsRabbetAlongXTowardsBottom = ( Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and Proc.AffectedFaces.Bottom and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right)
local bForceSideMill = ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and ( bIsRabbetAlongXTowardsBottom or ( ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 3 and vtN:getZ() < 0.985)) and ( ( Proc.Fct == 4 and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back)) or Proc.Fct == 3 or Proc.Fct == 2)))
-- se fattibile con fresa BH di fianco e spessore utensile inferiore alla larghezza faccia
local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill, b3Raw)
if bPrevBhSideMill == nil then
bPrevBhSideMill = bMakeBySideMill
end
@@ -6001,6 +6012,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
EgtSetMachiningParam( MCH_MP.LITANG, 0)
EgtSetMachiningParam( MCH_MP.LIPERP, dFacElev + BD.CUT_SIC)
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI)
local vtN2 = EgtSurfTmFacetNormVersor( Proc.Id, EgtIf( nFacInd == 0, 1, 0), GDB_ID.ROOT)
if vtN2 then
local AddLen = sqrt( dV^2 * ( ( 1 / abs( vtN2:getX())^2) - 1)) + BD.CUT_SIC
EgtSetMachiningParam( MCH_MP.STARTADDLEN, AddLen)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, AddLen)
end
else
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0)
EgtSetMachiningParam( MCH_MP.LITANG, dToolDiam / 2 + BD.CUT_SIC)
@@ -6137,9 +6154,20 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
vtN, vtN2 = vtN2, vtN
sPocketing = ML.FindPocketing( sMchFind, dDiam2, dFacElev2 + dCollSic2)
if not sPocketing then
local sErr = 'Error : '..sMchFind..' not found in library'
EgtOutLog( sErr)
return false, sErr
dDiam, dDiam2 = dDiam2, dDiam
dCollSic, dCollSic2 = dCollSic2, dCollSic
nFacInd, nFacInd2 = nFacInd2, nFacInd
dH, dH2 = dH2, dH
dV, dV2 = dV2, dV
dFacElev, dFacElev2 = dFacElev2, dFacElev
rfFac, rfFac2 = rfFac2, rfFac
vtN, vtN2 = vtN2, vtN
sPocketing = ML.FindPocketing( sMchFind, dDiam2, nil, nil, nil, nil, nil, nil, 'Longest')
if not sPocketing then
local sErr = 'Error : '..sMchFind..' not found in library'
EgtOutLog( sErr)
return false, sErr
end
end
end
-- provo con contornatura
@@ -7073,11 +7101,9 @@ local function TestTwoFacesDownHead( Proc)
if not ( Proc.Face[1].IsTooDownwardForTopBlade or Proc.Face[2].IsTooDownwardForTopBlade) then
bDownHeadBlade = false
else
for i = 1, Proc.Fct do
if Proc.Face[i].IsTooDownwardForTopBlade and ( not Proc.IsTopDownRabbet or Proc.Face[i].IsTooWideForTopBlade) then
bDownHeadBlade = true
break
end
if ( Proc.Face[1].IsTooDownwardForTopBlade and Proc.Face[2].IsTooWideForTopBlade) or
( Proc.Face[2].IsTooDownwardForTopBlade and Proc.Face[1].IsTooWideForTopBlade) then
bDownHeadBlade = true
end
end
end
@@ -7335,7 +7361,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- se lunghezza richiede spezzatura
if ( Proc.Box:getDimX() > BD.LONGCUT_MAXLEN) or
( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and Proc.Box:getDimX() > BD.LONGCUT_ENDLEN) or
( ( nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0) and ( Proc.Box:getDimX() > BD.LEN_SHORT_PART or 1000)) then
( ( nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0) and ( Proc.Box:getDimX() > ( BD.LEN_SHORT_PART or 1000))) then
-- una faccia
if Proc.Fct == 1 then
if bUseBlade then
@@ -7483,7 +7509,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- determino l'angolo tra le facce
local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
-- se con BH
if VerifyBHSideMill( Proc) then
if VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw) then
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
-- se ortogonali e non forzata lama, con fresa
elseif not bUseBlade then
+36 -20
View File
@@ -196,27 +196,33 @@ local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Soli
end
end
-- controllo per eseguire solo un taglio ottimizzato
local bExecJustOneCut = false
local dDiceFaceDim = GEO.INFINITO
if ( i % 2) == 0 then
for cont = 1, #vCuts[i] do
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0)
-- se feature verso Z, si ammette anche lavorazione in doppio
if AreSameVectorApprox( vtRef, Z_AX()) then
if dMaxDepth * 2 > dDiceFaceH + BD.CUT_EXTRA then
bExecJustOneCut = true
dDiceFaceDim = dDiceFaceH
break
end
elseif AreSameVectorApprox( vtRef, Y_AX()) or AreSameVectorApprox( vtRef, -Y_AX()) then
if dMaxDepth > dDiceFaceV + BD.CUT_EXTRA then
bExecJustOneCut = true
dDiceFaceDim = dDiceFaceV
break
-- se non ho intersezione con la faccia tappo posso fare il taglio sul fianco
if not nGoodFace1 or nGoodFace1 == 0 then
-- controllo per eseguire solo un taglio ottimizzato
local bExecJustOneCut = false
local dDiceFaceDim = GEO.INFINITO
if ( i % 2) == 0 then
for cont = 1, #vCuts[i] do
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0)
-- se feature verso Z, si ammette anche lavorazione in doppio
if AreSameVectorApprox( vtRef, Z_AX()) then
if dMaxDepth * 2 > dDiceFaceH + BD.CUT_EXTRA then
bExecJustOneCut = true
dDiceFaceDim = dDiceFaceH
break
end
elseif AreSameVectorApprox( vtRef, Y_AX()) or AreSameVectorApprox( vtRef, -Y_AX()) then
if dMaxDepth > dDiceFaceV + BD.CUT_EXTRA then
bExecJustOneCut = true
dDiceFaceDim = dDiceFaceV
break
end
end
end
end
-- se c'è intersezione non ci deve essere ExtraCut
else
dExtraCut = 0
end
-- se si può fare, faccio unico taglio parallelo
if bExecJustOneCut then
@@ -522,10 +528,20 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
else
dDiamMax = EgtIf( abs( frMor:getVersX():getY()) < abs( frMor:getVersY():getY()), dL, dW)
end
-- determino la distanza tra le due facce inclinate
-- determino la distanza tra le due facce inclinate per determinare elevazione
local dDistFaces
if vFaceOrd[4] ~= 0 then
dDistFaces = abs((ptC[vFaceOrd[2]]-ptC[vFaceOrd[4]])*vtN[vFaceOrd[2]])
local nElevationFace1 = 0
-- controllo estensione faccia 1
if vFaceOrd[1] ~= 0 then
frMor, dL, dW = EgtSurfTmFacetMinAreaRectangle( Proc.Id, vFaceOrd[1]-1, GDB_ID.ROOT)
if abs(vtRef:getY()) > 0.866 then
nElevationFace1 = EgtIf( abs( frMor:getVersX():getZ()) < abs( frMor:getVersY():getY()), dL, dW)
else
nElevationFace1 = EgtIf( abs( frMor:getVersX():getY()) < abs( frMor:getVersY():getY()), dL, dW)
end
end
dDistFaces = max( abs((ptC[vFaceOrd[2]]-ptC[vFaceOrd[4]])*vtN[vFaceOrd[2]]), nElevationFace1)
end
-- recupero la lavorazione. considerando l dimensione del lato e l'affondamento
local sPocketing
+8 -4
View File
@@ -374,7 +374,7 @@ local function MakeStandardCuts( Proc, b3Raw, nCuts, dOffsetBetweenCuts, TailCut
local dCutExtra = 0
local dAccStart = 0
local dAccEnd = 0
if TailCutType.bBigSectionCut and BD.C_SIMM then
if TailCutType.bBigSectionCut and BD.C_SIMM and b3Raw:getDimZ() > BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL then
-- qui arrivano sezioni molto grandi su macchine tipo PF con materiale da asportare inferiore allo spessore lama
local dSawRad = Cutting1Data.dSawDiam / 2
dCutExtra = - ( b3Raw:getDimY() - dSawRad)
@@ -631,10 +631,11 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
-- caratteristiche taglio
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dSawMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dSawMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dSawMaxDepth2) - 2 * BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
local bHorizCut = ( ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and ( b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA))
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) and
( b3Raw:getDimY() < 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
-- dati geometrici del taglio
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
-- separazione solo se esiste grezzo successivo con pezzi o scaricabile
@@ -660,7 +661,10 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
-- determino la necessità di tagli aggiuntivi
local dMinTailScrapForAdditionalCuts = 10.123
local bNeedVerticalAddedCuts = not bSplit and ( Proc.Face[1].WidthTrimmed > BD.MAX_LEN_DICE) and ( dLenEndRaw > dMinTailScrapForAdditionalCuts - 10 * GEO.EPS_SMALL)
local bNeedHorizontalAddedCuts = not bSplit and ( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and not bBigSectionCut and ( dLenEndRaw > dMinTailScrapForAdditionalCuts - 10 * GEO.EPS_SMALL)
local bNeedHorizontalAddedCuts = not bSplit and not bBigSectionCut and
( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and
( dLenEndRaw > dMinTailScrapForAdditionalCuts - 10 * GEO.EPS_SMALL) and
dOffsL < BD.MAX_DIM_DICE
-- dati lavorazioni sopra e sotto
local Cutting1Data = { sCutting = sCutting, dSawDiam = dSawDiam, dMaxDepth = dSawMaxDepth, dSawThick = dSawThick, dMaxVertDepth = dMaxVertDepth}
local Cutting2Data = { sCutting = sCutting2, dSawDiam = dSawDiam2, dMaxDepth = dSawMaxDepth2, dSawThick = dSawThick2}
+50
View File
@@ -1,7 +1,57 @@
==== Beam Update Log ====
Versione 2.7e2 (23/05/2025)
- Modif : in tagli di lama migliorie alla scelta del lato da lavorare
- Modif : in mortasa coda di rondine migliorati i percorsi
- Modif : in tenone coda di rondine migliorate le lavorazioni da sotto
- Fixed : in Scarf Joint correzione alla scelta faccia da lavorare
Versione 2.7e1 (05/05/2025)
- Fixed : in taglio di separazione si riduce percorso di taglio solo se il pezzo è effettivamente alto
- Fixed : in foratura corretto caso in cui non si sceglieva l'utensile più lungo disponibile
- Fixed : In BatchProcess (Ts7) corretta generazione in caso di progetto senza ricalcolo
- Modif : in LapJoint se tunnel verticale lavorato solo da sopra e l'utensile non arriva, si restituisce warning
Versione 2.7d3 (22/04/2025)
- Fixed : in LapJoint corretta gestione errata Q04
Versione 2.7d2 (17/04/2025)
- Added : in scanalatura aggiunta Q03 per forzare fresa
- Modif : in slot con lama + sega a catena abilitata lavorazione da sotto per macchine con testa sopra
- Modif : nei tagli modifche in caso di tagli di coda anticipati
- Modif : in lavorazioni tipo tacca ma 3 facce migliorata la scelta faccia
Versione 2.7d1 (04/04/2025)
- Fixed : in PreDrill piccola correzione
- Fixed : nei tagli varie correzioni
- Fixed : in HeadCut e Split corretto calcolo lunghezza extra di taglio
Versione 2.7c2 (24/03/2025)
- Fixed : in BatchProcess (Ts7) riabilitata modifica barra erroneamente rimossa
Versione 2.7c1 (17/03/2025)
- Modif : in HeadCut e Split, per decidere se fare doppio taglio verticale, si controlla anche il massimo possibile e non solo il minimo
- Modif : in LapJoint migliorato controllo per decidere se feature di coda
- Modif : nei tagli, se taglio rivolto verso il basso e non possibile tagliare di fianco, si fa in fase ribaltata
- Fixed : in BatchProcess (Ts7) corretta restituzione stato feature erroneamente segnalata verde
- Fixed : corretta restituzione stato feature lavorata in doppio
Versione 2.7b3 (03/03/2025)
- Modif : in forature passanti orizzontali fatte da un solo lato, si inverte il lato di lavoro in base all'utensile scelto
- Modif : in LapJoint in lavorazione tipo BH permessa U passante non parallela agli assi principali; attacchi migliorati
- Modif : in LapJoint le feature di coda con pezzo lungo vengono spostate sempre dopo separazione
- Fixed : in macchine tipo Turn piccoli miglioramenti ai tagli di lama
Versione 2.7b2 (05/02/2025)
- Modif : si consentono DrillPocket in doppio solo se foro non passante
Versione 2.7b1 (04/02/2025)
- Modif : in tagli di testa e coda l'utilizzo delle lame grandi (es: 1000 su 15003TMAX) è limitato ai pezzi più bassi di 300 mm e più larghi di 300 mm
Versione 2.7a2 (23/01/2025)
- Added : in RidgeLap aggiunta Q05 per usare la fresa tipo LapJoint
- Fixed : in BatchProcess (Ts7) piccola correzione
- Fixed : in ScarfJoint, in caso di taglio dal lato, aggiunta estensione oltre il bordo
Versione 2.7a1 (21/01/2025)
- Added : in FreeContour aggiunta Q09 per inversione ultima lavorazione
+1 -1
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '2.7a2'
VERSION = '2.7e2'
MIN_EXE = '2.6e5'