DataBeam :

- revisione generale e migliorie nei tagli.
This commit is contained in:
Dario Sassi
2020-04-21 10:34:04 +00:00
parent 38ea43e187
commit 2c5529b87b
16 changed files with 97 additions and 114 deletions
+12 -12
View File
@@ -1,4 +1,4 @@
-- ProcessDtMortise.lua by Egaltech s.r.l. 2020/04/11
-- ProcessDtMortise.lua by Egaltech s.r.l. 2020/04/20
-- Gestione calcolo mortase a coda di rondice per Travi
-- Tabella per definizione modulo
@@ -123,10 +123,21 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId)
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
dToolDiam = max( dToolDiam, 10)
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng
end
end
-- verifico se raggio troppo piccolo per l'utensile
local nSt, nEnd = EgtCurveDomain( AuxId)
for i = nSt, nEnd - 1 do
local dRad = EgtCurveCompoRadius( AuxId, i)
if dRad > 0 and dRad < dToolDiam / 2 then
local sErr = 'Radius too small : Error on DtMortise ' .. tostring( Proc.Id)
EgtOutLog( sErr)
return false, sErr
end
end
-- se parametro interno abilitato e il percorso non è chiuso, aggiungo percorso e lavorazione antischeggia
if bMakeAntiSplitPath and not EgtCurveIsClosed( AuxId) then
-- recupero il riferimento della faccia di fondo
@@ -222,17 +233,6 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId)
return false, sErr
end
end
dToolDiam = max( dToolDiam, 10)
-- verifico se raggio troppo piccolo per l'utensile
local nSt, nEnd = EgtCurveDomain( AuxId)
for i = nSt, nEnd - 1 do
local dRad = EgtCurveCompoRadius( AuxId, i)
if dRad > 0 and dRad < dToolDiam / 2 then
local sErr = 'Radius too small : Error on DtMortise ' .. tostring( Proc.Id)
EgtOutLog( sErr)
return false, sErr
end
end
-- verifico se necessarie più passate (distanza all'imbocco ortogonale all'asse)
local vtDiff = EgtEP( AuxId, GDB_RT.GLOB) - EgtSP( AuxId, GDB_RT.GLOB)
local vtAx = EgtEV( AuxId, GDB_RT.GLOB) - EgtSV( AuxId, GDB_RT.GLOB)