DataBeam :

- correzioni per tagli testa e coda su FAST
- aggiunto controllo affondamento in mortase e tenoni a coda di rondine.
This commit is contained in:
Dario Sassi
2021-04-09 07:11:30 +00:00
parent e57d905b8b
commit d778f07e55
4 changed files with 28 additions and 15 deletions
+14 -9
View File
@@ -1,5 +1,6 @@
-- ProcessDtMortise.lua by Egaltech s.r.l. 2021/01/28
-- ProcessDtMortise.lua by Egaltech s.r.l. 2021/04/08
-- Gestione calcolo mortase a coda di rondine per Travi
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
-- Tabella per definizione modulo
local ProcessDtMortise = {}
@@ -125,9 +126,9 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
end
-- recupero i dati della curva e del top
local dDepth = abs( EgtCurveThickness( AuxId))
-- recupero i dati della curva
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
local ptBC = EgtGP( AuxId, GDB_RT.GLOB)
-- verifico che la mortasa non sia orientata verso il basso (-5 deg) o che ci sia una testa da sotto
local bFaceDown = ( vtExtr:getZ() < - 0.1)
if bFaceDown and not BD.DOWN_HEAD then
@@ -135,6 +136,10 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
end
-- determino l'altezza della mortasa (0=faccia di fondo)
local rfDtMrt = Frame3d( ptBC, vtExtr)
local b3DtMrt = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfDtMrt)
local dAltMort = b3DtMrt:getDimZ()
-- verifico se di tipo pocket
local bPocket = ( EgtGetInfo( Proc.Id, 'P05', 'i') == 1)
if bPocket then bMakeAntiSplitPath = false end
@@ -201,6 +206,12 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
bCW = ( dSpeed >= 0)
end
end
-- verifico che la profondità non superi il massimo materiale dell'utensile
if dAltMort > dMaxMat + 10 * GEO.EPS_SMALL then
local sErr = 'Error : DtMortise Depth bigger than Tool Cutting edge'
EgtOutLog( sErr)
return false, sErr
end
-- se con tasca, la lavoro
if bPocket then
-- recupero il contorno della tasca (seconda curva ausiliaria)
@@ -251,12 +262,6 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
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
local rfFac0 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0, GDB_ID.ROOT)
-- ottengo il box con la normale della faccia 0
local bBoxF0 = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfFac0)
-- recupero l'altezza della mortasa
local dAltMort = bBoxF0:getDimZ()
-- recupero gruppo per geometria addizionale
local nAddGrpId = BL.GetAddGroup( nPartId)
if not nAddGrpId then