Skip to content

Commit

Permalink
GSAGH-441-Expand-beam-elements-to-shell-Component (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlmnrnhrdt authored Dec 13, 2023
2 parents 1296559 + 95e2208 commit 2fd8cf4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Binary file modified ExampleFiles/Parameters/2_Geometry/ExpandBeamToShell.gh
Binary file not shown.
13 changes: 12 additions & 1 deletion GsaGH/Components/2_Geometry/ExpandBeamToShell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -807,14 +807,25 @@ protected override void SolveInstance(IGH_DataAccess da) {
-flangeThk / 2, -width / 2);
mem2ds.Add(CreateMember2d(flange, flangeThk, section));
} else if (profile.StartsWith("CAT")) {
string cat = " " + profile.Split(' ')[1] + " ";
string prof = profile.Split(' ')[2];

if(!cat.Contains("UC ")) {
foreach (string value in new List<string>() { "UPE", "PFC", "UPN", "-U ", "-CH", "C ", " MC ", " WT ", " MT ", " ST ", "-EA", "-UA", "-RHS", "-SHS", "-FLATS", "-ROUNDS", "-SQUARES", " ISJC", "T ", "-CPF", "-IA", "-L", "-2L", "UE-AM", "C-AM", "EA-AM"}) {
if (cat.Contains(value)) {
this.AddRuntimeError("Unable to expand none-I Catalogue profile");
return;
}
}
}

List<double> sqlValues = SqlReader.Instance.GetCatalogueProfileValues(prof,
Path.Combine(AddReferencePriority.InstallPath, "sectlib.db3"));
unit = LengthUnit.Meter;
sqlValues.ForEach(x => new Length(x, unit).As(_lengthUnit));

if (sqlValues.Count == 2) {
this.AddRuntimeError("Unable to expand none-I Cat profile");
this.AddRuntimeError("Unable to expand none-I Catalogue profile");
return;
} else {
double height = sqlValues[0];
Expand Down

0 comments on commit 2fd8cf4

Please sign in to comment.