Skip to content

Commit

Permalink
Formatting and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjamesnugent committed Jun 28, 2024
1 parent e78d3aa commit 6f3a9fb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Structure_Engine/Convert/PanelToFEMesh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ 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()))
{
Base.Compute.RecordError("Panel contains non-linear edges.");
return null;
}

// Get discontinuity points and create Face based on number of points
List<Point> points = outline.DiscontinuityPoints();
points = points.CullDuplicates(tolerance).ISortAlongCurve(outline);

Expand All @@ -86,8 +88,8 @@ public static FEMesh PanelToFEMesh(this Panel panel, double tolerance = Toleranc
return null;
}

// Create FEMesh
List<Face> faces = new List<Face>() { face };

Mesh mesh = Geometry.Create.Mesh(points, faces);
FEMesh feMesh = new FEMesh();
feMesh = Create.FEMesh(mesh, panel.Property, null, panel.Name);
Expand All @@ -104,8 +106,4 @@ public static FEMesh PanelToFEMesh(this Panel panel, double tolerance = Toleranc
/***************************************************/

}
}




}

0 comments on commit 6f3a9fb

Please sign in to comment.