DataBeam :

- migliorie e correzioni.
This commit is contained in:
Dario Sassi
2019-07-15 07:00:32 +00:00
parent 19df7d3338
commit d39116d84f
5 changed files with 164 additions and 82 deletions
+16 -11
View File
@@ -1,4 +1,4 @@
-- ProcessTenon.lua by Egaltech s.r.l. 2019/06/29
-- ProcessTenon.lua by Egaltech s.r.l. 2019/07/12
-- Gestione calcolo tenone a coda di rondine per Travi
-- Tabella per definizione modulo
@@ -106,17 +106,22 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- calcolo distanza massima della curva dal punto più lontano della base tenone Dt (facet 0)
local dMaxDist = 0
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( Proc.Id, 0, EgtGetParent( Proc.Id))
local dUmin, dUmax = EgtCurveDomain( nLoopId)
for dU = dUmin, dUmax do
local ptP = EgtUP( nLoopId, dU, GDB_ID.ROOT)
local ptNear = EgtNP( AuxId, ptP, GDB_ID.ROOT)
local dDist = dist( ptP, ptNear)
if dDist > dMaxDist then
dMaxDist = dDist
if nLoopId then
local dUmin, dUmax = EgtCurveDomain( nLoopId)
for dU = dUmin, dUmax do
local ptP = EgtUP( nLoopId, dU, GDB_ID.ROOT)
local ptNear = EgtNP( AuxId, ptP, GDB_ID.ROOT)
local dDist = dist( ptP, ptNear)
if dDist > dMaxDist then
dMaxDist = dDist
end
end
end
for i = 1, nLoopCnt do
EgtErase( nLoopId + i - 1)
for i = 1, nLoopCnt do
EgtErase( nLoopId + i - 1)
end
else
local b3DtAux = EgtGetBBoxRef( AuxId, GDB_BB.STANDARD, frDtTen)
dMaxDist = 2 * ( b3DtTen:getRadius() - b3DtAux:getRadius())
end
EgtOutLog( 'MaxDist=' .. EgtNumToString( dMaxDist, 3), 3)
-- Cicli di lavorazione (max 4)