DataBeam :
- corretto calcolo attacchi e uscite per lame su facce - ora nei tagli di testa e coda si tiene conto dell'effettiva capacità di lavorazione della lama - completata lavorazione ScarfJoint - corretta lavorazione SimpleScarf.
This commit is contained in:
+24
-21
@@ -1,4 +1,4 @@
|
||||
-- ProcessSplit.lua by Egaltech s.r.l. 2019/06/29
|
||||
-- ProcessSplit.lua by Egaltech s.r.l. 2020/01/24
|
||||
-- Gestione calcolo tagli di separazione per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -25,8 +25,26 @@ end
|
||||
function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- ingombro del grezzo
|
||||
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||
local bHorizCut = ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL and b3Raw:getDimZ() < BD.MAX_DIM_HTCUT)
|
||||
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, BD.MAX_DIM_HTCUT, BD.MAX_DIM_HTCUT_HBEAM)
|
||||
-- recupero la lavorazione
|
||||
local sCutting = ML.FindCutting( EgtIf( bSplit, 'SplitSide', 'TailSide'))
|
||||
if not sCutting then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, true, sErr
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dSawDiam = 400
|
||||
local dMaxDepth = 50
|
||||
if EgtMdbSetCurrMachining( sCutting) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
end
|
||||
end
|
||||
-- caratteristiche taglio
|
||||
local bHorizCut = ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL and b3Raw:getDimZ() < dMaxDepth - BD.CUT_EXTRA)
|
||||
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth - BD.CUT_EXTRA, BD.MAX_DIM_HTCUT_HBEAM)
|
||||
local bDoubleCut = ( not bHorizCut and b3Raw:getDimY() > dDimYRef + 10 * GEO.EPS_SMALL)
|
||||
-- dati geometrici del taglio
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
@@ -48,31 +66,16 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
|
||||
dOffsL = dLenEndRaw / nCuts
|
||||
end
|
||||
end
|
||||
-- recupero la lavorazione
|
||||
local sCutting = ML.FindCutting( EgtIf( bSplit, 'SplitSide', 'TailSide'))
|
||||
if not sCutting then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, true, sErr
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dSawDiam = 400
|
||||
if EgtMdbSetCurrMachining( sCutting) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
|
||||
end
|
||||
end
|
||||
-- calcolo extra taglio ed accorciamento
|
||||
local dCutExtra = 0
|
||||
local dAccStart = 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(), 0) + BD.CUT_EXTRA_MIN
|
||||
dCutExtra = EgtIf( bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN, BD.CUT_EXTRA)
|
||||
dAccStart = 0
|
||||
else
|
||||
dCutExtra = - ( b3Raw:getDimY() - BD.MAX_DIM_HTCUT - BD.CUT_EXTRA)
|
||||
dCutExtra = - ( b3Raw:getDimY() - dMaxDepth - BD.CUT_EXTRA)
|
||||
local dSawRad = dSawDiam / 2
|
||||
local dKL = dSawRad - ( BD.MAX_DIM_HTCUT + BD.CUT_EXTRA) + b3Raw:getDimY() / 2 + BD.CUT_EXTRA_MIN
|
||||
local dKL = dSawRad - dMaxDepth + b3Raw:getDimY() / 2 + BD.CUT_EXTRA_MIN
|
||||
dAccStart = sqrt( dSawRad * dSawRad - dKL * dKL)
|
||||
end
|
||||
-- se necessari tagli in doppio, eseguo gli opposti
|
||||
|
||||
Reference in New Issue
Block a user