DataBeam :

- aggiunta gestione extracorse in simulazione cieca
- aggiunta configurazione per lista lavorazioni
- migliorata gestione lughezza minima barre in Process
- migliorie varie.
This commit is contained in:
Dario Sassi
2019-07-24 17:34:48 +00:00
parent 35782ae142
commit 7e3c951901
9 changed files with 112 additions and 115 deletions
+27 -16
View File
@@ -84,15 +84,9 @@ EgtOutLog( ' BeamExec started', 1)
-- *** Inserimento delle travi nel grezzo ***
-------------------------------------------------------------------------------------------------------------
function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam)
-- Determinazione minimo grezzo scaricabile
if dRawW * dRawH > 40000 then
BD.MinRaw = BD.MINRAW_L
elseif dRawW * dRawH > 14500 then
BD.MinRaw = BD.MINRAW_M
else
BD.MinRaw = BD.MINRAW_S
end
BeamExec.CalcMinUnloadableRaw( dRawW, dRawH)
-- Creazione nuovo gruppo di lavoro
local sMgName = EgtGetMachGroupNewName( 'Mach_1')
@@ -130,17 +124,17 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam)
local PartLen = b3Solid:getDimX()
local PartWidth = b3Solid:getDimY()
local PartHeight = b3Solid:getDimZ()
local NextLen = Len - DeltaS - DeltaE - PartLen
local NextLen = Len - DeltaS - PartLen - DeltaE
if (( abs( PartWidth - dRawW) < 10 * GEO.EPS_SMALL and abs( PartHeight - dRawH) < 10 * GEO.EPS_SMALL) or
( abs( PartHeight - dRawW) < 10 * GEO.EPS_SMALL and abs( PartWidth - dRawH) < 10 * GEO.EPS_SMALL)) and
NextLen >= 0 then
NextLen + DeltaE >= 0 then
-- eventuale sovramateriale di testa
if vBeam[i].PosX then
DeltaS = max( vBeam[i].PosX - ( dRawL - Len), 0)
end
-- dimensioni del grezzo
local CrawLen = PartLen + DeltaS + DeltaE
local Delta = DeltaE
local CrawLen = min( PartLen + DeltaS + DeltaE, Len)
local Delta = CrawLen - PartLen - DeltaS
-- creo e posiziono il grezzo
local nRaw = EgtAddRawPart( Point3d(0,0,0), CrawLen, dRawW, dRawH, BD.RAWCOL)
EgtMoveToCornerRawPart( nRaw, BD.OriTR, MCH_CR.TR)
@@ -177,7 +171,7 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam)
Len = Len - CrawLen
end
-- se rimasto troppo poco grezzo, esco
if Len < BD.MinRaw then break end
--if Len < BD.MinRaw then break end
DeltaS = 0
end
@@ -194,6 +188,19 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam)
return true
end
-------------------------------------------------------------------------------------------------------------
function BeamExec.CalcMinUnloadableRaw( dRawW, dRawH)
-- Determinazione minimo grezzo scaricabile
if dRawW * dRawH > 40000 then
BD.MinRaw = BD.MINRAW_L
elseif dRawW * dRawH > 14500 then
BD.MinRaw = BD.MINRAW_M
else
BD.MinRaw = BD.MINRAW_S
end
end
-------------------------------------------------------------------------------------------------------------
-- *** Inserimento delle lavorazioni nelle travi ***
-------------------------------------------------------------------------------------------------------------
@@ -377,10 +384,14 @@ local function OrderFeatures( vProc, b3Raw)
B1.Box:getMin():getX() < B2.Box:getMax():getX() + 100 * GEO.EPS_SMALL and B2.Box:getMin():getX() < B1.Box:getMax():getX() + 100 * GEO.EPS_SMALL then
return ( B1.Prc == 50 and B2.Prc == 52)
end
-- confronto standard
if abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) > 100.0 then
-- se uno di testa e non l'altro, privilegio questo
if B1.Head ~= B2.Head then
return B1.Head
end
-- confronto standard per feature che non si sovrappongono in X
if abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) > 0.5 * ( B1.Box:getDimX() + B2.Box:getDimX()) then
return B1.Box:getCenter():getX() > B2.Box:getCenter():getX()
elseif abs( B1.Box:getCenter():getY() - B2.Box:getCenter():getY()) > 100.0 then
elseif abs( B1.Box:getCenter():getY() - B2.Box:getCenter():getY()) > 0.5 * ( B1.Box:getDimY() + B2.Box:getDimY()) then
return B1.Box:getCenter():getY() > B2.Box:getCenter():getY()
else
return B1.Box:getCenter():getZ() > B2.Box:getCenter():getZ()