DataBeamWall :
- in ShowSolid migliorie per regolarizzazione superfici preventiva delle superfici.
This commit is contained in:
+14
-12
@@ -1,4 +1,4 @@
|
||||
-- ShowSolid.lua by Egaltech s.r.l. 2020/10/05
|
||||
-- ShowSolid.lua by Egaltech s.r.l. 2020/10/06
|
||||
-- Gestione calcolo solido di una Trave
|
||||
|
||||
require( 'EgtBase')
|
||||
@@ -19,14 +19,14 @@ end
|
||||
|
||||
-- Funzione per regolarizzare, se necessario, la superficie della feature
|
||||
local function RegularizeTriMesh( SurfId, DestGrpId, dStep)
|
||||
-- solo per superfici trimesh con poche facce (max4)
|
||||
---- solo per superfici trimesh con poche facce (max 100)
|
||||
local nFacetCnt = EgtSurfTmFacetCount( SurfId)
|
||||
if nFacetCnt > 4 then
|
||||
if nFacetCnt > 100 then
|
||||
return SurfId
|
||||
end
|
||||
-- box della superficie
|
||||
local b3Surf = EgtGetBBox( SurfId, GDB_BB.STANDARD)
|
||||
if not b3Surf or b3Surf:isEmpty() or b3Surf:getDimX() < 2 * dStep then
|
||||
if not b3Surf or b3Surf:isEmpty() or b3Surf:getDimX() < 4 * dStep then
|
||||
return SurfId
|
||||
end
|
||||
-- recupero le facce e le divido in X
|
||||
@@ -42,17 +42,19 @@ local function RegularizeTriMesh( SurfId, DestGrpId, dStep)
|
||||
for nI = 1, nStep do
|
||||
local dX1 = dX2
|
||||
dX2 = dX2 + dStep
|
||||
if b3Fac:getMin():getX() < dX2 and b3Fac:getMax():getX() > dX1 then
|
||||
if b3Fac:getMin():getX() < dX2 - GEO.EPS_SMALL and b3Fac:getMax():getX() > dX1 + GEO.EPS_SMALL then
|
||||
EgtCutSurfTmPlane( FacId, Point3d( dX1, 0, 0), -X_AX(), true)
|
||||
EgtCutSurfTmPlane( FacId, Point3d( dX2, 0, 0), X_AX(), false)
|
||||
local LoopId = EgtExtractSurfTmFacetLoops( FacId, 0, DestGrpId)
|
||||
EgtMergeCurvesInCurveCompo( LoopId, 0.001)
|
||||
local TmpSurfId = EgtSurfTmByFlatContour( DestGrpId, LoopId, 0.01)
|
||||
EgtErase( LoopId)
|
||||
if NewSurfId then
|
||||
NewSurfId = EgtSurfTmBySewing( DestGrpId, {NewSurfId, TmpSurfId})
|
||||
else
|
||||
NewSurfId = TmpSurfId
|
||||
if LoopId then
|
||||
EgtMergeCurvesInCurveCompo( LoopId, 0.001)
|
||||
local TmpSurfId = EgtSurfTmByFlatContour( DestGrpId, LoopId, 0.01)
|
||||
EgtErase( LoopId)
|
||||
if NewSurfId then
|
||||
NewSurfId = EgtSurfTmBySewing( DestGrpId, {NewSurfId, TmpSurfId})
|
||||
else
|
||||
NewSurfId = TmpSurfId
|
||||
end
|
||||
end
|
||||
EgtErase( FacId)
|
||||
FacId = EgtCopySurfTmFacet( SurfId, nF, DestGrpId)
|
||||
|
||||
Reference in New Issue
Block a user