Merge remote-tracking branch 'remotes/origin/master' into lapjoint
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
-- ProcessCut.lua by Egaltech s.r.l. 2021/11/27
|
||||
-- ProcessCut.lua by Egaltech s.r.l. 2022/01/26
|
||||
-- Gestione calcolo singoli tagli di lama per Travi
|
||||
-- 2021/05/18 I due tagli con testa da sotto di un cubetto sono fatti di seguito.
|
||||
-- 2021/06/06 Correzioni per tagli con testa da sotto.
|
||||
-- 2021/07/14 Migliorie per tagli con testa da sotto.
|
||||
-- 2021/09/19 Tagli da sotto non sbiechi favorita posizione da sopra di testa.
|
||||
-- 2021/10/06 Piccola correzione a tagli di cubetti con testa da sotto.
|
||||
-- 2022/01/26 Taglio da sotto orizzontale deve avere direzione di riferimento ortogonale -Z.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessCut = {}
|
||||
@@ -589,7 +590,7 @@ local function MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
vtOrthoO_2 = Vector3d( vtO) * EgtIf( bOrthInv, -1, 1)
|
||||
else
|
||||
if bHorizCut then
|
||||
vtOrthoO_2 = Z_AX()
|
||||
vtOrthoO_2 = -Z_AX()
|
||||
elseif vtN:getY() > -0.02 then
|
||||
if not Proc.Head then
|
||||
vtOrthoO_2 = -Y_AX()
|
||||
@@ -637,7 +638,7 @@ local function MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- lavoro la faccia
|
||||
local vtOrthoO
|
||||
if bHorizCut and ( b3Solid:getDimX() > BD.LEN_SHORT_PART or vtN:getX() > 0) then
|
||||
vtOrthoO = Z_AX()
|
||||
vtOrthoO = -Z_AX()
|
||||
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
if Proc.Head then
|
||||
vtOrthoO = X_AX()
|
||||
|
||||
+10
-16
@@ -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 testa per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -171,9 +171,9 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
||||
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 not bDoubleHorizCut 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)
|
||||
-- se non obbligatorio e coincide con inizio grezzo, non va fatto
|
||||
@@ -192,7 +192,7 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
||||
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
|
||||
@@ -219,16 +219,10 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
||||
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 head cut'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero la lavorazione con lama da sotto
|
||||
local sCutting2 = ML.FindCutting( 'HeadSide_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
|
||||
@@ -244,15 +238,15 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
||||
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 head 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
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
-- ProcessProfCamb.lua by Egaltech s.r.l. 2021/11/09
|
||||
-- ProcessProfCamb.lua by Egaltech s.r.l. 2022/01/26
|
||||
-- Gestione calcolo profilo caudato per Travi
|
||||
-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto.
|
||||
-- 2021/06/28 Per macchine con testa sotto, smussi di lato con questa testa se non c'è lav.ne da sopra.
|
||||
-- 2021/10/12 Estesa gestione di testa da sotto, se presente.
|
||||
-- 2021/10/12 Portato a 30deg l'angolo limite per fare l'antischeggia.
|
||||
-- 2022/01/26 Migliorato controllo lavorazione con fresa su testa da sotto.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessProfCamb = {}
|
||||
@@ -289,8 +290,9 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- recupero la lavorazione di fresatura
|
||||
local sMillType = 'Prof'
|
||||
sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', ''))
|
||||
if not sMilling then
|
||||
if not sMilling and bMillDown then
|
||||
sMilling = ML.FindMilling( sMillType)
|
||||
bMillDown = false
|
||||
end
|
||||
if not sMilling then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library'
|
||||
@@ -311,9 +313,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- recupero la lavorazione
|
||||
local sCutType = 'HeadSide'
|
||||
local sCutting = ML.FindCutting( sCutType .. EgtIf( bMillDown, '_H2', ''))
|
||||
if not sCutting then
|
||||
sCutting = ML.FindCutting( sCutType)
|
||||
end
|
||||
-- se richiesto taglio con lama da sotto e non trovato non posso utilizzare quello da sopra
|
||||
if not sCutting then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' sawing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
|
||||
+11
-17
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessStepJoint.lua by Egaltech s.r.l. 2021/01/23
|
||||
-- ProcessStepJoint.lua by Egaltech s.r.l. 2022/01/26
|
||||
-- Gestione calcolo giunto a gradino per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -81,7 +81,13 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
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)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2021/09/22
|
||||
-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2022/01/25
|
||||
-- Gestione calcolo tacca a gradino per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -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() > -0.1)
|
||||
local bDownHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() < 0.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)
|
||||
|
||||
Reference in New Issue
Block a user