Ottimizzate le chiamate al calcolo elevazione. Si evita di calcolarla più volte inutilmente perchè calcolata inizialmente nel CollectFeatures.

This commit is contained in:
luca.mazzoleni
2023-11-29 16:07:18 +01:00
parent 593fdcfc24
commit 1664513c8f
12 changed files with 57 additions and 36 deletions
+7 -5
View File
@@ -305,11 +305,13 @@ local function CollectFeatures( PartId, b3Raw, dCurrOvmH, dCurrOvmT)
-- recupero l'elenco delle facce della parte interessate dalla feature
Proc.AffectedFaces = BL.GetProcessAffectedFaces( Proc)
-- recupero informazioni sulle facce della feature
Proc.Face = {}
for i = 1, Proc.Fct do
Proc.Face[i] = { Id = i - 1, VtN = EgtSurfTmFacetNormVersor( Proc.Id, i - 1, GDB_ID.ROOT )}
if Proc.Fct < 10 then
Proc.Face[i].Elevation = EgtSurfTmFacetElevationInBBox( Proc.Id, i - 1, b3Solid, GDB_ID.ROOT)
if not Proc.Face then
Proc.Face = {}
for i = 1, Proc.Fct do
Proc.Face[i] = { Id = i - 1, VtN = EgtSurfTmFacetNormVersor( Proc.Id, i - 1, GDB_ID.ROOT )}
if Proc.Fct < 10 then
Proc.Face[i].Elevation = EgtSurfTmFacetElevationInBBox( Proc.Id, i - 1, b3Solid, GDB_ID.ROOT)
end
end
end
end