- Prima versione file INI interfaccia selezione strategie Beam&Wall

- BeamLib : nuova funzione 'LoadCustomParametersInStrategy'
- Piccoli aggiustamenti vari
This commit is contained in:
andrea.villa
2024-05-08 15:32:51 +02:00
parent ecf89edf59
commit d45fc8e89b
9 changed files with 148 additions and 20 deletions
+13 -12
View File
@@ -111,7 +111,7 @@ function FaceData.GetFacesByAdjacencyNumber( Proc)
end
-------------------------------------------------------------------------------------------------------------
function FaceData.GetFacesInfo( Proc)
function FaceData.GetFacesInfo( Proc, Part)
EgtOutLog( '---Faces START---')
local Faces = {}
@@ -131,7 +131,7 @@ function FaceData.GetFacesInfo( Proc)
Faces[i].Id = i - 1
Faces[i].PtCenter, Faces[i].VtN = EgtSurfTmFacetCenter( Proc.Id, i - 1, GDB_ID.ROOT)
if Proc.Fct < 6 then
local frHV, dFaceWidth, dFaceHeight = BeamLib.GetFaceHvRefDim( Proc.Id, i - 1)
local frHV, dFaceWidth, dFaceHeight = BeamLib.GetFaceHvRefDim( Proc.Id, i - 1, Part)
-- frame OCS faccia
Faces[i].FrameHV = frHV
-- larghezza OCS faccia
@@ -216,19 +216,20 @@ local function GetBottomFace( Proc)
-- la faccia di fondo ha sempre Fct - 1 adiacenze. Se si trovano più facce di fondo si sceglie quella con minor elevazione
local FacesByAdjacencyNumber = FaceData.GetFacesByAdjacencyNumber( Proc)
local BottomFaces = FacesByAdjacencyNumber[ Proc.Fct - 1]
if #BottomFaces > 1 then
local dMinElevation = GEO.INFINITO
for i = 1, #BottomFaces do
if Proc.Faces[BottomFaces[i].Id + 1].Elevation < dMinElevation then
dMinElevation = Proc.Faces[BottomFaces[i].Id + 1].Elevation
BottomFace = Proc.Faces[BottomFaces[i].Id + 1]
if FacesByAdjacencyNumber then
local BottomFaces = FacesByAdjacencyNumber[ Proc.Fct - 1]
if #BottomFaces > 1 then
local dMinElevation = GEO.INFINITO
for i = 1, #BottomFaces do
if Proc.Faces[BottomFaces[i].Id + 1].Elevation < dMinElevation then
dMinElevation = Proc.Faces[BottomFaces[i].Id + 1].Elevation
BottomFace = Proc.Faces[BottomFaces[i].Id + 1]
end
end
else
BottomFace = BottomFaces[1]
end
else
BottomFace = BottomFaces[1]
end
return BottomFace
end