DataBeam :
- migliorato ordinamento fori - riunite FindMilling, .... in una unica libreria - altre piccole migliorie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessSplit.lua by Egaltech s.r.l. 2019/04/08
|
||||
-- ProcessSplit.lua by Egaltech s.r.l. 2019/04/25
|
||||
-- Gestione calcolo tagli di separazione per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -12,18 +12,7 @@ EgtOutLog( ' ProcessSplit started', 1)
|
||||
|
||||
-- Dati
|
||||
local BD = require( 'BeamData')
|
||||
local Cuttings = require( 'CutData')
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function FindCutting( sType)
|
||||
for i = 1, #Cuttings do
|
||||
local Cutting = Cuttings[i]
|
||||
if Cutting.Type == sType then
|
||||
return i, Cutting.Name
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
local ML = require( 'MachiningLib')
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Riconoscimento della feature
|
||||
@@ -60,7 +49,7 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
end
|
||||
-- recupero la lavorazione
|
||||
local _, sCutting = FindCutting( EgtIf( bSplit, 'SplitSide', 'TailSide'))
|
||||
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)
|
||||
@@ -80,7 +69,7 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
|
||||
if bDoubleCut then
|
||||
for i = nCuts, 1, -1 do
|
||||
local dCutOffset = ( i - 1) * dOffsL
|
||||
local sNotes = 'Cut'
|
||||
local sNotes = EgtIf( bSplit, 'Presplit;', 'Precut;')
|
||||
local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_BACK, dCutExtra, BD.CUT_SIC, dCutOffset, sNotes, b3Raw)
|
||||
if not bOk then return false, true, sErr end
|
||||
end
|
||||
@@ -89,8 +78,10 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId)
|
||||
for i = nCuts, 1, -1 do
|
||||
local dCutOffset = ( i - 1) * dOffsL
|
||||
local sNotes
|
||||
if not bSplit then
|
||||
sNotes = EgtIf( i == 1, 'Cut', 'Precut')
|
||||
if bSplit then
|
||||
sNotes = EgtIf( i == 1, 'Split;', 'Presplit;')
|
||||
else
|
||||
sNotes = EgtIf( i == 1, 'Cut;', 'Precut;')
|
||||
end
|
||||
local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, 0, sCutting, dSawDiam, nOrthoOpposite, dCutExtra, BD.CUT_SIC, dCutOffset, sNotes, b3Raw)
|
||||
if not bOk then return false, true, sErr end
|
||||
|
||||
Reference in New Issue
Block a user