DataBeam :

- correzioni varie.
This commit is contained in:
Dario Sassi
2021-01-25 08:18:54 +00:00
parent ffc30b27dc
commit 786b1224a2
7 changed files with 80 additions and 54 deletions
+10 -4
View File
@@ -1,4 +1,4 @@
-- BeamExec.lua by Egaltech s.r.l. 2020/12/29
-- BeamExec.lua by Egaltech s.r.l. 2021/01/21
-- 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.
@@ -415,6 +415,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)
-- funzione di confronto
@@ -479,11 +480,11 @@ local function OrderFeatures( vProc, b3Raw)
end
-- se primo è foro e l'altro no, lo penalizzo
if B1.Prc == 40 and B2.Prc ~= 40 then
return B1.Box:getCenter():getX() - 100 > B2.Box:getMax():getX()
return B1.Box:getCenter():getX() - dDrillPenalty > B2.Box:getMax():getX()
end
-- se primo è altro e secondo è foro, lo premio
if B1.Prc ~= 40 and B2.Prc == 40 then
return B1.Box:getMax():getX() + 100 > B2.Box:getCenter():getX()
return B1.Box:getMax():getX() + dDrillPenalty > B2.Box:getCenter():getX()
end
-- se entrambi fori con posizione praticamente uguale ordino secondo diametro e faccia di inizio (Fcs)
if B1.Prc == 40 and B2.Prc == 40 and abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) < dSmallDrillRange then
@@ -518,7 +519,12 @@ local function OrderFeatures( vProc, b3Raw)
table.sort( vProc, CompareFeatures)
-- riunisco fori con lo stesso diametro e non troppo lontani
local dDrillRange = EgtIf( BD.GO_FAST == 2, 6000, dSmallDrillRange)
local dDrillRange = dSmallDrillRange
if BD.GO_FAST == 2 then
dDrillRange = 6000
elseif BD.PRESS_ROLLER then
dDrillRange = 2000
end
for i = 1, #vProc do
local ProcI = vProc[i]
if ProcI.Prc == 40 then