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
+10 -16
View File
@@ -11,18 +11,7 @@ EgtOutLog( ' ProcessMortise started', 1)
-- Dati
local BD = require( 'BeamData')
local Pocketings = require( 'PocketingData')
---------------------------------------------------------------------
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 ML = require( 'MachiningLib')
---------------------------------------------------------------------
-- Riconoscimento della feature
@@ -60,9 +49,14 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId)
-- se curva aperta la allungo e chiudo
if not EgtCurveIsClosed( AuxId) then
local EXTRA_LEN = 30
EgtExtendCurveStartByLen( AuxId, EXTRA_LEN)
EgtExtendCurveEndByLen( AuxId, EXTRA_LEN)
EgtCloseCurveCompo( AuxId)
local dGap = dist( EgtSP( AuxId), EgtEP( AuxId))
if dGap <= 2 * EXTRA_LEN then
EgtAddCurveCompoArcTg( AuxId, EgtSP( AuxId))
else
EgtExtendCurveStartByLen( AuxId, EXTRA_LEN)
EgtExtendCurveEndByLen( AuxId, EXTRA_LEN)
EgtCloseCurveCompo( AuxId)
end
end
-- recupero i dati della curva e del top
local dDepth = abs( EgtCurveThickness( AuxId))
@@ -76,7 +70,7 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId)
return false, sErr
end
-- recupero la lavorazione
local nPocket, 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)