Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #28 from speckleworks/dev
Browse files Browse the repository at this point in the history
Added support for receiving 1D polylines into the design layer and fixed some minor bugs.
  • Loading branch information
nic-burgers-arup authored Sep 4, 2020
2 parents bbac0a0 + 2bee5c2 commit 05a9e69
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,17 @@ public void ParseGWACommand(List<GSANode> nodes)
obj.Name = pieces[counter++].Trim(new char[] { '"' });
counter++; // Colour
counter++; // Type
obj.PropertyRef = Helper.GetApplicationId(typeof(GSA1DProperty).GetGSAKeyword(), Convert.ToInt32(pieces[counter++]));
var propRef = pieces[counter++];
//Sometimes the property ref argument seems to have a relative length span attached to it:
//e.g. 1[0.245882:0.491765] where 1 is the actual property reference
var propRefNumerical = "";
var index = 0;
while (char.IsDigit(propRef[index]))
{
propRefNumerical += propRef[index++];
}

obj.PropertyRef = Helper.GetApplicationId(typeof(GSA1DProperty).GetGSAKeyword(), Convert.ToInt32(propRefNumerical));
counter++; // Group

obj.Value = new List<double>();
Expand Down Expand Up @@ -546,6 +556,7 @@ public string SetGWACommand(int group = 0)
}
else
{
ls.Add("YES");
ls.Add("MAN");
ls.Add("MAN");
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace SpeckleStructuralGSA
{
//TO DO: check why everything except GSA1DElement is needed as read prerequisites
[GSAObject("MEMB.8", new string[] { }, "elements", true, false, new Type[] { typeof(GSA1DElement), typeof(GSA1DLoadAnalysisLayer), typeof(GSA1DElementResult), typeof(GSAAssembly), typeof(GSAConstructionStage), typeof(GSA1DInfluenceEffect) }, new Type[] { typeof(GSA1DElement) })]
[GSAObject("MEMB.8", new string[] { }, "elements", true, true, new Type[] { typeof(GSA1DElement), typeof(GSA1DLoadAnalysisLayer), typeof(GSA1DElementResult), typeof(GSAAssembly), typeof(GSAConstructionStage), typeof(GSA1DInfluenceEffect) }, new Type[] { typeof(GSA1DElement) })]
public class GSA1DElementPolyline : IGSASpeckleContainer
{
public int GSAId { get; set; }
Expand Down

0 comments on commit 05a9e69

Please sign in to comment.