DataBeam :

- correzioni per tagli su pezzi grossi
- correzioni varie.
This commit is contained in:
Dario Sassi
2019-09-04 18:31:10 +00:00
parent fcdc31ae09
commit 4d26232057
9 changed files with 140 additions and 114 deletions
+5 -36
View File
@@ -1,4 +1,4 @@
-- ProcessDrill.lua by Egaltech s.r.l. 2019/08/03
-- ProcessDrill.lua by Egaltech s.r.l. 2019/09/04
-- Gestione calcolo doppi tagli di lama per Travi
-- Tabella per definizione modulo
@@ -9,6 +9,7 @@ require( 'EgtBase')
local BL = require( 'BeamLib')
local DC = require( 'DiceCut')
local Cut = require( 'ProcessCut')
local Fbs = require( 'FacesBySaw')
EgtOutLog( ' ProcessDoubleCut started', 1)
@@ -181,41 +182,9 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
end
end
-- se non ci sono tagli supplementari o convesso, tagli diretti delle facce
if #vCuts == 0 then
-- imposto eventuale affondamento aggiuntivo
local dExtraCut = EgtIf( bConvex, BD.CUT_EXTRA, 0)
-- eseguo sulle due facce
for j = 1, 2 do
-- determino ordine dei tagli
local i = j
if not bOnY and ptC[1]:getZ() > ptC[2]:getZ() then
i = 3 - j
end
-- lavoro la faccia
local nOrthoOpposite
if bOnY then
local bFront = ( ptC[i]:getY() < ptPs:getY())
nOrthoOpposite = EgtIf( bFront, MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT)
else
if bConvex then
if dLen < dMaxDepth then
local bFront = ( vtN[i]:getY() < 0.02)
nOrthoOpposite = EgtIf( bFront, MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT)
else
nOrthoOpposite = MCH_MILL_FU.ORTHO_DOWN
end
else
local bOver = ( ptC[i]:getZ() > ptC[3-i]:getZ())
nOrthoOpposite = EgtIf( bOver, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_TOP)
end
end
local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, i - 1, sCutting, dSawDiam, nOrthoOpposite, nil, dExtraCut, BD.CUT_SIC, 0, 0, nil, b3Raw)
if not bOk then
return bOk, sErr
end
end
-- altrimenti, tagli diretti delle facce
else
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, EgtIf( bHead, 'HeadSide', 'TailSide'))
end
end
-- eventuale segnalazione ingombro di testa o coda