DataBeam :

- gestione completa Fessure Passanti
- completata gestione Profili.
This commit is contained in:
Dario Sassi
2020-02-28 19:23:51 +00:00
parent 8441f3ca61
commit e6630ca547
4 changed files with 1075 additions and 284 deletions
+13 -3
View File
@@ -331,6 +331,7 @@ function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId)
-- adiacenze e sottosquadra delle facce
local vAdj = {}
local vUcut = {}
local vOrtho = {}
for i = 1, nFacCnt do
-- recupero le adiacenze del loop esterno
local vFacAdj = EgtSurfTmFacetAdjacencies( nSurfId, i - 1)[1]
@@ -342,23 +343,32 @@ function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId)
end
end
vAdj[i] = nCount
-- ne determino eventuale sottosquadra (- 3deg)
-- ne determino eventuale sottosquadra (- 3deg) e ortogonalità
local bUcut = false
local bOrto = false
for j = 1, #vFacAdj do
if vFacAdj[j] >= 0 then
local vtN = vvtN[i]
local vtN2 = vvtN[vFacAdj[j]+1]
if vtN * vtN2 < -0.05 then
local dResV = vtN * vtN2
if dResV < -0.05 then
bUcut = true
elseif abs(dResV) < GEO.EPS_SMALL then
bOrtho = true
end
end
end
vUcut[i] = bUcut
vOrtho[i] = bOrtho
end
-- se 4 facce tutte con adiacenza 2, allora è un tunnel
if nFacCnt == 4 then
if vAdj[1] == 2 and vAdj[2] == 2 and vAdj[3] == 2 and vAdj[4] == 2 then
return -1, GEO.INFINITO
if vOrtho[1] == true and vOrtho[2] == true and vOrtho[3] == true and vOrtho[4] == true then
return -1, GEO.INFINITO, true
else
return -1, GEO.INFINITO
end
end
end
-- recupero le facce non in sottosquadra e con il maggior numero di adiacenze