DataBeam :

- migliorato ordinamento fori
- riunite FindMilling, .... in una unica libreria
- altre piccole migliorie.
This commit is contained in:
Dario Sassi
2019-04-26 15:06:31 +00:00
parent fc441ff8b2
commit 998624035b
30 changed files with 354 additions and 710 deletions
+6 -29
View File
@@ -1,4 +1,4 @@
-- ProcessMortise.lua by Egaltech s.r.l. 2019/03/25
-- ProcessMortise.lua by Egaltech s.r.l. 2019/04/26
-- Gestione calcolo tacche per Travi
-- Tabella per definizione modulo
@@ -7,14 +7,13 @@ local ProcessBirdsMouth = {}
-- Include
require( 'EgtBase')
local BL = require( 'BeamLib')
local Tfs = require( 'TwoFacesBySaw')
local Fbs = require( 'FacesBySaw')
EgtOutLog( ' ProcessBirdsMouth started', 1)
-- Dati
local BD = require( 'BeamData')
local Millings = require( 'MillingData')
local Pocketings = require( 'PocketingData')
local ML = require( 'MachiningLib')
---------------------------------------------------------------------
-- Riconoscimento della feature
@@ -76,17 +75,6 @@ end
---------------------------------------------------------------------
-- Lavorazione con fresa
---------------------------------------------------------------------
local function FindMilling( sType)
for i = 1, #Millings do
local Milling = Millings[i]
if Milling.Type == sType then
return i, Milling.Name
end
end
return 0
end
---------------------------------------------------------------------
local function Make2FacesByMill( Proc, nPhase, nRawId, nPartId)
-- recupero l'ingombro del grezzo di appartenenza
@@ -135,7 +123,7 @@ local function Make2FacesByMill( Proc, nPhase, nRawId, nPartId)
end
local nOthInd = 1 - nFacInd
-- recupero la lavorazione
local nMill, sMilling = FindMilling( 'BirdsMouth')
local sMilling = ML.FindMilling( 'BirdsMouth')
if not sMilling then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library'
EgtOutLog( sErr)
@@ -174,17 +162,6 @@ local function Make2FacesByMill( Proc, nPhase, nRawId, nPartId)
return true
end
---------------------------------------------------------------------
local function FindPocketing( sType)
for i = 1, #Pocketings do
local Pocketing = Pocketings[i]
if Pocketing.Type == sType then
return i, Pocketing.Name
end
end
return 0
end
---------------------------------------------------------------------
local function MakeMoreFacesByMill( Proc, nPhase, nRawId, nPartId)
-- recupero l'ingombro del grezzo di appartenenza
@@ -207,7 +184,7 @@ local function MakeMoreFacesByMill( Proc, nPhase, nRawId, nPartId)
-- eventuali tagli preliminari
-- per ora non previsti
-- recupero la lavorazione
local nMill, sPocketing = FindPocketing( 'Mortise')
local sPocketing = ML.FindPocketing( 'Mortise')
if not sPocketing then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' pocketing not found in library'
EgtOutLog( sErr)
@@ -294,7 +271,7 @@ function ProcessBirdsMouth.Make( Proc, nPhase, nRawId, nPartId)
return MakeByMill( Proc, nPhase, nRawId, nPartId)
-- con lama
else
return Tfs.Make( Proc, nPhase, nRawId, nPartId, 'HeadSide')
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, 'HeadSide')
end
end