DataBeam :

- migliorie per gestire meglio lavorazioni su macchine con teste da sotto.
This commit is contained in:
DarioS
2022-01-27 09:01:47 +01:00
parent 89a8350796
commit 03f1a222e1
5 changed files with 54 additions and 28 deletions
+12 -5
View File
@@ -53,10 +53,11 @@ local function MachineByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Solid,
-- delta negativo affondamento lama
local dExtraUp = -0.3
-- abilitazione lavorazione da sotto (testa da sotto e direzione normale sotto -30deg)
local bTopHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() > -1.)
local bDownHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() < -1.)
local bTopHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() > -0.5)
local bDownHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() < -0.5)
-- recupero la lavorazione
local sCutting = ML.FindCutting( 'HeadSide' .. EgtIf( bDownHead, '_H2', ''))
local sCutType = 'HeadSide'
local sCutting = ML.FindCutting( sCutType .. EgtIf( bDownHead, '_H2', ''))
if not sCutting and bTopHead then
sCutting = ML.FindCutting( sCutType)
bDownHead = false
@@ -128,7 +129,7 @@ local function MachineByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Solid,
end
-- altrimenti, tagli diretti delle facce
else
local bOk, sErr = Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
local bOk, sErr = Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide' .. EgtIf( bDownHead, '_H2', ''), nil, bDownHead)
if not bOk then
return bOk, sErr
end
@@ -531,7 +532,13 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
local dExtra = 2
-- recupero la lavorazione
local sMilling = ML.FindMilling( 'Mark')
local sMillType = 'Mark'
local bDownHead = ( BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1)
local sMilling = ML.FindMilling( sMillType .. EgtIf( bDownHead, '_H2', ''))
if not sMilling and bDownHead then
sMilling = ML.FindMilling( sMillType)
bDownHead = false
end
if not sMilling then
local sErr = 'Error : milling not found in library'
EgtOutLog( sErr)