Compare commits

...

52 Commits

Author SHA1 Message Date
andrea.villa c5a8b852d9 - in LapJpint, in MakeLongMoreFaces si aggiunge faccia di fondo anche per topologia Groove passante a 3 facce 2024-09-03 15:11:53 +02:00
andrea.villa 69514074a9 - In ScarfJoint, in ApplyDiceCut, tagli paralleli fatti con unico passaggio di fianco 2024-09-03 12:45:28 +02:00
luca.mazzoleni 4685b6bde6 - se lapjoint attraversata da L055, la lapjoint viene fatta prima 2024-08-29 10:47:51 +02:00
luca.mazzoleni 3a063bd2cf Merge branch 'master' into develop 2024-08-26 18:10:47 +02:00
luca.mazzoleni 710a1fe070 - HotFix: in FacesBySaw -> MakeOne corretto SCC in caso di soluzione alternativa 2024-08-26 18:10:20 +02:00
luca.mazzoleni d818492d67 Merge tag '2.6h2' into develop
release
2024-08-26 15:43:59 +02:00
luca.mazzoleni e55e33c40a Merge branch 'release/2.6h2' 2024-08-26 15:43:44 +02:00
luca.mazzoleni 8cadb25261 update log e version 2024-08-26 15:43:30 +02:00
luca.mazzoleni 2622b58cad Merge branch 'OneFaceCutAlternativeDirection' into develop 2024-08-26 15:31:03 +02:00
luca.mazzoleni b5be932955 - in FacesBySaw -> MakeOne aggiunta la possibilità di passare una direzione di lavoro alternativa per poter rispettare contemporaneamente la direzione di lavoro concorde e la direzione di taglio 2024-08-26 15:17:31 +02:00
luca.mazzoleni 44ac2f8c2a Merge branch 'test' into develop 2024-08-22 16:37:55 +02:00
luca.mazzoleni 0b928e987f - in LapJoint -> svuotatura, correzione all'utilizzo dell'elevazione custom 2024-08-22 15:49:25 +02:00
luca.mazzoleni c213c3f059 - in LapJoint -> svuotatura, se l'utente ha definito un'elevazione custom si lavora sempre la faccia standard 2024-08-22 15:23:03 +02:00
luca.mazzoleni 330698b6aa in tunnel LapJoint -> tunnel lo smusso funziona anche se è forzata la sega a catena 2024-08-22 12:01:43 +02:00
luca.mazzoleni eb1ef693c4 Merge branch 'test' into develop 2024-08-22 11:25:02 +02:00
luca.mazzoleni 862751c84a - in FacesBySaw attacchi tangenziali solo da un lato limitati a facce con Z negative
- in BatchProcess e New si verifica l'abilitazione della generazione con EgtVerifyKeyOption
- in Version, MIN_EXE modificato per richiesta compatibilità con EgtVerifyKeyOption
2024-08-21 13:05:31 +02:00
luca.mazzoleni e5a30c38d3 Merge tag '2.6h1' into develop
r
2024-08-20 17:45:26 +02:00
luca.mazzoleni e83d8db1cc Merge branch 'release/2.6h1' 2024-08-20 17:45:14 +02:00
luca.mazzoleni 9de88ffe84 update log e version 2024-08-20 17:45:00 +02:00
luca.mazzoleni ffaf33c62e in BatchProcessNew se flag apposito in Cam5 la generazione è disabilitata 2024-08-20 17:34:46 +02:00
luca.mazzoleni 8c0389582b Merge branch 'ImproveDicingParallelTangentLead' into develop 2024-08-20 17:05:20 +02:00
luca.mazzoleni ebe3d79c11 - in FacesBySaw attacchi tangenziali solo da un lato limitati a facce con basse componenti Y
- in split e headcut i tagli addizionali orizzontali o verticali, se la macchina ha i ruli, si fanno sempre con attacco tangenziale
2024-08-20 17:02:37 +02:00
luca.mazzoleni f8c40739da - in attacchi tangenziali solo da un lato alcune correzioni
- aggiunta la raccolta delle Affected Faces a tutti i casi in cui si crea una feature a posteriori (non presente nel btl)
2024-08-19 17:37:16 +02:00
luca.mazzoleni fa5aac926e - attacchi tangenziali solo da un lato lasciati solo per se FacesBySaw è chiamata da ProcessCut 2024-08-09 12:02:27 +02:00
luca.mazzoleni 749cd1e2bb - in FacesBySaw limiti alle normali se attacco tangenziale dallo stesso lato 2024-08-09 12:00:20 +02:00
luca.mazzoleni 587aaaafce - in FacesBySaw->MakeOne, se attacco tangenziale e cubetti paralleli, si attacca e stacca sempre dallo stesso lato
- modificate di conseguenza funzioni significative che generano questi tipi di taglio
2024-08-08 15:20:51 +02:00
luca.mazzoleni 2cfa7caba7 Merge branch 'ImproveChamferLapJoint' into develop 2024-08-07 17:46:16 +02:00
luca.mazzoleni fc0fba5bd3 - in FacesBySaw revert delle modifiche precedenti per problemi di chiusura rulli 2024-08-07 17:45:38 +02:00
luca.mazzoleni 94159f88f3 - in FacesBySaw.MakeOne se si ha outstroke si tenta attacco alternativo 2024-08-07 16:11:38 +02:00
luca.mazzoleni 4961d2d528 - in LapJoint gestito smusso nel caso Groove-Blind-RightAngles-Parallel-4 2024-08-06 15:25:37 +02:00
luca.mazzoleni 7b22f5cc47 Merge remote-tracking branch 'origin/develop' into develop 2024-08-06 15:19:50 +02:00
andrea.villa 5047d5b652 In SimpleSarf, se assimilabile ad un taglio (1 faccia) si considerare area non pinzabile testa/coda 2024-08-05 09:24:14 +02:00
luca.mazzoleni 7f9b880ff7 Merge branch 'master' into develop 2024-07-19 18:06:44 +02:00
luca.mazzoleni 7e457a22b0 update log e versione 2024-07-19 18:06:32 +02:00
luca.mazzoleni 3c080e2b1a in BatchProcess e BatchProcessNew bToRecalc forzato se flag 3 o 4 2024-07-19 18:04:16 +02:00
luca.mazzoleni 9d3edbfb54 - in BatchProcessNew bToRecalc forzato se flasg 3 o 4
- in ProcessLapJoint si evita di tentare di lavorare con sega a catena da sotto
2024-07-19 16:08:18 +02:00
luca.mazzoleni adf465c5e2 -in SawPlusChain non non si applicano lavorazioni con lama da sotto (lama da sotto al momento non gestita)
-in SawPlusChain ora se una lavorazione non è applicabile si prosegue con le altre invece di uscire
2024-07-18 18:41:09 +02:00
luca.mazzoleni 23f695fd56 Merge branch 'master' into develop 2024-07-18 16:03:36 +02:00
luca.mazzoleni 52f347def1 update log e version 2024-07-17 16:10:37 +02:00
luca.mazzoleni 028688b88a - in SawPlusChain con tunnel passante fatto da un solo lato, se apply della sega a catena fallisce per finecorsa, si riapplica dal lato opposto 2024-07-17 16:06:26 +02:00
luca.mazzoleni cde5b137ae update log e versione per 2.6g3 2024-07-17 15:24:10 +02:00
luca.mazzoleni d0cf5887d3 -in LongCut invertito senso di rotazione truciolatore (ora è in discordanza) 2024-07-17 12:28:21 +02:00
luca.mazzoleni afc4c6aaff - corretto problema in LongDoubleCut in cui si sbagliava la riduzione di affondamento con lama da sotto
- in Lapjoint aggiunta Q_FORCE_CHAINSAW per forzare sega a catena anche in casi in cui ci passerebbe la fresa
2024-07-17 11:46:07 +02:00
luca.mazzoleni caa1875309 Merge branch 'master' into develop 2024-07-12 12:53:14 +02:00
luca.mazzoleni 2e2c2188ce - gestite lavorazioni singole da fare dopo separazione, tramite restituzione di AddedIds dalle Make
- al momento implementato per caso specifico di LongDoubleCut (e Lapjoint riconducibile a LongDoubleCut)
2024-07-12 12:52:53 +02:00
Dario Sassi 0acd75bece DataBeam :
- inserito controllo massimo numero di facce (20) per eseguire GetFacetsInfo.
2024-07-09 18:18:56 +02:00
Dario Sassi db691cefe4 Merge commit 'd0ecd175c284b108acb1b4290cf5616b61d121c8' 2024-07-09 17:52:36 +02:00
luca.mazzoleni d0ecd175c2 Merge branch 'master' into develop 2024-07-08 15:52:25 +02:00
luca.mazzoleni 7e6d4189ef - corretto typo in nome variabile 2024-07-08 15:52:05 +02:00
Dario Sassi abbc200504 Beam :
- anche nel taglio a cubetti se cè' si chiama GetNzLimDownUp di macchina per decidere limite orientamento lama verso il basso.
2024-07-05 18:32:55 +02:00
Dario Sassi 9e4597b739 Beam :
- aggiunta possibilità di funzione GetNzLimDownUp specifica per ogni macchina.
2024-07-05 11:13:08 +02:00
luca.mazzoleni d84d146701 Merge branch 'master' into develop 2024-07-04 15:51:41 +02:00
30 changed files with 471 additions and 148 deletions
+3 -2
View File
@@ -461,7 +461,7 @@ else
-- Passo in modalità lavora
EgtSetCurrMachGroup( EgtGetLastMachGroup())
-- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni
if bToRecalc then
if bToRecalc or BEAM.FLAG == 3 or BEAM.FLAG == 4 then
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
EgtImportSetup()
EgtApplyAllMachinings()
@@ -525,7 +525,8 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F
end
-- *** Genero programma CN *** ( se richiesto)
if BEAM.FLAG == 0 or BEAM.FLAG == 4 then
local bIsGenerationEnabled = ( EgtVerifyKeyOption( 110) == false)
if bIsGenerationEnabled and ( BEAM.FLAG == 0 or BEAM.FLAG == 4) then
EgtOutLog( ' +++ Generating NC part program >>>')
local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '')
if EgtGetExeVersion then
+3 -2
View File
@@ -562,7 +562,7 @@ else
-- Passo in modalità lavora
EgtSetCurrMachGroup( EgtGetLastMachGroup())
-- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni
if bToRecalc then
if bToRecalc or BEAM.FLAG == 3 or BEAM.FLAG == 4 then
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
EgtImportSetup()
EgtApplyAllMachinings()
@@ -626,7 +626,8 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F
end
-- *** Genero programma CN *** ( se richiesto)
if BEAM.FLAG == 0 or BEAM.FLAG == 4 then
local bIsGenerationEnabled = ( EgtVerifyKeyOption( 110) == false)
if bIsGenerationEnabled and ( BEAM.FLAG == 0 or BEAM.FLAG == 4) then
EgtOutLog( ' +++ Generating NC part program >>>')
local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '')
if EgtGetExeVersion then
+48 -9
View File
@@ -844,6 +844,16 @@ local function OrderFeatures( vProc, b3Raw)
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
return false
end
-- se primo è ribasso e secondo è una mortasa a coda di rondine, il ribasso va sempre prima a meno che la mortasa a coda di rondine non sia di testa
if LapJoint.Identify(B1) and B1.PassedByDtMortise and DtMortise.SideIdentify(B2) and
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
return true
end
-- se primo è mortasa a coda di rondine e secondo è ribasso, la mortasa a coda di rondine va sempre dopo a meno che la mortasa a coda di rondine non sia di testa
if DtMortise.SideIdentify(B1) and LapJoint.Identify(B2) and B2.PassedByDtMortise and
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
return false
end
-- se primo è feature di coda e l'altro è separazione o non è feature di coda
if B1.Tail and ( Split.Identify( B2) or not B2.Tail) then
return false
@@ -1275,6 +1285,7 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
local bOk = true
local sErr = ''
local nNewPhase = -1
local AddedIds
EgtOutLog( ' * Process ' .. tostring( Proc.Id) .. ' *', 1)
-- se intestatura ( 1-340-X )
if Hcut.Identify( Proc) then
@@ -1300,7 +1311,7 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
elseif Long2Cut.Identify( Proc) then
-- se due facce longitudinali, eseguo doppio taglio longitudinale
if Long2Cut.GetLongFacesCount( Proc) == 2 then
bOk, sErr = Long2Cut.Make( Proc, nPhase, nRawId, nPartId)
bOk, sErr, _, AddedIds = Long2Cut.Make( Proc, nPhase, nRawId, nPartId)
-- altrimenti eseguo singolo taglio longitudinale
else
bOk, sErr = LongCut.Make( Proc, nPhase, nRawId, nPartId)
@@ -1318,7 +1329,7 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
-- o se rivestimento ( 3/4-034-X) o se mezzolegno chalet ( 4-037-X) o se tasca ( 4-039-X) o se taglio triangolato ( 4-120-X)
elseif LapJoint.Identify( Proc) then
-- esecuzione mezzo-legno o scanalatura
bOk, sErr = LapJoint.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
bOk, sErr, _, AddedIds = LapJoint.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- se smusso ( 3/4-036-X)
elseif Chamfer.Identify( Proc) then
-- esecuzione smusso
@@ -1423,7 +1434,7 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
EgtOutLog( sErr)
bOk = false
end
return bOk, sErr, ( nNewPhase or -1)
return bOk, sErr, ( nNewPhase or -1), AddedIds
end
-------------------------------------------------------------------------------------------------------------
@@ -2002,6 +2013,10 @@ function GetFeatureInfoAndDependency( vProc, b3Raw)
if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove' or Mortise.Identify( Proc)) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
Proc.PassedByHole = true
end
-- verifico se feature tipo LapJoint è attraversata da almeno una mortasa a coda di rondine
if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove') and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
Proc.PassedByDtMortise = true
end
-- verifiche per specchiature
if BD.DOWN_HEAD or BD.TWO_EQUAL_HEADS then
-- forature
@@ -2096,7 +2111,8 @@ function BeamExec.ProcessFeatures()
-- flag feature precedente in doppio
local nPrevDouble = 0
-- inserisco le lavorazioni da lavorare ribaltate
for i = 1, #vProc do
local i = 1
while i <= #vProc do
-- creo la lavorazione
local Proc = vProc[i]
if Proc.Flg ~= 0 and Proc.Down then
@@ -2107,7 +2123,13 @@ function BeamExec.ProcessFeatures()
Proc.DistanceToNextPart = BL.GetDistanceToNextPart( nRawId, nPhase)
Proc.PrevDouble = nPrevDouble
nPrevDouble = Proc.Double
local bOk, sMsg, nNewPhase = AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bNeedHCut, b3Raw, nOrd, sDownOrSideOrStd, nil, nil, dCurrOvmT)
local bOk, sMsg, nNewPhase, AddedIds = AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bNeedHCut, b3Raw, nOrd, sDownOrSideOrStd, nil, nil, dCurrOvmT)
-- lavorazioni da fare dopo separazione
if AddedIds and #AddedIds > 0 then
for j = 1, #AddedIds do
table.insert( vProc, AddedIds[j])
end
end
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId})
@@ -2137,6 +2159,7 @@ function BeamExec.ProcessFeatures()
EgtSetInfo( nDispId, 'ROT', -2)
end
end
i = i + 1
end
-- se separazione non ancora effettuata, aggiungo nuova fase con le travi in posizione standard
if not bSplitRot then
@@ -2178,7 +2201,8 @@ function BeamExec.ProcessFeatures()
local nPrevDouble = 0
-- inserisco le lavorazioni da lavorare ruotate
local nSideMchOk = 0
for i = 1, #vProc do
local i = 1
while i <= #vProc do
-- creo la lavorazione
local Proc = vProc[i]
if Proc.Flg ~= 0 and Proc.Side then
@@ -2189,7 +2213,13 @@ function BeamExec.ProcessFeatures()
Proc.DistanceToNextPart = BL.GetDistanceToNextPart( nRawId, nPhase)
Proc.PrevDouble = nPrevDouble
nPrevDouble = Proc.Double
local bOk, sMsg, nNewPhase = AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, false, b3Raw, nOrd, sDownOrSideOrStd, bPreMove, vtMove, dCurrOvmT)
local bOk, sMsg, nNewPhase, AddedIds = AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, false, b3Raw, nOrd, sDownOrSideOrStd, bPreMove, vtMove, dCurrOvmT)
-- lavorazioni da fare dopo separazione
if AddedIds and #AddedIds > 0 then
for j = 1, #AddedIds do
table.insert( vProc, AddedIds[j])
end
end
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId})
@@ -2222,6 +2252,7 @@ function BeamExec.ProcessFeatures()
EgtSetInfo( nDispId, 'ROT', -1)
end
end
i = i + 1
end
-- se non sono state inserite lavorazioni di fianco, elimino la fase perchè inutile e dannosa
if nSideMchOk == 0 then
@@ -2248,7 +2279,8 @@ function BeamExec.ProcessFeatures()
-- flag feature precedente in doppio
local nPrevDouble = 0
-- inserisco le lavorazioni non ribaltate della trave
for i = 1, #vProc do
local i = 1
while i <= #vProc do
-- creo la lavorazione
local Proc = vProc[i]
if Proc.Flg ~= 0 and ( not ( Proc.Down or Proc.Side) or BD.DOWN_HEAD or BD.TURN) then
@@ -2259,7 +2291,13 @@ function BeamExec.ProcessFeatures()
Proc.DistanceToNextPart = BL.GetDistanceToNextPart( nRawId, nPhase)
Proc.PrevDouble = nPrevDouble
nPrevDouble = Proc.Double
local bOk, sMsg, nNewPhase = AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, false, b3Raw, nOrd, sDownOrSideOrStd, nil, nil, dCurrOvmT)
local bOk, sMsg, nNewPhase, AddedIds = AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, false, b3Raw, nOrd, sDownOrSideOrStd, nil, nil, dCurrOvmT)
-- lavorazioni da fare dopo separazione
if AddedIds and #AddedIds > 0 then
for j = 1, #AddedIds do
table.insert( vProc, AddedIds[j])
end
end
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
@@ -2287,6 +2325,7 @@ function BeamExec.ProcessFeatures()
EgtSetInfo( nDispId, 'ORD', nOrd)
end
end
i = i + 1
end
EgtOutLog( ' *** End AddMachinings ***', 1)
-- passo al grezzo successivo
+8 -1
View File
@@ -734,7 +734,9 @@ end
-------------------------------------------------------------------------------------------------------------
function BeamLib.GetNzLimDownUp( b3Raw, vtN, vtOrtho)
if BD.C_SIMM then
if BD.GetNzLimDownUp then
return BD.GetNzLimDownUp( b3Raw, vtN, vtOrtho)
elseif BD.C_SIMM then
return -0.484
elseif BD.TURN then
return -2
@@ -1186,6 +1188,11 @@ end
-------------------------------------------------------------------------------------------------------------
function BeamLib.GetFacetsInfo( Proc, b3Raw)
if Proc.Fct > 20 then
return nil
end
local Face = {}
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( Proc.PartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
local vAdj
+67 -13
View File
@@ -45,7 +45,7 @@ local BD = require( 'BeamData')
local ML = require( 'MachiningLib')
---------------------------------------------------------------------
function MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, nFaceUse, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert)
function MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, nFaceUse, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert, bForceTangentLeadInOut)
EgtOutLog( 'FacesBySaw.MakeParallelOne', 3)
-- dati della faccia
local ptC, vtN = EgtSurfTmFacetCenter( nSurfId, nFacet, GDB_ID.ROOT)
@@ -76,7 +76,7 @@ function MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, nFaceUse, dVzLimD
local bLioTang
local Ktp = 1.1
if BD.KIOTP then Ktp = BD.KIOTP end
if Ktp * dLi2Tang < dLiPerp then
if bForceTangentLeadInOut or ( Ktp * dLi2Tang < dLiPerp) then
bLioTang = true
dLiTang, dLiPerp, dLoTang, dLoPerp = dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp
if BD.TURN then
@@ -192,7 +192,7 @@ local function GetNameSolidFaceIncludingLine( b3Solid, ptP1Comp, ptP2Comp)
end
---------------------------------------------------------------------
function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert, bMaximizeVerticalDepth)
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
if ( Par5 == MCH_MILL_FU.PARAL_DOWN or
Par5 == MCH_MILL_FU.PARAL_TOP or
@@ -200,7 +200,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
Par5 == MCH_MILL_FU.PARAL_BACK or
Par5 == MCH_MILL_FU.PARAL_LEFT or
Par5 == MCH_MILL_FU.PARAL_RIGHT) then
return MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert)
return MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert, bForceTangentLeadInOut)
end
-- la lama ha asse perpendicolare alla faccia
EgtOutLog( 'FacesBySaw.MakeOne', 3)
@@ -209,6 +209,8 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
-- risolvo parametro ambiguo
local nOrthoOpposite
local vtOrthO
local nOrthoOppositeAlternative
local vtOrthOAlternative
if isVector3d( Par5) then
nOrthoOpposite = BL.GetNearestOrthoOpposite( Par5, vtN)
vtOrthO = Vector3d( Par5)
@@ -216,6 +218,15 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
nOrthoOpposite = Par5
vtOrthO = BL.GetVersRef( Par5)
end
if Par5Alternative then
if isVector3d( Par5Alternative) then
nOrthoOppositeAlternative = BL.GetNearestOrthoOpposite( Par5Alternative, vtN)
vtOrthOAlternative = Vector3d( Par5Alternative)
else
nOrthoOppositeAlternative = Par5Alternative
vtOrthOAlternative = BL.GetVersRef( Par5Alternative)
end
end
EgtOutLog( 'VtOrthO='..tostring( vtOrthO)..' FaceUse='..tostring( nOrthoOpposite), 3)
-- verifico se testa da sotto oppure se lavorazione sotto con testa da sopra
if not dVzLimDwnUp then dVzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN, vtOrthO) end
@@ -235,13 +246,34 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
end
local bIsSawCCW = ( EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0)
local bInvert = bForceInvert
-- se la lama ruota in senso antiorario inverto la direzione di lavorazione, per avere rotazione lama opposta a avanzamento
-- l'inversione può essere comandata da rotazione lama (direzione concorde, legata anche a DownUp) oppure da direzione Z del percorso (si preferisce lavorare dal basso verso l'alto per limitare le corse)
-- se c'è disaccordo tra rotazione e direzione si cambia il lato di lavoro, se possibile. Se ciò non è possbile comanda la direzione.
if bInvert == nil then
if not BD.TURN or abs( ptP2:getY() - ptP1:getY()) < 250 then
if bIsSawCCW ~= bDownUp then
bInvert = ( ptP2:getZ() < ptP1:getZ() + 100 * GEO.EPS_SMALL)
local bIsMachiningDownwards = ( ptP2:getZ() < ptP1:getZ() - 100 * GEO.EPS_SMALL)
local bIsMachiningUpwards = ( ptP2:getZ() > ptP1:getZ() + 100 * GEO.EPS_SMALL)
if ( bIsSawCCW ~= bDownUp) and bIsMachiningDownwards then
bInvert = true
elseif ( ( bIsSawCCW ~= bDownUp) ~= bIsMachiningDownwards) then
if Par5Alternative then
bInvert = true
nOrthoOpposite = nOrthoOppositeAlternative
vtOrthO = vtOrthOAlternative
-- avendo riassegnato la direzione di lavoro, i dati della linea vanno ricalcolati
ptP1, ptPm, ptP2, vtV1, vtV2, dLen, dWidth = EgtSurfTmFacetOppositeSide( nSurfId, nFacet, BL.GetVersRef( nOrthoOpposite), 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)
return true, ''
end
vtV1 = - vtV1
elseif bIsMachiningDownwards or not bIsMachiningUpwards then
bInvert = true
else
bInvert = false
end
else
bInvert = ( ptP2:getZ() < ptP1:getZ() - 100 * GEO.EPS_SMALL)
bInvert = false
end
else
local vtTmp = ptP2 - ptP1 ; vtTmp:normalize()
@@ -330,8 +362,26 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
local dLiTang, dLiPerp, dLoTang, dLoPerp, vtLio = FacesBySaw.CalcLeadInOutPerpGeom( ptPa1, ptPa2, vtV1, vtV2, vtN, dSawDiam / 2, vtRef, dCutExtra, b3Box)
local dLenLi = sqrt( dLiTang * dLiTang + dLiPerp * dLiPerp)
local dLenLo = sqrt( dLoTang * dLoTang + dLoPerp * dLoPerp)
local dLiCompLength = 0
-- attacco tangente
local dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp = FacesBySaw.CalcLeadInOutTangGeom( ptPa1, ptPa2, vtN, dSawDiam / 2, vtRef, dCutExtra, b3Box)
local dLi2Tang = 0
local dLi2Perp = 0
local dLo2Tang = 0
local dLo2Perp = 0
local dLi2CompLength = 0
-- si predilige un attacco tangenziale (con calcolo automatico di quanto uscire) se faccia che guarda in giù, non troppo orientata verso X e linea non troppo inclinata in X
-- non si fa se macchina tipo PF e pezzo alto perchè la lama, uscendo da sopra, toccherebbe la traversa
-- TODO si potranno togliere i limiti sulle normali quando si implementerà un modo per calcolare Lead In / Out correttamente in tutti i casi
--
if bSpecialTangentLeadInOut and not bIsBiLinea and ( vtN:getZ() < - 0.087) and ( abs( vtN:getX()) < 0.258) and ( abs( vtTg:getX()) < 0.1736) and ( abs( vtN:getY()) < 0.5 or ( BD.MAX_DIM_HTCUT_HBEAM > 0 or ( b3Raw:getDimZ() < 420))) then
dLi2Tang = 0
dLi2Perp = BD.CUT_EXTRA
dLi2CompLength = dLen + dSawDiam / 2 + BD.COLL_SIC
dLo2Tang = dSawDiam / 2
else
dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp = FacesBySaw.CalcLeadInOutTangGeom( ptPa1, ptPa2, vtN, dSawDiam / 2, vtRef, dCutExtra, b3Box)
end
local dLenLi2 = abs( dLi2Tang)
local dLenLo2 = abs( dLo2Tang)
@@ -402,7 +452,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
dLoPerp = BD.COLL_SIC
else
bLioTang = true
dLiTang, dLiPerp, dLoTang, dLoPerp = dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp
dLiTang, dLiPerp, dLoTang, dLoPerp, dLiCompLength = dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp, dLi2CompLength
end
end
-- posizione braccio
@@ -475,6 +525,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
if BD.TURN and bLioTang == 1 then EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TG_PERP) end
EgtSetMachiningParam( MCH_MP.LITANG, dLiTang)
EgtSetMachiningParam( MCH_MP.LIPERP, dLiPerp)
EgtSetMachiningParam( MCH_MP.LICOMPLEN, dLiCompLength)
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)
@@ -624,7 +675,8 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType,
local vtOrthO = EgtIf( ( i % 2) == 1, vtRef[nOtInd], vtRef[nUpInd])
-- lavoro la faccia
for j = 1, #vCuts[i] do
local bOk, sErr = FacesBySaw.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthO, dNzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = FacesBySaw.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthO, dNzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then
return bOk, sErr
end
@@ -684,14 +736,16 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType,
end
-- taglio perpendicolare (limite Vz Down Up messo a -2 per non farlo mai intervenire)
if vCuts[i][j] then
local bOk, sErr = FacesBySaw.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO_1, -2, dExtraCut_1, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = FacesBySaw.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO_1, -2, dExtraCut_1, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then
return bOk, sErr
end
end
-- taglio parallelo (limite Vz Down Up messo a -2 per non farlo mai intervenire)
if vCuts[i+1][j] then
local bOk, sErr = FacesBySaw.MakeOne( vCuts[i+1][j], 0, sCutting, dSawDiam, vtOrthoO_2, -2, dExtraCut_2, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bSpecialTangentLeadInOut = ( ( i + 1) % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = FacesBySaw.MakeOne( vCuts[i+1][j], 0, sCutting, dSawDiam, vtOrthoO_2, -2, dExtraCut_2, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then
return bOk, sErr
end
+4 -2
View File
@@ -151,7 +151,8 @@ function ProcessBlockHausFront.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dO
-- se va fatto, inserisco la lavorazione
if bCut then
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
-- se taglio applicato setto la nota al gruppo Mach per non doverla lavorare una seconda volta
if bOk then
@@ -242,7 +243,8 @@ function ProcessBlockHausFront.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dO
-- se va fatto, inserisco la lavorazione
if bCut then
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
-- se taglio applicato setto la nota al gruppo Mach per non doverla lavorare una seconda volta
if bOk then
+22 -6
View File
@@ -542,9 +542,14 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
local dVzLimDwnUp = dNzLimDwnUp
if j ~= 1 then
vtNewOrthoO = -vtOrthoO
if not BD.C_SIMM and not BD.TURN and abs( vtN:getY()) > 0.05 then dVzLimDwnUp = -0.708 end
if BD.GetNzLimDownUp then
dVzLimDwnUp = BD.GetNzLimDownUp( b3Raw, vtN, V_NULL(), true)
elseif not BD.C_SIMM and not BD.TURN and abs( vtN:getY()) > 0.05 then
dVzLimDwnUp = -0.708
end
end
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtNewOrthoO, dVzLimDwnUp, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtNewOrthoO, dVzLimDwnUp, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then return bOk, sErr end
end
-- tutti gli altri casi vengono saltati
@@ -566,8 +571,17 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
end
end
local dVzLimDwnUp = dNzLimDwnUp
if not BD.C_SIMM and not BD.TURN and vtN:getZ() > 0.707 then dVzLimDwnUp = -0.708 end
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw)
if BD.GetNzLimDownUp then
dVzLimDwnUp = BD.GetNzLimDownUp( b3Raw, vtN, V_NULL(), true)
elseif not BD.C_SIMM and not BD.TURN and vtN:getZ() > 0.707 then
dVzLimDwnUp = -0.708
end
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local vtOrthoOAlternative
if ( i % 2 == 0) and ( Proc.Fct == 1) and bNoPerpCuts then
vtOrthoOAlternative = - vtOrthoO
end
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw, nil, nil, bSpecialTangentLeadInOut, nil, vtOrthoOAlternative)
if not bOk then return bOk, sErr end
end
end
@@ -749,14 +763,16 @@ local function MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- taglio perpendicolare (limite Vz Down Up messo a -2 per non farlo mai intervenire)
if vCuts[i][j] then
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO_1, -2, dExtraCut_1, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO_1, -2, dExtraCut_1, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then
return bOk, sErr
end
end
-- taglio parallelo (limite Vz Down Up messo a -2 per non farlo mai intervenire)
if vCuts[i+1][j] then
local bOk, sErr = Fbs.MakeOne( vCuts[i+1][j], 0, sCutting, dSawDiam, vtOrthoO_2, -2, dExtraCut_2, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = Fbs.MakeOne( vCuts[i+1][j], 0, sCutting, dSawDiam, vtOrthoO_2, -2, dExtraCut_2, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then return bOk, sErr end
end
end
+4 -2
View File
@@ -521,7 +521,8 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local b3Add = EgtGetBBoxGlob( AddId, GDB_BB.STANDARD)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Add, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, nil, nil, bForced, b3Raw, sNotes, dOvmTail, true)
if not bOk then return bOk, sErr end
end
@@ -533,7 +534,8 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local b3Add = EgtGetBBoxGlob( AddId, GDB_BB.STANDARD)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Add, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, nil, nil, bForced, b3Raw, sNotes, dOvmTail, true)
if not bOk then return bOk, sErr end
end
+2 -1
View File
@@ -1433,7 +1433,8 @@ local function MakeAuxCut( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Sol
return true
end
-- inserisco la lavorazione
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, Head = Proc.Head, Tail = Proc.Tail}
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, Head = Proc.Head, Tail = Proc.Tail, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return bOk, sErr end
-- imposto la nota nel gruppo aggiuntivo di lavorazione per evitare di tagliare una seconda volta
+2 -1
View File
@@ -210,7 +210,8 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptCutC, vtCutN, b3Solid, GDB_RT.GLOB)
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp - 2, Prc = 10, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH, bFromBottom)
if not bOk then return bOk, sErr end
+2 -1
View File
@@ -207,7 +207,8 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
if not bOk then return bOk, sErr end
+4 -2
View File
@@ -173,7 +173,8 @@ local function AddVerticalPreCuts( Proc, sCutting, dCutXOffset, b3Raw )
for j = nVerticalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_FRONT
local dVerticalCutOffset = dVerticalSliceHeight * -j
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, '', b3Raw)
local bForceTangentLeadInOut = BD.PRESS_ROLLER
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, '', b3Raw, nil, nil, nil, bForceTangentLeadInOut)
if not bOk then return bOk, sErr end
end
return bOk, sErr
@@ -359,7 +360,8 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
for j = nHorizontalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_DOWN
local dHorizontalCutOffset = dHorizontalSliceHeight * -j
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dHorizontalCutOffset, 0, 0, '', b3Raw)
local bForceTangentLeadInOut = BD.PRESS_ROLLER
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dHorizontalCutOffset, 0, 0, '', b3Raw, nil, nil, nil, bForceTangentLeadInOut)
if not bOk then return bOk, sErr end
end
-- se necessario taglio verticale doppio, eseguo l'opposto
+157 -67
View File
@@ -108,6 +108,7 @@
-- 2024/06/18 In MakeByMillAsSaw si cerca di orientare il motore verso il lato più vicino (rispetto a dove è la feature)
-- 2024/06/28 In VerifySideMillAsSaw modificato criterio ricerca utensile in base a normale della faccia
-- 2024/07/04 In IsTailFeature controllo per spostare lapjoint dopo taglio di separazione per lavorazioni tipo BH
-- 2024/09/03 In MakeLongMoreFaces si aggiunge faccia di fondo anche per topologia Groove passante a 3 facce
-- Tabella per definizione modulo
local ProcessLapJoint = {}
@@ -141,6 +142,9 @@ local Q_SIDE_ROUGH_TOOL = '' -- i
local Q_ANTISPLINT_TYPE = '' -- i
local Q_BLADE_ON_ALONG_FACE = '' -- i
local Q_MAX_ELEVATION = '' -- d
local Q_SAW_PLUS_CHAIN = '' -- i
local Q_FORCE_CHAINSAW = '' -- i
-- variabile smussi
local bMadeChamfer
@@ -182,6 +186,7 @@ local function AssignQIdent( Proc)
Q_MAX_ELEVATION = 'Q10'
Q_STAIRCASE = ''
Q_SAW_PLUS_CHAIN = 'Q11'
Q_FORCE_CHAINSAW = 'Q12'
if ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16 then
Q_FORCE_BLADE = 'Q01' -- i
@@ -1187,7 +1192,8 @@ local function MakePreCuts( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, nCha
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local nCutFacet = EgtSurfTmFacetCount( AddId)
if nCutFacet == 1 then
return Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
@@ -2547,7 +2553,7 @@ end
---------------------------------------------------------------------
local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfInt, dDepthCham)
-- Se variabile globale indica che lo smusso è gi stato fatto, esco
-- Se variabile globale indica che lo smusso è già stato fatto, esco
if bMadeChamfer then
return 0
end
@@ -2561,6 +2567,7 @@ local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfI
end
-- ottengo le curve di contorno libero
local nAuxId1, nAuxId2, nNumIdAux
local bIsOpenPath = false
if bIs3Faces then
-- estraggo i percorsi
nAuxId1, nNumIdAux = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId)
@@ -2571,6 +2578,36 @@ local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfI
else
nAuxId1, nNumIdAux = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId)
if not nNumIdAux then nNumIdAux = 0 end
-- se non è una curva chiusa bisogna estrarre le sole curve da lavorare
if Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-4' then
local IdsToMachine = {}
bIsOpenPath = true
local nFirstId, nIdCount = EgtExplodeCurveCompo( nAuxId1)
for i = nFirstId, nFirstId + nIdCount - 1, 1 do
-- se segmento di retta
if EgtGetType( i) == GDB_TY.CRV_LINE then
local _, nEntitiesCount = EgtCurveDomain(i)
for j = 0, nEntitiesCount - 1 do
local ptStart = EgtUP( i, j, GDB_RT.GLOB)
local ptEnd = EgtUP( i, j + 1, GDB_RT.GLOB)
if ( AreSameVectorApprox( vtOrtho, X_AX()) and ( abs( ptStart:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL and abs( ptEnd:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL) or
AreSameVectorApprox( vtOrtho, -X_AX()) and ( abs( ptStart:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL and abs( ptEnd:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL) or
AreSameVectorApprox( vtOrtho, Y_AX()) and ( abs( ptStart:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL and abs( ptEnd:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL) or
AreSameVectorApprox( vtOrtho, -Y_AX()) and ( abs( ptStart:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL and abs( ptEnd:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL) or
AreSameVectorApprox( vtOrtho, Z_AX()) and ( abs( ptStart:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL and abs( ptEnd:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL) or
AreSameVectorApprox( vtOrtho, -Z_AX()) and ( abs( ptStart:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL and abs( ptEnd:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL)
) then
table.insert( IdsToMachine, i)
end
end
else
return 0
end
end
local ptNear = EgtSurfTmFacetCenter(Proc.Id, 0, GDB_ID.ROOT)
nAuxId1 = EgtCurveCompoByReorder( nAddGrpId, IdsToMachine, ptNear, true, GDB_ID.ROOT)
nNumIdAux = 1
end
end
local dExtra = 2
@@ -2590,13 +2627,20 @@ local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfI
end
else
AuxId = nAuxId1 + i - 1
vtExtr, _, _ = EgtCurveArea( AuxId)
end
if vtExtr then
if not bIs3Faces then
if bIsOpenPath then
_, vtExtr = EgtCurveIsFlat( AuxId)
else
vtExtr, _, _ = EgtCurveArea( AuxId)
end
if vtExtr then
local fFrCurve = EgtGetGlobFrame( AuxId)
vtExtr:toGlob( fFrCurve)
if bIsOpenPath and vtExtr * vtOrtho < GEO.EPS_SMALL then
vtExtr = -vtExtr
end
end
end
if vtExtr then
-- if bIs3Faces and i == nNumIdAux then
-- vtExtr = -vtExtr
-- end
@@ -2840,6 +2884,12 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
local nOk, sErr = MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfInt, dDepthCham)
if nOk < 0 then return false, sErr end
end
-- slot aperta su due lati
elseif Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-4' then
if nChamfer > 0 then
local nOk, sErr = MakeChamfer( Proc, false, nAddGrpId, rfFac:getVersZ(), b3Solid, nil, dDepthCham)
if nOk < 0 then return false, sErr end
end
end
if not dDepth then dDepth = dElev end
-- Recupero le facce adiacenti alla principale
@@ -3359,7 +3409,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
end
end
end
-- eventuale massima elevazione imposta dall'utente
local dMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd')
if dMaxElev and dMaxElev < 1 then dMaxElev = nil end
-- se elevazione superiore a massimo affondamento della fresa, riduco opportunamente
dElev = dMaxElev or dElev
local sWarn
local dDepth = dElev
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
@@ -3370,11 +3424,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
EgtOutLog( sWarn)
end
-- imposto elevazione e dichiaro non si generano sfridi per VMill
-- eventuale massima elevazione imposta dall'utente
local dMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd')
if dMaxElev and dMaxElev < 1 then dMaxElev = nil end
dMaxElev = dMaxElev or dElev
local sNotes = 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';'
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
sNotes = sNotes .. 'VMRS=0;'
if bOpenOutRaw then
sNotes = sNotes .. 'OpenOutRaw=1;'
@@ -5106,22 +5156,29 @@ function SawPlusChain.ApplyMachining( Machining, b3Raw)
local nErr
nErr, sErr = EgtGetLastMachMgrError()
-- se mortasatura e l'errore è compatibile (Axes values not calculable) si prova con l'altra configurazione dell'asse bloccato
-- TODO valutare se c'è modo di capire preventivamente la configurazione dell'asse bloccato e quindi rimuovere questa parte di codice
if Machining.Type == MCH_OY.MORTISING and nErr == 2507 then
if Machining.BlockedAxis.Orientation == 'perpendicular' then
Machining.BlockedAxis.Orientation = 'parallel'
else
Machining.BlockedAxis.Orientation = 'perpendicular'
if Machining.Type == MCH_OY.MORTISING then
-- se errore "Axes values not calculable" si prova con l'altra configurazione dell'asse bloccato
if nErr == 2507 then
if Machining.BlockedAxis.Orientation == 'perpendicular' then
Machining.BlockedAxis.Orientation = 'parallel'
else
Machining.BlockedAxis.Orientation = 'perpendicular'
end
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( Machining.Name, Machining.BlockedAxis.Orientation, b3Raw, Machining.BlockedAxis.VtN, Machining.BlockedAxis.VtOut))
if Machining.SuggestedAngles.Index == 1 then
Machining.SuggestedAngles.Index = 2
else
Machining.SuggestedAngles.Index = 1
end
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( Machining.SuggestedAngles.VtN, Machining.SuggestedAngles.VtOrtho, Machining.SuggestedAngles.Index))
sErr = ''
bIsApplyOk = ML.ApplyMachining( true, false)
-- se errore "Outstroke" e permesso ToolInvert provo ad invertire il lato di lavorazione
elseif Machining.AllowToolInvert and nErr == 2508 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, not Machining.ToolInvert)
sErr = ''
bIsApplyOk = ML.ApplyMachining( true, false)
end
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( Machining.Name, Machining.BlockedAxis.Orientation, b3Raw, Machining.BlockedAxis.VtN, Machining.BlockedAxis.VtOut))
if Machining.SuggestedAngles.Index == 1 then
Machining.SuggestedAngles.Index = 2
else
Machining.SuggestedAngles.Index = 1
end
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( Machining.SuggestedAngles.VtN, Machining.SuggestedAngles.VtOrtho, Machining.SuggestedAngles.Index))
sErr = ''
bIsApplyOk = ML.ApplyMachining( true, false)
end
if not bIsApplyOk then
nErr, sErr = EgtGetLastMachMgrError()
@@ -5178,18 +5235,16 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - saw blade not found'
Cutting.CanApply = false
EgtOutLog( Cutting.Message)
return Cutting
end
Cutting.Type = MCH_OY.MILLING
Cutting.Tool = SawPlusChain.GetToolFromMachining( Cutting.Name)
-- verifica dimensioni tasca compatibili
-- verifica dimensioni tasca e direzione compatibili
-- se tasca meno spessa della lama la strategia non è applicabile
if Cutting.Tool.Thickness > dPocketHeight + 10 * GEO.EPS_SMALL then
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - pocket too narrow for saw blade thickness'
Cutting.CanApply = false
EgtOutLog( Cutting.Message)
return Cutting
end
if #( Proc.MainFaces.SideFaces) > 1 then
-- se tasca più stretta della lama la strategia non è applicabile
@@ -5197,9 +5252,13 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - pocket too narrow for saw blade diameter'
Cutting.CanApply = false
EgtOutLog( Cutting.Message)
return Cutting
end
end
if EdgeToMachine.ToolDirection:getZ() < BD.NZ_MINA then
Cutting.CanApply = false
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : skipped sawblade from bottom'
EgtOutLog( Cutting.Message)
end
-- parametri della lavorazione
-- inizio e fine aperti o chiusi
@@ -5330,6 +5389,7 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine
Mortising.CanApply = true
Mortising.Message = ''
Mortising.ProcId = Proc.Id
Mortising.AllowToolInvert = false
local bNeedToMachineOtherSide = false
local dTestCornerRadius = 43
-- OneSide | OneSideAndExtend | BothSides | BothSidesAndExtend
@@ -5373,18 +5433,21 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine
Mortising.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - chainsaw not found'
Mortising.CanApply = false
EgtOutLog( Mortising.Message)
return Mortising
end
Mortising.Type = MCH_OY.MORTISING
Mortising.Tool = SawPlusChain.GetToolFromMachining( Mortising.Name)
-- in caso di tunnel da un lato permetto eventuale inversione lato di lavoro in caso di errori di applicazione (es: Outstroke)
if Proc.Topology == 'Tunnel' and sMortisingType == 'OneSide' or sMortisingType == 'OneSideAndExtend' then
Mortising.AllowToolInvert = true
end
-- verifica dimensioni tasca compatibili
-- se tasca meno spessa della sega a catena la strategia non è applicabile
if Mortising.Tool.Thickness > dPocketHeight + 10 * GEO.EPS_SMALL then
Mortising.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - pocket too narrow for chainsaw thickness'
Mortising.CanApply = false
EgtOutLog( Mortising.Message)
return Mortising
end
if #( Proc.MainFaces.SideFaces) > 1 then
-- se tasca più stretta della sega a catena la strategia non è applicabile
@@ -5392,9 +5455,13 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine
Mortising.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - pocket too narrow for chainsaw width'
Mortising.CanApply = false
EgtOutLog( Mortising.Message)
return Mortising
end
end
if EdgeToMachine.ToolDirection:getZ() < - 10 * GEO.EPS_ANG_SMALL then
Mortising.CanApply = false
Mortising.Message = 'Feature '.. Proc.FeatureId .. ' : skipped chainsaw from bottom'
EgtOutLog( Mortising.Message)
end
-- parametri della lavorazione
-- inizio e fine aperti o chiusi
@@ -5458,7 +5525,7 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine
Mortising.SuggestedAngles = {}
Mortising.SuggestedAngles.Index = 1
Mortising.SuggestedAngles.VtN = FaceToMachine.VtN
Mortising.SuggestedAngles.VtOrthO = EdgeToMachine.ToolDirection
Mortising.SuggestedAngles.VtOrtho = EdgeToMachine.ToolDirection
-- approccio e retrazione
Mortising.LeadIn, Mortising.LeadOut = SawPlusChain.CalculateLeadInOut( Mortising, EdgeToMachine)
-- eventuale step verticale
@@ -5551,9 +5618,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
local bIsCuttingOk = false
if Cutting.CanApply then
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
end
if not bIsCuttingOk then
return bIsCuttingOk, Cutting.Message
if not bIsCuttingOk then
return bIsCuttingOk, Cutting.Message
end
end
local dBottomDepthToMachine = Cutting.RadialOffset
-- lato opposto del tunnel
@@ -5562,9 +5629,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
bIsCuttingOk = false
if Cutting.CanApply then
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
end
if not bIsCuttingOk then
return bIsCuttingOk, Cutting.Message
if not bIsCuttingOk then
return bIsCuttingOk, Cutting.Message
end
end
else
-- se la lama non è arrivata sul fondo e c'è almeno un lato aperto va lavorato
@@ -5575,9 +5642,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
bIsCuttingOk = false
if Cutting.CanApply then
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
end
if not bIsCuttingOk then
return bIsCuttingOk, Cutting.Message
if not bIsCuttingOk then
return bIsCuttingOk, Cutting.Message
end
end
end
-- eventuale lavorazione di lama - lato della tasca in cui finisce la lavorazione
@@ -5586,9 +5653,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
bIsCuttingOk = false
if Cutting.CanApply then
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
end
if not bIsCuttingOk then
return bIsCuttingOk, Cutting.Message
if not bIsCuttingOk then
return bIsCuttingOk, Cutting.Message
end
end
end
-- la lama è arrivata sul fondo e tasca passante, non servono ulteriori lavorazioni
@@ -5622,9 +5689,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
bIsMortisingOk = false
if Mortising.CanApply then
bIsMortisingOk, Mortising.Message = SawPlusChain.Chainsaw.ApplyAllSteps( Mortising, b3Raw)
end
if not bIsMortisingOk then
return bIsMortisingOk, Mortising.Message
if not bIsMortisingOk then
return bIsMortisingOk, Mortising.Message
end
end
else
-- se la sega a catena non è arrivata sul fondo e c'è almeno un lato aperto va lavorato
@@ -5635,9 +5702,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
bIsMortisingOk = false
if Mortising.CanApply then
bIsMortisingOk, Mortising.Message = SawPlusChain.Chainsaw.ApplyAllSteps( Mortising, b3Raw)
end
if not bIsMortisingOk then
return bIsMortisingOk, Mortising.Message
if not bIsMortisingOk then
return bIsMortisingOk, Mortising.Message
end
end
end
-- eventuale lavorazione di sega a catena - lato della tasca in cui finisce la lavorazione
@@ -5646,9 +5713,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
bIsMortisingOk = false
if Mortising.CanApply then
bIsMortisingOk, Mortising.Message = SawPlusChain.Chainsaw.ApplyAllSteps( Mortising, b3Raw)
end
if not bIsMortisingOk then
return bIsMortisingOk, Mortising.Message
if not bIsMortisingOk then
return bIsMortisingOk, Mortising.Message
end
end
end
end
@@ -5731,23 +5798,38 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if nChamfer < 0 then
return false, sErrCham
end
-- eventuale forzatura sega a catena
local bForceChainsaw = ( EgtGetInfo( Proc.Id, Q_FORCE_CHAINSAW, 'i') or 0) > 0
-- se è un tunnel provo a vedere se è possibile lavorarlo con la svuotatura o con la sega catena
if bClosedOrthoFaces then
local bTryWithBlades = true
local dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace
-- forzata sega a catena
if bForceChainsaw then
-- ottengo le dimensioni del tunnel
dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace = BL.GetTunnelDimension( Proc, nPartId)
-- lavoro fessura con svuotature (singola o doppia contrapposta)
local sMyMchFind = 'Pocket'
local nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho,
else
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)
if nOk < 0 then
return false, sErr
elseif nOk > 0 then
bTryWithBlades = false
if nOk < 0 then
return false, sErr
elseif nOk > 0 then
bTryWithBlades = false
end
end
-- Se la svuotatura precedente non è stata fatta e chamfer non è mutuamente esclusivo provo con la sega-catena
if bTryWithBlades and nChamfer < 2 then
-- verifico se posso farlo con la sega-catena
local bMakeChainSaw, sSawing, dMaxMat, dSawCornerRad, dSawThick, _, dSawWidth = VerifyChainSaw( Proc, dDimMin, dDimMax, dDepth)
if bMakeChainSaw then
-- se forzata sega a catena devo verificare se inserire lo smusso
if bForceChainsaw and nChamfer > 0 then
local nOk, sErr = MakeChamfer( Proc, false, nAddGrpId, vtOrtho, b3Solid, nLundIdFace, dDepthCham)
if nOk < 0 then return -1, sErr end
end
-- Ricalcolo l'affondamento tenendo conto di eventuale inclinazione
local dSlDepth
local frSlDh = Frame3d( Proc.Box:getCenter(), vtOrtho)
@@ -6203,6 +6285,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if bMillDown and BD.GetBottomToolMaxTotLen then
dMaxTotLen = BD.GetBottomToolMaxTotLen( vtN)
end
local dUserMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd')
-- ricerca lavorazione
local sPocketing
local _, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillUp, bMillDown)
@@ -6210,10 +6293,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
_, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind)
bMillDown = false
end
-- se l'utente ha definito un'elevazione custom dUserMaxElev si lavora sempre la faccia standard
if sMyPocketing and
( dMyTMaxDepth > dFacElev + dCollSic - 10 * GEO.EPS_SMALL or ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic and not bIsU) or
( bIsL and nUseRoughTool == 0) or
( Proc.Prc == 25 and not bIsU and not bIsL)) then
( Proc.Prc == 25 and not bIsU and not bIsL)) or
( dUserMaxElev and dUserMaxElev > 10 * GEO.EPS_SMALL) then
sPocketing = sMyPocketing
end
if bMillDown then
@@ -6232,6 +6317,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if bForceSideMill then
sPocketing = nil
end
-- se forzata sega a catena
if bForceChainsaw then
sPocketing = nil
end
-- leggo parametro Q
local nQAntisplintResult = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') or 0
-- se lavorazione fresa come lama disabilito eventuale antischeggia
@@ -6453,8 +6542,9 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
end
end
-- in tutti gli altri casi lancio la MakeByPockets (lavorazione singola o doppia contrapposta, fondo della tasca una faccia fittizia perpendicolare al lato lungo)
else
-- in tutti gli altri casi, a meno che non sia forzata sega a catena, lancio la MakeByPockets
-- lavorazione singola o doppia contrapposta, fondo della tasca una faccia fittizia perpendicolare al lato lungo
elseif not bForceChainsaw then
-- se 2 facce setto i parametri corretti per la MakeByPockets
if bForceSideMill and Proc.Fct == 2 then
bIs3Faces = false
@@ -6758,7 +6848,7 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- verifico se applicare gestione speciale per tunnel
local nSurfBottomId
if Proc.Topology == 'Tunnel' then
if Proc.Topology == 'Tunnel' or ( Proc.Topology == 'Groove' and Proc.IsThrough and Proc.Fct == 3) then
bAddEndCapLeftSide = true
bAddEndCapRightSide = true
-- recupero centro e normale delle facce
@@ -7210,13 +7300,13 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- leggo i parametri Q per utilizzare la fresa di fianco e/o lama
local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
local bUseBlade = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') == 1
local bOk, sMyWarn = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
local bOk, sMyWarn, _, AddedIds = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
-- se non sono riuscito a farlo di lama, riprovo con la fresa
if not bOk and bUseBlade then
bUseBlade = false
return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
else
return bOk, sMyWarn
return bOk, sMyWarn, nil, AddedIds
end
-- prima faccia terminale
elseif b3Fac1:getDimX() < 1 and abs( vtN2:getX()) < GEO.EPS_SMALL then
+1 -1
View File
@@ -1391,7 +1391,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
-- inverto se utensile antiorario per garantire senso di percorrenza migliore
local bInvert = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
local bInvert = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) > 0
-- setto workside e eventuale inversione
if bInvert then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
+42 -16
View File
@@ -37,6 +37,7 @@ EgtOutLog( ' ProcessLongDoubleCut started', 1)
-- Dati
local BD = require( 'BeamData')
local ML = require( 'MachiningLib')
local Topology = require( 'FeatureTopology')
local dLimMinPiece = BD.LEN_SHORT_PART or 1000
@@ -324,6 +325,9 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
local nFaceLimit, tFaceLong, ptC, vtN = IdentifyFaces( Proc)
local dLen = Proc.Box:getDimX()
-- inizializzazione tabella con eventuali lavorazioni create a posteriori da ritornare al chiamante
local AddedIds = {}
-- recupero lunghezza grezzo totale da info sulla macchinata
local dBarLen = EgtGetInfo( EgtGetCurrMachGroup(), 'BARLEN', 'd')
local dOvmHead = b3Raw:getMax():getX() - b3Solid:getMax():getX()
@@ -945,18 +949,6 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end
-- altrimenti concavo
else
-- se effettivamente un taglio longitudinale e lama non taglia completamente, limito la lavorazione. Altrimenti esco.
for k = 1, #vOrd do
if vWidth[vOrd[k]] + BD.CUT_SIC > dMaxDepth then
if not( ProcessLong2Cut.Identify( Proc)) then
return false
else
local sWarn2 = 'Warning in ' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. ' : elevation (' .. EgtNumToString( vWidth[vOrd[k]], 1) .. ') bigger than max saw depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
if not sWarn then sWarn = '' end
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
end
end
end
-- si percorrono i lati alto e basso della faccia
for i = 1, nC do
-- Posizione braccio portatesta
@@ -986,6 +978,22 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
EgtOutLog( sErr)
return false, sErr
end
-- se effettivamente un taglio longitudinale e lama non taglia completamente, limito la lavorazione. Altrimenti esco.
local dCheckDepth = 0
if bCanUseBlade then
dCheckDepth = dMaxDepth
elseif bCanUseUnderBlade then
dCheckDepth = dMaxDepthDn
end
if vWidth[vOrd[j]] + 100 * GEO.EPS_SMALL > dCheckDepth then
if not( ProcessLong2Cut.Identify( Proc)) then
return false
else
local sWarn2 = 'Warning in ' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. ' : elevation (' .. EgtNumToString( vWidth[vOrd[j]], 1) .. ') bigger than max saw depth (' .. EgtNumToString( dCheckDepth, 1) .. ')'
if not sWarn then sWarn = '' end
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
end
end
-- se lama da sotto verifico se la componente Y della profondità di taglio supera la capacità della lama
if nSide <= 0 and bCanUseUnderBlade then
if ( vWidth[vOrd[j]] / 2) > dMaxDepthDn then
@@ -999,7 +1007,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
local dLioPerp
if j == 1 then -- il primo taglio lo faccio completo se angolo interno maggiore di 90
local dMinOffsBigFace = max( vWidth[vOrd[j]] - dMaxDepth, 0)
local dMinOffsBigFace = max( vWidth[vOrd[j]] - dCheckDepth, 0)
-- se la faccia è più grande del massimo materiale lama, allora limito lavorazione
if dMinOffsBigFace > 0 then
dOffset = dMinOffsBigFace
@@ -1011,7 +1019,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end
dLioPerp = vWidth[vOrd[j]] + BD.CUT_SIC
else -- il secondo ridotto della distanza minima e della componente spessore della lama
local dMinOffsBigFace = max( vWidth[vOrd[j]] - dMaxDepth, 0)
local dMinOffsBigFace = max( vWidth[vOrd[j]] - dCheckDepth, 0)
-- se la faccia è più grande del massimo materiale lama, allora limito lavorazione
if dMinOffsBigFace > 0 then
dOffset = dMinOffsBigFace
@@ -1269,6 +1277,11 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end
end
end
if Proc.bMoveAfterSplit then
nC = 1
dStartDist = Proc.Box:getDimX() - ( dToolDiam / 2 + 5)
dEndDist = - ( dToolDiam / 2 + 5)
end
if nIni == 2 then
dStartDist, dEndDist = dEndDist, dStartDist
dStartAccDist, dEndAccDist = dEndAccDist, dStartAccDist
@@ -1380,6 +1393,19 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end
end
end
if not Proc.MoveAfterSplit and not bEndFixed and not bConvex then
-- recupero gruppo per geometria addizionale
local nAddGrpId = BL.GetAddGroup( nPartId)
if not nAddGrpId then
local sErr = 'Error : missing AddGroup'
EgtOutLog( sErr)
return false, sErr
end
local AddId = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local AddProc = { Id = AddId, Grp = 0, Prc = 12, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, PartId = Proc.PartId, bMoveAfterSplit = true}
Topology.Classify( AddProc, b3Raw)
table.insert( AddedIds, AddProc)
end
-- altrimenti lavorazione di fianco : Long2CutSide o Long2CutDown
else
@@ -1822,8 +1848,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end
end
return true, sWarn
end
return true, sWarn, nil, AddedIds
end
---------------------------------------------------------------------
return ProcessLong2Cut
+2 -1
View File
@@ -417,7 +417,8 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptCutC, vtCutN, b3Solid, GDB_RT.GLOB)
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp - 2, Prc = 10, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH, bFromBottom)
if not bOk then return bOk, sErr end
+2 -1
View File
@@ -307,7 +307,8 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
+2 -1
View File
@@ -311,7 +311,8 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
+2 -1
View File
@@ -311,7 +311,8 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
+2 -1
View File
@@ -258,7 +258,8 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
+2 -1
View File
@@ -293,7 +293,8 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
+2 -1
View File
@@ -134,7 +134,8 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- applico taglio di lama
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
if BL.IsCutNeeded( CutProc, b3Raw, dOvmHead) then
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, false)
if not bOk then return bOk, sErr end
+47 -4
View File
@@ -4,6 +4,7 @@
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
-- 2022/07/12 Aggiunta gestione PF1250 e TURN.
-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo.
-- 2024/09/03 In ApplyDiceCut, se possibile, i tagli paralleli sono fatti con un unico passaggio di fianco.
-- Tabella per definizione modulo
local ProcessScarfJoint = {}
@@ -134,7 +135,9 @@ end
local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Solid, ptC, vtN, Proc, vtRef, bHead, sCutting, dSawDiam, b3Raw, dNewDiceDim)
local bOk = true
local bOk2 = true
local sErr = ''
local sErr2 = ''
local vCuts = {}
if nGoodFace1 and nGoodFace4 and nGoodFace1 > 0 and nGoodFace4 > 0 then
@@ -185,9 +188,49 @@ local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Soli
-- extra taglio
local dExtraCut = EgtIf( i % 2 == 1, 0, BD.CUT_EXTRA)
-- lavoro la faccia
for j = 1, #vCuts[i] do
bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then return bOk, sErr end
local dMaxDepth = 0
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
end
end
local dDiceFaceMaxH = 0
local dDiceFaceMinH = GEO.INFINITO
if ( i % 2) == 0 then
for cont = 1, #vCuts[i] do
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0)
dDiceFaceMaxH = max( dDiceFaceMaxH, dDiceFaceH)
-- calcolo lato orizzontale minore ipotizzando sia un trapezio
local dDiceFaceH2 = ( 2 * EgtSurfArea( vCuts[i][cont]) ) / dDiceFaceV - dDiceFaceH
dDiceFaceMinH = min( dDiceFaceMinH, dDiceFaceH2)
end
end
-- se si può fare, faccio unico taglio parallelo
if ( i % 2) == 0 and ( dMaxDepth > dDiceFaceMaxH - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN) then
local bDoubleCut = false
local dCutExtra = BD.CUT_EXTRA
if dMaxDepth < dDiceFaceMaxH + BD.CUT_EXTRA then
bDoubleCut = true
dCutExtra = - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN
end
local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
local nFaceUseCut1, nFaceUseCut2 = MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT
if Proc.Tail then
nFaceUseCut1, nFaceUseCut2 = nFaceUseCut2, nFaceUseCut1
end
if bDoubleCut then
bOk, sErr = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut1, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw, true)
if not bOk then return false, sErr end
end
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
else
for j = 1, #vCuts[i] do
bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then return bOk, sErr end
end
end
end
-- lavoro la faccia interna in ogni caso
@@ -201,7 +244,7 @@ local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Soli
if vFaceOrd[3] ~= 0 then
-- inserisco la lavorazione
local vtOrthoO = Vector3d( vtRef)
local bOk, sErr = Fbs.MakeOne( Proc.Id, vFaceOrd[3] - 1, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
bOk, sErr = Fbs.MakeOne( Proc.Id, vFaceOrd[3] - 1, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then return bOk, sErr end
end
end
+2 -1
View File
@@ -4,6 +4,7 @@
-- 2022/08/09 Ora se la feature ha meno di due facce viene richiamata la normale Cut.
-- 2022/11/09 Aggiunta gestione parametro Q04 per forzare utilizzo fresa di lato e lavorare come FreeContour.
-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo.
-- 2024/08/05 Se assimilabile ad un taglio (1 faccia) si considerare area non pinzabile testa/coda
-- Tabella per definizione modulo
local ProcessSimpleScarf = {}
@@ -148,7 +149,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT
-- se ci sono meno di due facce si riduce a una normale Cut
local nFacetCnt = EgtSurfTmFacetCount( Proc.Id)
if nFacetCnt < 2 then
local bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, nil, nil, nil, nil, dOvmTail)
local bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, nil, nil, nil, nil, dOvmTail, true)
return bOk, sErr
end
-- dati delle facce
+4 -2
View File
@@ -272,7 +272,8 @@ local function AddVerticalPreCuts( Proc, sCutting, dCutXOffset, b3Raw, sNotes)
for j = nVerticalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_FRONT
local dVerticalCutOffset = dVerticalSliceHeight * -j
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, sNotes, b3Raw)
local bForceTangentLeadInOut = BD.PRESS_ROLLER
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, sNotes, b3Raw, nil, nil, nil, bForceTangentLeadInOut)
if not bOk then return bOk, sErr end
end
return bOk, sErr
@@ -607,7 +608,8 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
for j = nHorizontalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_DOWN
local dHorizontalCutOffset = dHorizontalSliceHeight * -j
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0 , sCutting, dSawDiam, nFaceUse, nil, -0.1 - dCutXOffset, BD.CUT_SIC, dHorizontalCutOffset, 0, 0, 'Precut;', b3Raw)
local bForceTangentLeadInOut = BD.PRESS_ROLLER
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0 , sCutting, dSawDiam, nFaceUse, nil, -0.1 - dCutXOffset, BD.CUT_SIC, dHorizontalCutOffset, 0, 0, 'Precut;', b3Raw, nil, nil, nil, bForceTangentLeadInOut)
if not bOk then return false, sErr end
end
-- se necessario taglio verticale doppio, eseguo l'opposto
+6 -3
View File
@@ -212,7 +212,8 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return bOk, sErr end
end
@@ -223,7 +224,8 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return bOk, sErr end
end
@@ -392,7 +394,8 @@ local function MakeThreeFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return bOk, sErr end
end
+2 -1
View File
@@ -200,7 +200,8 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
else
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bFromBottom = ( bShortPart and vtExtr:getZ() > 0.25)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
if not bOk then
+4 -2
View File
@@ -232,7 +232,8 @@ local function MakeMachByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw,
-- se va fatto, inserisco la lavorazione
if bCut then
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
-- se taglio applicato setto la nota al gruppo Mach per non doverla lavorare una seconda volta
if bOk then
@@ -330,7 +331,8 @@ local function MakeMachByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw,
-- se va fatto, inserisco la lavorazione
if bCut then
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
-- se taglio applicato setto la nota al gruppo Mach per non doverla lavorare una seconda volta
if bOk then
+21
View File
@@ -1,5 +1,26 @@
==== Beam Update Log ====
Versione 2.6h2 (26/08/2024)
- Added : in BatchProcess e New si verifica l'abilitazione alla generazione con EgtVerifyKeyOption
- Modif : in FacesBySaw introdotti attacchi tangenziali solo da un lato, limitati a facce con Z negative
- Modif : in LapJoint -> tunnel lo smusso funziona anche se è forzata la sega a catena
- Modif : in LapJoint -> svuotatura, se l'utente ha definito un'elevazione custom si lavora sempre la faccia standard
- Modif : in FacesBySaw -> MakeOne aggiunta la possibilità di passare una direzione di lavoro alternativa per poter rispettare contemporaneamente la direzione di lavoro concorde e la direzione di taglio.
Versione 2.6h1 (20/08/2024)
- Modif : in SimpleScarf, se assimilabile a un taglio, si considera area non pinzabile
- Modif : in LapJoint gestito smusso nel caso Groove-Blind-RightAngles-Parallel-4
- Modif : varie modifiche ai tagli di lama per evitare chiusura rulli pneumatici e finecorsa
- Modif : in BatchProcessNew, se presente flag apposito in EgtCam5, si evita la generazione
Versione 2.6g4 (19/07/2024)
- Modif : in BatchProcess e BatchProcessNew si forza ricalcolo ogni volta che si è in situazione di CHECK o CHECK + GENERATE
Versione 2.6g3 (07/07/2024)
- Added : aggiunta possibilità di funzione GetNzLimDownUp specifica per ogni macchina
- Modif : anche nel taglio a cubetti si chiama GetNzLimDownUp di macchina, se presente, per decidere limite orientamento lama verso il basso
- Modif : in BeamExec inserito controllo massimo numero di facce per lanciare GetFacetsInfo
- Fixed : in LapJoint corretto typo in nome variabile che provocava mancata impostazione asse bloccato
Versione 2.6g2 (04/07/2024)
- Modif : le lavorazioni BlockHaus, se vicine alla coda, vengono spostate dopo il taglio di separazione
+2 -2
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '2.6g2'
MIN_EXE = '2.6e2'
VERSION = '2.6h2'
MIN_EXE = '2.6h1'