From 6f3a9fb172c8a8fbd531532df4f990159ef0dad0 Mon Sep 17 00:00:00 2001 From: Peter Nugent Date: Fri, 28 Jun 2024 09:53:32 +0100 Subject: [PATCH] Formatting and add comments --- Structure_Engine/Convert/PanelToFEMesh.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Structure_Engine/Convert/PanelToFEMesh.cs b/Structure_Engine/Convert/PanelToFEMesh.cs index 1592490635..86a476ddf0 100644 --- a/Structure_Engine/Convert/PanelToFEMesh.cs +++ b/Structure_Engine/Convert/PanelToFEMesh.cs @@ -61,6 +61,7 @@ public static FEMesh PanelToFEMesh(this Panel panel, double tolerance = Toleranc return null; } + // Get outline as single curve and check subparts are linear PolyCurve outline = panel.OutlineCurve().Curves.IJoin()[0]; if (outline.SubParts().Any(x => !x.IIsLinear())) { @@ -68,6 +69,7 @@ public static FEMesh PanelToFEMesh(this Panel panel, double tolerance = Toleranc return null; } + // Get discontinuity points and create Face based on number of points List points = outline.DiscontinuityPoints(); points = points.CullDuplicates(tolerance).ISortAlongCurve(outline); @@ -86,8 +88,8 @@ public static FEMesh PanelToFEMesh(this Panel panel, double tolerance = Toleranc return null; } + // Create FEMesh List faces = new List() { face }; - Mesh mesh = Geometry.Create.Mesh(points, faces); FEMesh feMesh = new FEMesh(); feMesh = Create.FEMesh(mesh, panel.Property, null, panel.Name); @@ -104,8 +106,4 @@ public static FEMesh PanelToFEMesh(this Panel panel, double tolerance = Toleranc /***************************************************/ } -} - - - - +} \ No newline at end of file