DataBeam :
- aggiunti anti scheggia di Filippo prima versione.
This commit is contained in:
+26
-3
@@ -1,4 +1,4 @@
|
||||
-- BeamLib.lua by Egaltech s.r.l. 2021/07/08
|
||||
-- BeamLib.lua by Egaltech s.r.l. 2021/07/15
|
||||
-- Libreria globale per Travi
|
||||
-- 2020/07/28 Corretto calcolo attacchi e uscite di lame per non uscire dalla faccia sotto.
|
||||
-- 2020/08/18 Aggiunto a GetNearestParalOpposite e GetNearestOrthoOpposite parametro opzionale vtNorm.
|
||||
@@ -13,6 +13,7 @@
|
||||
-- 2021/06/27 Aggiunta funzione GetOtherFaceElevation.
|
||||
-- 2021/07/01 In GetNearestOrthoOpposite premio direzioni destra/sinistra.
|
||||
-- 2021/07/08 Modifiche in MakeOneFaceBySaw per gestione taglio con due segmenti.
|
||||
-- 2021/07/15 Aggiunta GetFaceElevationFromPointDir.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local BeamLib = {}
|
||||
@@ -426,7 +427,7 @@ function BeamLib.GetFaceElevation( nSurfId, nFac, nPartId)
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( nSurfId, nFac, GDB_ID.ROOT)
|
||||
if not ptC or not vtN then return 0 end
|
||||
-- riferimento OCS della faccia per ricavare elevazione rispetto alla faccia della superficie
|
||||
local frOCS = Frame3d( ptC, vtN) ;
|
||||
local frOCS = Frame3d( ptC, vtN)
|
||||
local b3Box = EgtGetBBoxRef( nSurfId, GDB_BB.STANDARD, frOCS)
|
||||
local dElev = b3Box:getMax():getZ()
|
||||
-- se definito identificativo di pezzo
|
||||
@@ -457,7 +458,7 @@ function BeamLib.GetOtherFaceElevation( nSurfId, nOtherSurfId, nOtherFac, nPartI
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( nOtherSurfId, nOtherFac, GDB_ID.ROOT)
|
||||
if not ptC or not vtN then return 0 end
|
||||
-- riferimento OCS della faccia per ricavare elevazione rispetto alla faccia della superficie
|
||||
local frOCS = Frame3d( ptC, vtN) ;
|
||||
local frOCS = Frame3d( ptC, vtN)
|
||||
local b3Box = EgtGetBBoxRef( nSurfId, GDB_BB.STANDARD, frOCS)
|
||||
local dElev = b3Box:getMax():getZ()
|
||||
-- se definito identificativo di pezzo
|
||||
@@ -471,6 +472,28 @@ function BeamLib.GetOtherFaceElevation( nSurfId, nOtherSurfId, nOtherFac, nPartI
|
||||
return dElev
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function BeamLib.GetFaceElevationFromPointDir( nSurfId, nPartId, ptC, vtN, nIdGeomMaster)
|
||||
if not ptC or not vtN then return 0 end
|
||||
-- riferimento OCS della faccia per ricavare elevazione rispetto alla faccia della superficie
|
||||
local frOCS = Frame3d( ptC, vtN)
|
||||
local b3Box = EgtGetBBoxRef( nSurfId, GDB_BB.STANDARD, frOCS)
|
||||
local dElev = b3Box:getMax():getZ()
|
||||
-- se definito identificativo di pezzo
|
||||
if nPartId then
|
||||
-- se superficie con più facce
|
||||
if EgtSurfTmFacetCount( nSurfId) > 1 then
|
||||
_, dElev = BeamLib.GetPointDirDepth( nPartId, ptC, vtN)
|
||||
else
|
||||
local b3Solid = EgtGetBBoxRef( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD, frOCS)
|
||||
if b3Solid and b3Solid:getMax():getZ() > dElev then
|
||||
dElev = b3Solid:getMax():getZ()
|
||||
end
|
||||
end
|
||||
end
|
||||
return dElev
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId, bCompare3Fc, dCosSideAng)
|
||||
-- recupero il numero di facce
|
||||
|
||||
Reference in New Issue
Block a user