DataBeam :

- modifiche per TURN
- sistemato controllo per cubetti su tagli.
This commit is contained in:
DarioS
2022-10-04 16:01:15 +02:00
parent 0c9945a457
commit bc8fffd075
5 changed files with 92 additions and 32 deletions
+11 -6
View File
@@ -1,4 +1,4 @@
-- BeamExec.lua by Egaltech s.r.l. 2022/09/24
-- BeamExec.lua by Egaltech s.r.l. 2022/09/28
-- Libreria esecuzione lavorazioni per Travi
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
@@ -36,6 +36,7 @@
-- 2022/08/08 Modifica per macchine senza BD.MAX_WIDTH2 e BD.MAX_HEIGHT2.
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata.
-- 2022/09/21 Nella funzione di ordinamento il foro del birdsmouth viene sempre fatto prima della lavorazione stessa
-- 2022/09/28 I fori vengono sempre fatti prima delle tacche.
-- Tabella per definizione modulo
local BeamExec = {}
@@ -321,6 +322,8 @@ local function CollectFeatures( PartId, b3Raw, dCurrOvmH, dCurrOvmT)
Proc2.Fce = Proc.Fcs
Proc2.CutId = Proc.CutId
Proc2.TaskId = Proc.TaskId
Proc2.AdjId = Proc.AdjId
Proc2.MainId = Proc.MainId
table.insert( vProc, Proc2)
end
-- se BlockHaus HalfLap
@@ -651,7 +654,7 @@ end
local function OrderFeatures( vProc, b3Raw)
local dDrillPenalty = EgtIf( BD.PRESS_ROLLER, 200, 100)
local dSmallDrillRange = EgtIf( b3Raw:getDimX() < BD.LEN_SHORT_PART, 200, 600)
local dSmallDrillRange = EgtIf( b3Raw:getDimX() < BD.LEN_SHORT_PART, BD.DRILL_RANGE_SP or 200, BD.DRILL_RANGE or 600)
-- funzione di confronto
-- secondo centro box in X (taglio di intestazione prima di altri tagli di testa e taglio di separazione però prima di altri tagli di coda)
@@ -680,12 +683,14 @@ local function OrderFeatures( vProc, b3Raw)
if B1.Head ~= B2.Head then
return B1.Head
end
-- se primo è foro di un birdsmouth e secondo è il suo birdsmouth, il foro va sempre prima
if Drill.Identify(B1) and LapJoint.Identify(B2) and B1.MainId == B2.Id then
-- se primo è foro e secondo è un ribasso, il foro va sempre prima
if Drill.Identify(B1) and LapJoint.Identify(B2) and
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
return true
end
-- se primo è birdsmouth e secondo è il suo foro, il birdsmouth va sempre dopo
if LapJoint.Identify(B1) and Drill.Identify(B2) and B1.AdjId == B2.Id then
-- se primo è un ribasso e secondo è un foro, il ribasso va sempre dopo
if LapJoint.Identify(B1) and Drill.Identify(B2) and
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
return false
end
-- se entrambi tenoni e si intersecano, metto prima tenone vero e poi base tenone