Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 45afa144ad | |||
| dc4a0eda3e | |||
| b0cdb95e48 | |||
| 53e8605297 | |||
| 41e490dcd2 | |||
| 56f66d66c3 | |||
| 7497b62dee | |||
| e67e397225 | |||
| a972fbd425 | |||
| d5140acc91 | |||
| b197c96a34 | |||
| f3a72a7683 | |||
| d72560241b | |||
| 0689328082 | |||
| a1a6f2243a |
+14
-2
@@ -1,4 +1,4 @@
|
|||||||
-- BeamExec.lua by Egaltech s.r.l. 2022/08/08
|
-- BeamExec.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Libreria esecuzione lavorazioni per Travi
|
-- Libreria esecuzione lavorazioni per Travi
|
||||||
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
|
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
|
||||||
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
|
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
-- controllata tramite il parametro IMPROVE_HEAD_TAIL_DRILLINGS da BeamData. Attivata di default.
|
-- controllata tramite il parametro IMPROVE_HEAD_TAIL_DRILLINGS da BeamData. Attivata di default.
|
||||||
-- 2022/08/01 Tolleranza su sezione portata a 0.1 mm (100 * GEO.EPS_SMALL).
|
-- 2022/08/01 Tolleranza su sezione portata a 0.1 mm (100 * GEO.EPS_SMALL).
|
||||||
-- 2022/08/08 Modifica per macchine senza BD.MAX_WIDTH2 e BD.MAX_HEIGHT2.
|
-- 2022/08/08 Modifica per macchine senza BD.MAX_WIDTH2 e BD.MAX_HEIGHT2.
|
||||||
|
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local BeamExec = {}
|
local BeamExec = {}
|
||||||
@@ -391,6 +392,7 @@ end
|
|||||||
-- *** Inserimento delle travi nel grezzo ***
|
-- *** Inserimento delle travi nel grezzo ***
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function VerifyBigSectionCut( dRawW, dRawH)
|
local function VerifyBigSectionCut( dRawW, dRawH)
|
||||||
|
-- lama principale
|
||||||
local sCutting = ML.FindCutting( 'TailSide')
|
local sCutting = ML.FindCutting( 'TailSide')
|
||||||
local dMaxDepth = 50
|
local dMaxDepth = 50
|
||||||
if EgtMdbSetCurrMachining( sCutting or '') then
|
if EgtMdbSetCurrMachining( sCutting or '') then
|
||||||
@@ -400,9 +402,19 @@ local function VerifyBigSectionCut( dRawW, dRawH)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
||||||
|
-- eventuale lama su testa sotto
|
||||||
|
local sCutting2 = ML.FindCutting( 'TailSide_H2', false, true)
|
||||||
|
local dMaxDepth2 = 0
|
||||||
|
if sCutting2 and EgtMdbSetCurrMachining( sCutting2) then
|
||||||
|
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
||||||
|
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- verifiche
|
||||||
local dDimYRef = EgtIf( dRawH < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
local dDimYRef = EgtIf( dRawH < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
||||||
local bBigSectionCut = ( dRawW > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
local bBigSectionCut = ( dRawW > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
||||||
( dRawH > EgtIf( BD.DOWN_HEAD or BD.TURN, 2, 1) * dMaxVertDepth - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
( dRawH > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
return bBigSectionCut
|
return bBigSectionCut
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe).
|
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe).
|
||||||
-- 2022/06/28 Modificata determinazione taglio bFromBottom in MakeFromTop.
|
-- 2022/06/28 Modificata determinazione taglio bFromBottom in MakeFromTop.
|
||||||
-- 2022/07/18 Se Q04=1, aggiunto LongCut anche dal lato per macchine tipo PF1250.
|
-- 2022/07/18 Se Q04=1, aggiunto LongCut anche dal lato per macchine tipo PF1250.
|
||||||
|
-- 2022/08/12 I tagli di lama inclinati in coda ora partono dal centro e non dall'esterno.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessCut = {}
|
local ProcessCut = {}
|
||||||
@@ -484,7 +485,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
elseif Proc.Head then
|
elseif Proc.Head then
|
||||||
vtOrthoO = EgtIf( vtN:getY() > -0.02, -Y_AX(), Y_AX())
|
vtOrthoO = EgtIf( vtN:getY() > -0.02, -Y_AX(), Y_AX())
|
||||||
else
|
else
|
||||||
if vtN:getZ() < dVzLimDwnUp then
|
if vtN:getZ() < dVzLimDwnUp or Proc.Tail then
|
||||||
vtOrthoO = EgtIf( vtN:getY() > -0.02, -Y_AX(), Y_AX())
|
vtOrthoO = EgtIf( vtN:getY() > -0.02, -Y_AX(), Y_AX())
|
||||||
else
|
else
|
||||||
vtOrthoO = EgtIf( vtN:getY() > 0.02, Y_AX(), -Y_AX())
|
vtOrthoO = EgtIf( vtN:getY() > 0.02, Y_AX(), -Y_AX())
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessDrill.lua by Egaltech s.r.l. 2022/04/21
|
-- ProcessDrill.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Gestione calcolo forature per Travi
|
-- Gestione calcolo forature per Travi
|
||||||
-- 2021/04/14 DS Corretta gestione Invert con testa da sotto. Migliorato calcolo ingombro portautensile.
|
-- 2021/04/14 DS Corretta gestione Invert con testa da sotto. Migliorato calcolo ingombro portautensile.
|
||||||
-- 2021/05/03 DS Su macchina con testa da sotto aggiunta possibilità di fare fori verticali metà sopra e l'altra sotto.
|
-- 2021/05/03 DS Su macchina con testa da sotto aggiunta possibilità di fare fori verticali metà sopra e l'altra sotto.
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
-- 2022/07/07 Aggiunta la gestione delle forature migliorate in presenza di feature testa/coda che tagliano tutta la sezione; gli Id delle feature sono nelle proprietà MachineAfterHeadCutId e MachineAfterTailCutId.
|
-- 2022/07/07 Aggiunta la gestione delle forature migliorate in presenza di feature testa/coda che tagliano tutta la sezione; gli Id delle feature sono nelle proprietà MachineAfterHeadCutId e MachineAfterTailCutId.
|
||||||
-- 2022/07/12 Aggiunto un valore minimo (10) per la distanza di sicurezza.
|
-- 2022/07/12 Aggiunto un valore minimo (10) per la distanza di sicurezza.
|
||||||
-- 2022/07/27 Aggiunta la gestione del tipo di foratura "AngleDrill" per fori molto inclinati
|
-- 2022/07/27 Aggiunta la gestione del tipo di foratura "AngleDrill" per fori molto inclinati
|
||||||
|
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto e punta disabilitata.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessDrill = {}
|
local ProcessDrill = {}
|
||||||
@@ -231,15 +232,17 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
vtExtr = - vtExtr
|
vtExtr = - vtExtr
|
||||||
end
|
end
|
||||||
local bOpen = ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)
|
local bOpen = ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)
|
||||||
|
-- verifico possibilità di foratura da sotto
|
||||||
|
local bDownDrill = ( BD.DOWN_HEAD and ML.FindDrilling( dDiam, nil, false, true))
|
||||||
-- verifico che il foro non sia fattibile solo da sotto
|
-- verifico che il foro non sia fattibile solo da sotto
|
||||||
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not BD.DOWN_HEAD)
|
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not bDownDrill)
|
||||||
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
|
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
|
||||||
local sErr = 'Error : drilling from bottom impossible'
|
local sErr = 'Error : drilling from bottom impossible'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- se non già richiesta inversione e invertibile
|
-- se non già richiesta inversione e invertibile
|
||||||
if not bToInvert and Proc.Flg == 1 and ( -vtExtr:getZ() >= BD.DRILL_VZ_MIN or BD.DOWN_HEAD) then
|
if not bToInvert and Proc.Flg == 1 and ( -vtExtr:getZ() >= BD.DRILL_VZ_MIN or bDownDrill) then
|
||||||
-- se il foro è cieco o troppo inclinato all'inizio, lo inverto
|
-- se il foro è cieco o troppo inclinato all'inizio, lo inverto
|
||||||
local _, CosB, _ = GetHoleStartData( ptCen, vtExtr, b3Solid)
|
local _, CosB, _ = GetHoleStartData( ptCen, vtExtr, b3Solid)
|
||||||
if Proc.Fcs == 0 or ( CosB > BD.DRILL_VX_MAX and bOpen) then
|
if Proc.Fcs == 0 or ( CosB > BD.DRILL_VX_MAX and bOpen) then
|
||||||
@@ -262,8 +265,8 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
local dCheckDepth2 = dDepth2
|
local dCheckDepth2 = dDepth2
|
||||||
local nErrorCode = 0
|
local nErrorCode = 0
|
||||||
-- abilitazione foratura da sotto
|
-- abilitazione foratura da sotto
|
||||||
local bDrillDown = ( BD.DOWN_HEAD and ( Proc.Down or vtExtr:getZ() < -0.1 or vtExtr:getZ() < 0.259))
|
local bDrillDown = ( bDownDrill and ( Proc.Down or vtExtr:getZ() < -0.1 or vtExtr:getZ() < 0.259))
|
||||||
local bDrillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.5)
|
local bDrillUp = ( bDownDrill and vtExtr:getZ() > -0.5)
|
||||||
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
|
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
|
||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown)
|
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown)
|
||||||
@@ -479,7 +482,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||||
-- eseguo
|
-- eseguo
|
||||||
local bOk = ML.ApplyMachining( true, false)
|
local bOk = ML.ApplyMachining( true, false)
|
||||||
if not bOk and BD.DOWN_HEAD then
|
if not bOk and bDownDrill then
|
||||||
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
|
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessDtMortise.lua by Egaltech s.r.l. 2022/06/07
|
-- ProcessDtMortise.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Gestione calcolo mortase a coda di rondine per Travi
|
-- Gestione calcolo mortase a coda di rondine per Travi
|
||||||
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
|
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
|
||||||
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
|
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
-- 2021/07/20 Aggiunta gestione rinvio angolare su FAST.
|
-- 2021/07/20 Aggiunta gestione rinvio angolare su FAST.
|
||||||
-- 2021/12/01 Se frontale aggiungo taglio con Grp e Proc di vero taglio (per aggiornare ingombro di testa /coda).
|
-- 2021/12/01 Se frontale aggiungo taglio con Grp e Proc di vero taglio (per aggiornare ingombro di testa /coda).
|
||||||
-- 2022/06/01 Modifiche per evitare di entrare nel legno con mortase parziali.
|
-- 2022/06/01 Modifiche per evitare di entrare nel legno con mortase parziali.
|
||||||
|
-- 2022/08/18 Migliorato calcolo dello step.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessDtMortise = {}
|
local ProcessDtMortise = {}
|
||||||
@@ -430,7 +431,8 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
local dDist = min( vtOrtDiff:len(), dWidthMrt)
|
local dDist = min( vtOrtDiff:len(), dWidthMrt)
|
||||||
-- calcolo le passate
|
-- calcolo le passate
|
||||||
local nPass = ceil( dDist / ( 1.9 * dToolDiam))
|
local nPass = ceil( dDist / ( 1.9 * dToolDiam))
|
||||||
local dStep = ( dDist - 0.95 * dToolDiam) / ( 2 * nPass)
|
local dStep = 0
|
||||||
|
if nPass > 1 then dStep = max( ( dDist - 2 * dToolDiam) / ( 2 * nPass - 2), 0.25 * dToolDiam) end
|
||||||
for i = nPass, 1, -1 do
|
for i = nPass, 1, -1 do
|
||||||
-- inserisco la lavorazione di contornatura
|
-- inserisco la lavorazione di contornatura
|
||||||
local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass)
|
local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2021/10/07
|
-- ProcessFreeContour.lua by Egaltech s.r.l. 2021/10/07
|
||||||
-- Gestione calcolo profilo libero per Travi
|
-- Gestione calcolo profilo libero per Travi
|
||||||
|
-- 2022/08/23 Aggiunta la funzione MakeByMark per la gestione del caso P13=10
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessFreeContour = {}
|
local ProcessFreeContour = {}
|
||||||
@@ -233,14 +234,16 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
local dDepth = abs( EgtCurveThickness( AuxId))
|
local dDepth = abs( EgtCurveThickness( AuxId))
|
||||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||||
local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD)
|
local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD)
|
||||||
local bToolInv = ( vtExtr:getZ() < -0.1)
|
local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5)
|
||||||
local bDown = ( b3Aux:getMin():getZ() < b3Raw:getMin():getZ() + 5)
|
local bDown = ( b3Aux:getMin():getZ() < b3Raw:getMin():getZ() + 5)
|
||||||
-- verifico se in testa o coda
|
-- verifico se in testa o coda
|
||||||
local bHead = Proc.Head
|
local bHead = Proc.Head
|
||||||
-- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva
|
-- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva
|
||||||
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true)
|
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true)
|
||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
local sMilling = ML.FindMilling( 'FreeContour')
|
local bTopHead = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.1)
|
||||||
|
local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1)
|
||||||
|
local sMilling = ML.FindMilling( 'FreeContour', nil, nil, nil, nil, bTopHead, bDownHead)
|
||||||
if not sMilling then
|
if not sMilling then
|
||||||
local sErr = 'Error : FreeContour not found in library'
|
local sErr = 'Error : FreeContour not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -688,6 +691,76 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
local function MakeByMark( Proc, nRawId, b3Raw, nPartId)
|
||||||
|
-- ingombro del pezzo
|
||||||
|
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
|
||||||
|
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||||
|
if not b3Solid then
|
||||||
|
local sErr = 'Error : part box not found'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- recupero e verifico l'entità curva
|
||||||
|
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||||
|
if AuxId then AuxId = AuxId + Proc.Id end
|
||||||
|
if not AuxId or ( EgtGetType( AuxId) & GDB_FY.GEO_CURVE) == 0 then
|
||||||
|
local sErr = 'Error : missing profile geometry'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- recupero i dati della curva e del profilo
|
||||||
|
local dDepth = abs( EgtCurveThickness( AuxId))
|
||||||
|
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||||
|
local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5)
|
||||||
|
-- verifico che la marcatura non sia orientata verso il basso (-5 deg)
|
||||||
|
if vtExtr:getZ() < - 0.1 and not BD.DOWN_HEAD and not BD.TURN then
|
||||||
|
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' Mark from bottom impossible'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- abilitazione lavorazione da sotto
|
||||||
|
local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
|
||||||
|
local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
|
||||||
|
-- recupero la lavorazione
|
||||||
|
local sMillType = 'Text'
|
||||||
|
--local sMchExt = EgtIf( bMillDown, '_H2', '')
|
||||||
|
local sMilling = ML.FindMilling( sMillType, nil, nil, nil, nil, bMillUp, bMillDown)
|
||||||
|
if not sMilling then
|
||||||
|
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- inserisco la lavorazione
|
||||||
|
local sName = 'FreeMark_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
|
local nMchId = EgtAddMachining( sName, sMilling)
|
||||||
|
if not nMchId then
|
||||||
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
EgtSetInfo( nMchId, 'Part', Proc.PartId)
|
||||||
|
-- aggiungo geometria
|
||||||
|
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||||
|
-- se estrusione da sotto, inverto direzione fresa
|
||||||
|
if bToolInv then
|
||||||
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
|
end
|
||||||
|
-- posizione braccio porta testa
|
||||||
|
local nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
if AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||||
|
nSCC = EgtIf( Proc.Box:getDimX() >= Proc.Box:getDimY(), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_XP)
|
||||||
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
|
-- eseguo
|
||||||
|
if not EgtApplyMachining( true, false) then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchId, false)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Applicazione della lavorazione
|
-- Applicazione della lavorazione
|
||||||
function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
@@ -698,7 +771,15 @@ function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
return MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
return MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
-- altrimenti contornatura
|
-- altrimenti contornatura
|
||||||
else
|
else
|
||||||
return MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
-- recupero il tipo di lavorazione
|
||||||
|
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
|
||||||
|
-- se marcatura
|
||||||
|
if nCntType == 10 then
|
||||||
|
return MakeByMark( Proc, nRawId, b3Raw, nPartId)
|
||||||
|
-- se fresatura
|
||||||
|
else
|
||||||
|
return MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+16
-14
@@ -1,7 +1,8 @@
|
|||||||
-- ProcessSplit.lua by Egaltech s.r.l. 2022/07/25
|
-- ProcessSplit.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Gestione calcolo tagli di testa per Travi
|
-- Gestione calcolo tagli di testa per Travi
|
||||||
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio di tipo diceCut.
|
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio di tipo diceCut.
|
||||||
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
||||||
|
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessHeadCut = {}
|
local ProcessHeadCut = {}
|
||||||
@@ -173,10 +174,22 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
||||||
|
-- recupero la eventuale lavorazione con lama da sotto
|
||||||
|
local sCutting2 = ML.FindCutting( 'HeadSide_H2', false, true)
|
||||||
|
-- recupero i dati della eventuale seconda lama
|
||||||
|
local dSawDiam2 = 0
|
||||||
|
local dMaxDepth2 = 0
|
||||||
|
if sCutting2 and EgtMdbSetCurrMachining( sCutting2) then
|
||||||
|
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
||||||
|
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
|
||||||
|
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
||||||
|
end
|
||||||
|
end
|
||||||
-- caratteristiche taglio
|
-- caratteristiche taglio
|
||||||
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
||||||
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
||||||
( b3Raw:getDimZ() > EgtIf( BD.DOWN_HEAD or BD.TURN, 2, 1) * dMaxVertDepth - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
local bHorizCut = ( not bBigSectionCut and ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)
|
local bHorizCut = ( not bBigSectionCut and ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)
|
||||||
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bBigSectionCut and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bBigSectionCut and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
local bDoubleCut = ( not bBigSectionCut and not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
local bDoubleCut = ( not bBigSectionCut and not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
||||||
@@ -250,23 +263,12 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
end
|
end
|
||||||
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
|
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
|
||||||
else
|
else
|
||||||
-- recupero la lavorazione con lama da sotto
|
-- verifico esistenza della lavorazione con lama da sotto
|
||||||
local sCutting2 = ML.FindCutting( 'HeadSide_H2', false, true)
|
|
||||||
if not sCutting2 then
|
if not sCutting2 then
|
||||||
local sErr = 'Error : cutting H2 not found in library'
|
local sErr = 'Error : cutting H2 not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- recupero i dati della seconda lama
|
|
||||||
local dSawDiam2 = 400
|
|
||||||
local dMaxDepth2 = 50
|
|
||||||
if EgtMdbSetCurrMachining( sCutting2) then
|
|
||||||
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
|
||||||
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
|
|
||||||
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- verifico che le due lame riescano a lavorare la sezione
|
-- verifico che le due lame riescano a lavorare la sezione
|
||||||
local dDimZ = b3Raw:getDimZ()
|
local dDimZ = b3Raw:getDimZ()
|
||||||
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
|
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
|
||||||
|
|||||||
+87
-56
@@ -49,6 +49,7 @@
|
|||||||
-- 2022/06/29 Migliorate lavorazioni con fresatura di lato per L30 se parametro Q03=2. Ora con 4 facce / 3 facce a L può entrare una fresa grande fino al doppio dell'altezza della tasca / doppio della dimensione minima.
|
-- 2022/06/29 Migliorate lavorazioni con fresatura di lato per L30 se parametro Q03=2. Ora con 4 facce / 3 facce a L può entrare una fresa grande fino al doppio dell'altezza della tasca / doppio della dimensione minima.
|
||||||
-- 2022/07/05 Modifiche per sega a catena di testa e relativa MaxElev.
|
-- 2022/07/05 Modifiche per sega a catena di testa e relativa MaxElev.
|
||||||
-- 2022/07/12 In MakeByChainOrSaw aggiunto check per feature L20 usata in modo improprio e, nel caso, si passa a una lavorazione tasca.
|
-- 2022/07/12 In MakeByChainOrSaw aggiunto check per feature L20 usata in modo improprio e, nel caso, si passa a una lavorazione tasca.
|
||||||
|
-- 2022/08/11 Aggiunta lavorazione tunnel splittata con sega a catena per tutte le macchine ad esclusione della Fast.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessLapJoint = {}
|
local ProcessLapJoint = {}
|
||||||
@@ -4349,6 +4350,59 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
return true, sMyWarn
|
return true, sMyWarn
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
local function MakeTunnelByChainSaw( Proc, sSawing, nLundIdFace, vtOrtho, dWorkDepth, dMaxMat, nStep, dStep, sFaceUse, bOpposite)
|
||||||
|
for i = 1, nStep do
|
||||||
|
-- inserisco la lavorazione di sawing
|
||||||
|
local sName = ''
|
||||||
|
if bOpposite then
|
||||||
|
sName = 'Csaw_Opp_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
||||||
|
else
|
||||||
|
sName = 'Csaw_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
||||||
|
end
|
||||||
|
local nMchFId = EgtAddMachining( sName, sSawing)
|
||||||
|
if not nMchFId then
|
||||||
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- aggiungo geometria
|
||||||
|
EgtSetMachiningGeometry( {{ Proc.Id, nLundIdFace}})
|
||||||
|
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nLundIdFace, GDB_ID.ROOT)
|
||||||
|
-- imposto angolo 3° asse rot
|
||||||
|
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 1))
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
|
||||||
|
-- imposto offset radiale
|
||||||
|
local dOffs = ( i - 1) * dStep
|
||||||
|
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
||||||
|
EgtSetMachiningParam( MCH_MP.FACEUSE, sFaceUse)
|
||||||
|
EgtSetMachiningParam( MCH_MP.DEPTH, dWorkDepth)
|
||||||
|
-- modifico la distanza di attacco per considerare anche tunnel inclinati
|
||||||
|
EgtSetMachiningParam( MCH_MP.STARTPOS, 50)
|
||||||
|
-- eseguo
|
||||||
|
if not ML.ApplyMachining( true, false) then
|
||||||
|
if EgtGetOutstrokeInfo() then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchFId, false)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 2))
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 2))
|
||||||
|
if not ML.ApplyMachining( true, false) then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchFId, false)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if EgtIsMachiningEmpty() then
|
||||||
|
_, sWarn = EgtGetMachMgrWarning( 0)
|
||||||
|
EgtSetOperationMode( nMchFId, false)
|
||||||
|
return false, sWarn
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePart, bPrevBhSideMill, bAllWithEndCap)
|
local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePart, bPrevBhSideMill, bAllWithEndCap)
|
||||||
if not BD.MAXDIAM_POCK_CORNER then
|
if not BD.MAXDIAM_POCK_CORNER then
|
||||||
@@ -4470,63 +4524,40 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
if nStep > 1 then
|
if nStep > 1 then
|
||||||
dStep = ( dDimMin - dSawThick) / ( nStep - 1)
|
dStep = ( dDimMin - dSawThick) / ( nStep - 1)
|
||||||
end
|
end
|
||||||
for i = 1, nStep do
|
local bSplit = false
|
||||||
-- inserisco la lavorazione di sawing
|
local sFaceUse, sFaceUseOtherSide
|
||||||
local sName = 'Csaw_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
-- imposto il lato di lavorazione, da sopra oppure di fronte
|
||||||
local nMchFId = EgtAddMachining( sName, sSawing)
|
-- se è di fronte, non è una Fast e il tagliente non arriva splitto la lavorazione
|
||||||
if not nMchFId then
|
-- Questa feature non è applicata su facce di testa e quindi non controllo l'entrata in X
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
if abs(vtOrtho:getZ()) >= 0.707 then
|
||||||
EgtOutLog( sErr)
|
sFaceUse = MCH_MILL_FU.PARAL_DOWN
|
||||||
return false, sErr
|
else
|
||||||
end
|
sFaceUse = MCH_MILL_FU.PARAL_BACK
|
||||||
-- aggiungo geometria
|
-- per escludere la Fast controllo C_SIMM
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, nLundIdFace}})
|
if BD.C_SIMM and dMaxMat < dDepth then
|
||||||
-- imposto uso del lato faccia
|
bSplit = true
|
||||||
-- al momento, dato che la fessura è passante da parte a parte, gestisco solo la lavorazione
|
sFaceUseOtherSide = MCH_MILL_FU.PARAL_FRONT
|
||||||
-- dall'alto e di fronte (da dietro è disabilitata perchè ho extracorsa con la FAST).
|
dDepth = dDepth / 2 + BD.CUT_EXTRA
|
||||||
-- Questa feature non è applicata su facce di testa e quindi non controllo l'entrata in X
|
|
||||||
if abs(vtOrtho:getZ()) >= 0.707 then
|
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
|
||||||
else
|
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_BACK)
|
|
||||||
end
|
|
||||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nLundIdFace, GDB_ID.ROOT)
|
|
||||||
-- imposto angolo 3° asse rot
|
|
||||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 1))
|
|
||||||
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
|
|
||||||
-- imposto offset radiale
|
|
||||||
local dOffs = ( i - 1) * dStep
|
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
|
||||||
-- se possibile aumento l'affondamento pari al raggio corner + 1
|
|
||||||
if dMaxMat > (dDepth + dSawCornerRad + 1) then
|
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, (dDepth + dSawCornerRad + 1))
|
|
||||||
-- se massimo affondamento utensile inferiore fessura, setto affondamento ed emetto warning
|
|
||||||
elseif dMaxMat < dDepth then
|
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat)
|
|
||||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
|
||||||
EgtOutLog( sWarn)
|
|
||||||
end
|
|
||||||
-- eseguo
|
|
||||||
if not ML.ApplyMachining( true, false) then
|
|
||||||
if EgtGetOutstrokeInfo() then
|
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
|
||||||
EgtSetOperationMode( nMchFId, false)
|
|
||||||
return false, sErr
|
|
||||||
end
|
|
||||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 2))
|
|
||||||
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 2))
|
|
||||||
if not ML.ApplyMachining( true, false) then
|
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
|
||||||
EgtSetOperationMode( nMchFId, false)
|
|
||||||
return false, sErr
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if EgtIsMachiningEmpty() then
|
|
||||||
_, sWarn = EgtGetMachMgrWarning( 0)
|
|
||||||
EgtSetOperationMode( nMchFId, false)
|
|
||||||
return false, sWarn
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local dWorkDepth = dDepth
|
||||||
|
-- cerco di estendere il taglio considerando la parte arrotondata della lama + 1
|
||||||
|
if dMaxMat > dDepth + dSawCornerRad + 1 then
|
||||||
|
dWorkDepth = dDepth + dSawCornerRad + 1
|
||||||
|
-- se massimo affondamento utensile inferiore alla profondità da lavorare, setto la profondità di lavoro e emetto warning
|
||||||
|
elseif dMaxMat < dDepth then
|
||||||
|
dWorkDepth = dMaxMat
|
||||||
|
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||||
|
EgtOutLog( sWarn)
|
||||||
|
end
|
||||||
|
-- lavoro da un lato
|
||||||
|
local bOk, sErr = MakeTunnelByChainSaw( Proc, sSawing, nLundIdFace, vtOrtho, dWorkDepth, dMaxMat, nStep, dStep, sFaceUse, false)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
-- se è da lavorare anche dall'altro lato
|
||||||
|
if bSplit then
|
||||||
|
bOk, sErr = MakeTunnelByChainSaw( Proc, sSawing, nLundIdFace, vtOrtho, dWorkDepth, dMaxMat, nStep, dStep, sFaceUseOtherSide, true)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- altrimenti non è una fessura
|
-- altrimenti non è una fessura
|
||||||
@@ -5147,7 +5178,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
-- 3 facce non a L ma con una faccia favorevole a Y, oppure
|
-- 3 facce non a L ma con una faccia favorevole a Y, oppure
|
||||||
-- 4 facce
|
-- 4 facce
|
||||||
-- lancio la MakePocket ( lavorazione solo da un lato, fondo della tasca la faccia più favorevole a Y)
|
-- lancio la MakePocket ( lavorazione solo da un lato, fondo della tasca la faccia più favorevole a Y)
|
||||||
if bForceSideMill and (( Proc.Fct == 3 and bIsL) or ( Proc.Fct == 3 and abs( vtNFacApproxY:getY()) >= 0.707 ) or Proc.Fct == 4) then
|
if bForceSideMill and (( Proc.Fct == 3 and bIsL) or ( ( Proc.Fct == 3 or Proc.Fct == 2) and abs( vtNFacApproxY:getY()) >= 0.707 ) or Proc.Fct == 4) then
|
||||||
nFacInd, vtN, ptC = nFacApproxY, vtNFacApproxY, ptCFacApproxY
|
nFacInd, vtN, ptC = nFacApproxY, vtNFacApproxY, ptCFacApproxY
|
||||||
local tvtNx = {}
|
local tvtNx = {}
|
||||||
tvtNx[2] = vtN
|
tvtNx[2] = vtN
|
||||||
|
|||||||
+16
-14
@@ -1,7 +1,8 @@
|
|||||||
-- ProcessSplit.lua by Egaltech s.r.l. 2022/07/26
|
-- ProcessSplit.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Gestione calcolo tagli di separazione per Travi
|
-- Gestione calcolo tagli di separazione per Travi
|
||||||
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio con sega a catena seguito da rifinitura con lama (aggiunta funzione MakeSplitByChainSaw); gestione eventuale creazione nuova fase dall'interno della Make.
|
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio con sega a catena seguito da rifinitura con lama (aggiunta funzione MakeSplitByChainSaw); gestione eventuale creazione nuova fase dall'interno della Make.
|
||||||
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
||||||
|
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessSplit = {}
|
local ProcessSplit = {}
|
||||||
@@ -261,10 +262,22 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
||||||
|
-- recupero la eventuale lavorazione con lama da sotto
|
||||||
|
local sCutting2 = ML.FindCutting( 'TailSide_H2', false, true)
|
||||||
|
-- recupero i dati della eventuale seconda lama
|
||||||
|
local dSawDiam2 = 0
|
||||||
|
local dMaxDepth2 = 0
|
||||||
|
if sCutting2 and EgtMdbSetCurrMachining( sCutting2) then
|
||||||
|
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
||||||
|
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
|
||||||
|
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
||||||
|
end
|
||||||
|
end
|
||||||
-- caratteristiche taglio
|
-- caratteristiche taglio
|
||||||
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
||||||
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
||||||
( b3Raw:getDimZ() > EgtIf( BD.DOWN_HEAD or BD.TURN, 2, 1) * dMaxVertDepth - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
local bHorizCut = ( not bBigSectionCut and ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and ( b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA))
|
local bHorizCut = ( not bBigSectionCut and ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and ( b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA))
|
||||||
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bBigSectionCut and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bBigSectionCut and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
local bDoubleCut = ( not bBigSectionCut and not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
local bDoubleCut = ( not bBigSectionCut and not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
||||||
@@ -433,23 +446,12 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
end
|
end
|
||||||
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
|
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
|
||||||
else
|
else
|
||||||
-- recupero la lavorazione con lama da sotto
|
-- verifico esistenza della lavorazione con lama da sotto
|
||||||
local sCutting2 = ML.FindCutting( 'TailSide_H2', false, true)
|
|
||||||
if not sCutting2 then
|
if not sCutting2 then
|
||||||
local sErr = 'Error : cutting H2 not found in library'
|
local sErr = 'Error : cutting H2 not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- recupero i dati della seconda lama
|
|
||||||
local dSawDiam2 = 400
|
|
||||||
local dMaxDepth2 = 50
|
|
||||||
if EgtMdbSetCurrMachining( sCutting2) then
|
|
||||||
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
|
||||||
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
|
|
||||||
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- verifico che le due lame riescano a lavorare la sezione
|
-- verifico che le due lame riescano a lavorare la sezione
|
||||||
local dDimZ = b3Raw:getDimZ()
|
local dDimZ = b3Raw:getDimZ()
|
||||||
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
|
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
|
||||||
|
|||||||
Reference in New Issue
Block a user