DatBeam :

- migliorie a Tenon e DtTenon.
This commit is contained in:
Dario Sassi
2019-07-16 13:38:19 +00:00
parent 22fdec88f7
commit 8f475ad061
2 changed files with 20 additions and 18 deletions
+16 -14
View File
@@ -1,4 +1,4 @@
-- ProcessTenon.lua by Egaltech s.r.l. 2019/07/12
-- ProcessTenon.lua by Egaltech s.r.l. 2019/07/16
-- Gestione calcolo tenone a coda di rondine per Travi
-- Tabella per definizione modulo
@@ -24,14 +24,13 @@ end
---------------------------------------------------------------------
-- Classificazione della feature
function ProcessDtTenon.Classify( Proc)
-- recupero i dati della faccia top
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
-- verifico sia una superficie
if not vtN then
return false
end
-- recupero i dati della curva di contorno della faccia top
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if not AuxId then return false end
AuxId = AuxId + Proc.Id
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
-- verifico se il tenone è lavorabile solo da sotto
local bDown = ( vtN:getZ() < - 0.26)
local bDown = ( vtExtr:getZ() < - 0.26)
return true, bDown
end
@@ -48,21 +47,24 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtOutLog( sErr)
return false, sErr
end
-- recupero i dati della curva e del top
-- recupero i dati della curva
local dDepth = abs( EgtCurveThickness( AuxId))
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
EgtOutLog( 'ptC=' .. tostring( ptC) ..' vtN=' .. tostring( vtN), 3)
-- verifico che il tenone non sia orientato verso il basso (-5 deg)
if vtN:getZ() < - 0.26 then
local ptBC = EgtGP( AuxId, GDB_RT.GLOB)
-- verifico che il tenone non sia orientato verso il basso (-15 deg)
if vtExtr:getZ() < - 0.26 then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' DtTenon from bottom impossible'
EgtOutLog( sErr)
return false, sErr
end
-- determino altezza del tenone
local frDtTen = Frame3d( ptC, vtN)
local frDtTen = Frame3d( ptBC, vtExtr)
local b3DtTen = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, frDtTen)
local dDtTenH = b3DtTen:getDimZ()
-- assegno centro e normale della faccia top
local vtN = vtExtr
local ptC = ptBC + vtN * dDtTenH
EgtOutLog( 'ptC=' .. tostring( ptC) ..' vtN=' .. tostring( vtN), 3)
-- porto inizio curva a Zmax
BL.PutStartOnTop( AuxId)
-- se tenone inclinato o non esattamente alle estremità, necessario taglio di lama sulla testa
+4 -4
View File
@@ -1,4 +1,4 @@
-- ProcessTenon.lua by Egaltech s.r.l. 2019/07/08
-- ProcessTenon.lua by Egaltech s.r.l. 2019/07/16
-- Gestione calcolo tenone per Travi
-- Tabella per definizione modulo
@@ -31,7 +31,7 @@ function ProcessTenon.Classify( Proc)
AuxId = AuxId + Proc.Id
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
-- verifico se il tenone è lavorabile solo da sotto
local bDown = ( vtExtr:getZ() < - 0.1)
local bDown = ( vtExtr:getZ() < - 0.26)
return true, bDown
end
@@ -60,8 +60,8 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
local ptBC = EgtGP( AuxId, GDB_RT.GLOB)
local bClosed = EgtCurveIsClosed( AuxId)
-- verifico che il tenone non sia orientato verso il basso (-5 deg)
if vtExtr:getZ() < - 0.1 then
-- verifico che il tenone non sia orientato verso il basso (-15 deg)
if vtExtr:getZ() < - 0.26 then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' Tenon from bottom impossible'
EgtOutLog( sErr)
return false, sErr