DataBeam :

- piccole correzioni su tagli di testa e coda.
This commit is contained in:
DarioS
2022-01-25 13:25:45 +01:00
parent da06e9b5b3
commit 776467b82d
2 changed files with 21 additions and 33 deletions
+11 -17
View File
@@ -1,4 +1,4 @@
-- ProcessSplit.lua by Egaltech s.r.l. 2021/10/26
-- ProcessSplit.lua by Egaltech s.r.l. 2022/01/25
-- Gestione calcolo tagli di separazione per Travi
-- Tabella per definizione modulo
@@ -171,9 +171,9 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
-- caratteristiche taglio
local bHorizCut = ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, max( dMaxDepth, BD.MAX_DIM_HTCUT), BD.MAX_DIM_HTCUT_HBEAM)
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, BD.MAX_DIM_HTCUT_HBEAM)
local bDoubleHorizCut = ( BD.DOWN_HEAD and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
-- dati geometrici del taglio
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
-- flag di lavorazione faccia
@@ -202,7 +202,7 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
local dAccStart = 0
local dAccEnd = 0
if b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL or b3Raw:getDimY() < 2 * BD.MAX_DIM_HTCUT_HBEAM + 10 * GEO.EPS_SMALL then
dCutExtra = EgtIf( bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN / 2, BD.CUT_EXTRA)
dCutExtra = EgtIf( bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN, BD.CUT_EXTRA)
else
dCutExtra = - ( b3Raw:getDimY() - dMaxDepth)
local dSawRad = dSawDiam / 2
@@ -236,16 +236,10 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
end
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
else
-- verifico di avere la testa da sotto
if not BD.DOWN_HEAD then
local sErr = 'Error : section too big for split cut'
EgtOutLog( sErr)
return false, sErr
end
-- recupero la lavorazione con lama da sotto
local sCutting2 = ML.FindCutting( 'TailSide_H2')
if not sCutting2 then
local sErr = 'Error : cutting not found in library'
local sErr = 'Error : cutting H2 not found in library'
EgtOutLog( sErr)
return false, sErr
end
@@ -261,15 +255,15 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
end
-- verifico che le due lame riescano a lavorare la sezione
local dDimZ = b3Raw:getDimZ()
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL
if dExtra < 0 then
local sErr = 'Error : section too height for head cut'
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
if dExtra - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL < 0 then
local sErr = 'Error : section too big for tail cut'
EgtOutLog( sErr)
return false, sErr
end
-- calcolo extra taglio ed accorciamento
local dCutExtra = - dMaxDepth2 + dExtra / 2 + BD.CUT_EXTRA_MIN
local dCutExtra2 = - dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
local dCutExtra = -dMaxDepth2 + dExtra / 2 + BD.CUT_EXTRA_MIN
local dCutExtra2 = -dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
local dAccStart = 0
-- eseguo i tagli da sotto necessari
for i = nCuts, 1, -1 do
@@ -278,7 +272,7 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting2, dSawDiam2, MCH_MILL_FU.ORTHO_TOP, nil, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw)
if not bOk then return false, sErr end
end
-- eseguo i tagli necessari
-- eseguo i tagli da sopra necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local sNotes