DataBeam :

- in DoubleCut convesso ora passo ai tagli singoli il giusto ingombro della faccia da lavorare.
This commit is contained in:
Dario Sassi
2020-09-15 09:24:14 +00:00
parent f2a039373a
commit d1309ccd23
+23 -19
View File
@@ -1,4 +1,4 @@
-- ProcessDoubleCut.lua by Egaltech s.r.l. 2020/08/18
-- ProcessDoubleCut.lua by Egaltech s.r.l. 2020/09/15
-- Gestione calcolo doppi tagli di lama per Travi
-- Tabella per definizione modulo
@@ -207,8 +207,9 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
if AddId then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
local b3Fac = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vOrd[1] - 1, GDB_BB.STANDARD)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Fac, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, 0)
if not bOk then return bOk, sErr end
@@ -218,8 +219,9 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
if AddId then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
local b3Fac = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vOrd[2] - 1, GDB_BB.STANDARD)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Fac, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, 0)
if not bOk then return bOk, sErr end
@@ -261,23 +263,25 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
end
-- eventuale segnalazione ingombro di testa o coda
if Proc.Head then
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
if vtNm:getZ() > 0.5 then
dOffs = 0.4 * dOffs
elseif abs( vtNm:getZ()) > 0.35 then
dOffs = 0.75 * dOffs
-- eventuale segnalazione ingombro di testa o coda (se non convesso, altrimenti già fatto nei tagli singoli)
if not bConvex then
if Proc.Head then
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
if vtNm:getZ() > 0.5 then
dOffs = 0.4 * dOffs
elseif abs( vtNm:getZ()) > 0.35 then
dOffs = 0.75 * dOffs
end
BL.UpdateHCING( nRawId, dOffs)
elseif Proc.Tail then
local dOffs = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
if vtNm:getZ() > 0.5 then
dOffs = 0.4 * dOffs
elseif abs( vtNm:getZ()) > 0.35 then
dOffs = 0.75 * dOffs
end
BL.UpdateTCING( nRawId, dOffs)
end
BL.UpdateHCING( nRawId, dOffs)
elseif Proc.Tail then
local dOffs = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
if vtNm:getZ() > 0.5 then
dOffs = 0.4 * dOffs
elseif abs( vtNm:getZ()) > 0.35 then
dOffs = 0.75 * dOffs
end
BL.UpdateTCING( nRawId, dOffs)
end
return true
end