DataBeam :

- correzioni varie.
This commit is contained in:
Dario Sassi
2019-10-11 05:44:27 +00:00
parent 314f17cbe4
commit 902c87f17a
2 changed files with 32 additions and 11 deletions
+9 -7
View File
@@ -196,14 +196,16 @@ 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
local H_S = 200
local H_L = 400
-- Determinazione minimo grezzo scaricabile
if dRawH <= H_S then
BD.MinRaw = BD.MINRAW_S
elseif dRawH <= H_L then
local Coeff = ( dRawH - H_S) / ( H_L - H_S)
BD.MinRaw = ( 1 - Coeff) * BD.MINRAW_S + Coeff * BD.MINRAW_L
else
BD.MinRaw = BD.MINRAW_L
end
end
+23 -4
View File
@@ -499,7 +499,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
if not sCutting then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
EgtOutLog( sErr)
return false, sErr
return false, sErr, 'MNF'
end
-- recupero i dati dell'utensile
local dSawDiam = 400
@@ -542,16 +542,18 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
if not sSawing then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' chainsawing not found in library'
EgtOutLog( sErr)
return false, sErr
return false, sErr, 'MNF'
end
-- Recupero i dati dell'utensile
local dSawWidth = 75
local dSawThick = 8
local dMaxDepth = 200
if EgtMdbSetCurrMachining( sSawing) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dSawWidth = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawWidth
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
end
end
-- Verifico se necessarie più passate
@@ -581,6 +583,13 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
-- imposto offset radiale
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
-- se necessario, limito l'affondamento
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
dDepth = dMaxDepth - dElev
EgtOutLog( sWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH '..EgtNumToString( dDepth, 1))
end
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -593,7 +602,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
end
end
end
return true
return true, sWarn
end
---------------------------------------------------------------------
@@ -647,7 +656,17 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
return MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev)
-- altrimenti provo con la sega a catena o lama
else
return MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev)
local bOk, sErr, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev)
if not bOk and sStat == 'MNF' then
sPocketing = ML.FindPocketing( sMchFind, dDiam)
if not sPocketing then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' pocketing not found in library'
EgtOutLog( sErr)
return false, sErr
end
else
return bOk, sErr
end
end
end
-- recupero i dati dell'utensile