- aggiunta libreria WFeatureTopology per il riconoscimento topologico delle feature (da completare)
- spostate alcune funzioni da FreeContour a WallLib
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
-- WallLib.lua by Egaltech s.r.l. 2022/04/04
|
||||
-- Libreria globale per Pareti
|
||||
-- 2023/06/26 Spostata qui Is3EdgesApprox da FreeContour. Ora cerca autonomamente il gruppo se non viene passato.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WallLib = {}
|
||||
@@ -374,6 +375,31 @@ function WallLib.TestElleShape4( nIdGeom, nNumFacet)
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Funzione per determinare se la faccia ha lati molto corti (trascurabili) ed è quindi approssimabile ad una 3 facce
|
||||
function WallLib.Is3EdgesApprox( Proc, nFacet, nAddGrpId)
|
||||
nAddGrpId = nAddGrpId or WallLib.GetAddGroup( Proc.PartId)
|
||||
local bResult = false
|
||||
local nContourId = EgtExtractSurfTmFacetLoops( Proc.Id, nFacet, nAddGrpId)
|
||||
EgtMergeCurvesInCurveCompo( nContourId)
|
||||
-- recupero il numero effettivo di lati
|
||||
local _, nEntityCount = EgtCurveDomain( nContourId)
|
||||
local nEdges = nEntityCount
|
||||
if nContourId then
|
||||
if nEntityCount and nEntityCount == 3 then
|
||||
bResult = true
|
||||
-- rimuovo i lati molto corti dal conteggio totale
|
||||
elseif nEntityCount then
|
||||
for i = 1, nEntityCount do
|
||||
local dLength = EgtCurveCompoLength( nContourId, i - 1)
|
||||
if dLength < 15 then nEdges = nEdges - 1 end
|
||||
end
|
||||
end
|
||||
if nEdges == 3 then bResult = true end
|
||||
end
|
||||
return bResult
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- restituisce le facce del grezzo interessate dalla feature Proc
|
||||
function WallLib.GetProcessAffectedFaces( Proc, nPartId)
|
||||
|
||||
Reference in New Issue
Block a user