DataBeam :

- in ProcessLapJoint corretto riconoscimento caso 4 facce che non sono L con estremità chiuse.
This commit is contained in:
Dario Sassi
2020-09-26 16:15:19 +00:00
parent 14d500e4ab
commit 52206183ed
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -415,7 +415,7 @@ function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId, bCompare3Fc, dCosSideAng)
-- recupero le normali delle facce
local vvtN = {}
for i = 1, nFacCnt do
local _, vtN = EgtSurfTmFacetCenter( nSurfId, i - 1, GDB_ID.ROOT)
local vtN = EgtSurfTmFacetNormVersor( nSurfId, i - 1, GDB_ID.ROOT)
vvtN[i] = vtN ;
end
-- adiacenze e sottosquadra delle facce
+10 -10
View File
@@ -129,8 +129,8 @@ local function TestElleShape4( Proc)
-- valida solo nel caso di quattro facce
if Proc.Fct ~= 4 then return false end
-- determino se L con due facce terminali o O
local bIsL = false
local dMinArea3 = GEO.INFINITO
local nFac3Adj = 0
local dMinArea3 = GEO.INFINITO * GEO.INFINITO
local dMaxArea2 = 0
for i = 1, 4 do
local vFacAdj = EgtSurfTmFacetAdjacencies( Proc.Id, i - 1)[1]
@@ -147,11 +147,11 @@ local function TestElleShape4( Proc)
dMaxArea2 = max( dMaxArea2, dArea)
elseif nCount == 3 then
dMinArea3 = min( dMinArea3, dArea)
bIsL = true
nFac3Adj = nFac3Adj + 1
end
end
if not bIsL then return false end
-- verifico se L profona oppure lunga
if nFac3Adj ~= 2 then return false end
-- verifico se L profonda oppure lunga
if dMinArea3 < dMaxArea2 then
return 1
else
@@ -491,7 +491,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
-- se più di 2 facce
else
local bClosedOrthoFaces
local nDeletedface
local nDeletedFace
-- recupero la faccia con il maggior numero di adiacenze e minor elevazione
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
local nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
@@ -513,8 +513,8 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
for i = 1, Proc.Fct do
local nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
-- elimino una faccia
nDeletedface = i-1
if EgtSurfTmRemoveFacet( nNewProc, nDeletedface) then
nDeletedFace = i - 1
if EgtSurfTmRemoveFacet( nNewProc, nDeletedFace) then
-- recupero la faccia con il maggior numero di adiacenze e l'elevazione relativa
nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( nNewProc, nPartId)
if not nFacInd or nFacInd < 0 then
@@ -535,7 +535,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
end
-- se riconosciuta fessura ricalcolo l'elevazione dalla faccia di fondo
if bClosedOrthoFaces then
nFacInd = nDeletedface
nFacInd = nDeletedFace
-- rendo nulla la faccia opzionale perchè si tratta di una fessura
nFacInd2 = nil
dElev = BL.GetFaceElevation( Proc.Id, nFacInd)
@@ -575,7 +575,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
if nFacInd2 and dElev2 < 2 * dElev then
local ptC2, vtN2 = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT)
bDown = ( vtN2:getZ() < BD.NZ_MINB)
elseif not nFacInd2 and bIsL and nFaceAdj > 0 then
elseif not nFacInd2 and bIsL and nFaceAdj >= 0 then
local ptC2, vtN2 = EgtSurfTmFacetCenter( Proc.Id, nFaceAdj, GDB_ID.ROOT)
bDown = ( vtN2:getZ() < BD.NZ_MINB)
end