Skip to content

Commit

Permalink
update spring function
Browse files Browse the repository at this point in the history
  • Loading branch information
StephennipBH authored and peterjamesnugent committed Sep 28, 2022
1 parent c9f4eaa commit 24a1fee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ public static Constraint6DOF ToConstraint6DOF(this string support, string versio
supportName = delimitted[21].Trim();
if (supportName == "")
{
Constraint6DOF name = Engine.Structure.Create.Constraint6DOF(supportName, fixity, stiffness);
supportName = BH.Engine.Structure.Query.Description(name);
supportName = "Fx="+delimitted[8]+"Fy="+delimitted[9]+"Fz="+delimitted[10]+"Rx="+delimitted[11]+"Ry="+delimitted[12]+"Rz="+delimitted[13];
}


Expand Down Expand Up @@ -149,12 +148,9 @@ public static Constraint6DOF ToConstraint6DOF(this string support, string versio
}
supportName = delimitted[15].Trim();
if (supportName == "")

{
Constraint6DOF name = Engine.Structure.Create.Constraint6DOF(supportName, fixity, stiffness);
supportName = BH.Engine.Structure.Query.Description(name);
supportName = "Fx=" + delimitted[2] + "Fy=" + delimitted[3] + "Fz=" + delimitted[4] + "Rx=" + delimitted[5] + "Ry=" + delimitted[6] + "Rz=" + delimitted[7];
}

break;
}

Expand Down
15 changes: 12 additions & 3 deletions MidasCivil_Adapter/PrivateHelpers/GetPropertyAssignments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,23 @@ private Dictionary<string, List<int>> GetPropertyAssignments(string section, str
case "8.9.0":
case "8.8.5":
if (splitSection[21]=="")
propertyAssignments.Add(splitSection[0], propertyAssignment);
{
string name = "Fx="+splitSection[8]+"Fy="+splitSection[9]+"Fz="+splitSection[10]+"Rx="+splitSection[11]+
"Ry="+splitSection[12]+"Rz="+splitSection[13];
propertyAssignments.Add(name, propertyAssignment);
}

else
propertyAssignments.Add(splitSection[21], propertyAssignment);

break;
default:
if (splitSection[21] == "")
propertyAssignments.Add(splitSection[0], propertyAssignment);
if (splitSection[15] == "")
{
string name = "Fx=" + splitSection[2] + "Fy=" + splitSection[3] + "Fz=" + splitSection[4] + "Rx=" + splitSection[5] +
"Ry=" + splitSection[6] + "Rz=" + splitSection[7];
propertyAssignments.Add(name, propertyAssignment);
}
else
propertyAssignments.Add(splitSection[15], propertyAssignment);
break;
Expand Down

0 comments on commit 24a1fee

Please sign in to comment.