Skip to content

Commit

Permalink
Switch to using outline instead of mesh for 2d member display
Browse files Browse the repository at this point in the history
  • Loading branch information
jenessaman committed Jan 21, 2022
1 parent 42e8af1 commit 026086e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ private GSAMember2D GsaMember2dToSpeckle(GsaMemb gsaMemb)
//-- App agnostic --
name = gsaMemb.Name,
//type = gsaMemb.Type.ToSpeckle2d(),
displayMesh = DisplayMeshPolygon(gsaMemb.NodeIndices, color),
//displayMesh = DisplayMeshPolygon(gsaMemb.NodeIndices, color),
orientationAngle = gsaMemb.Angle ?? 0,
offset = gsaMemb.Offset2dZ ?? 0,
parent = null, //no meaning for member, only for element
Expand All @@ -549,7 +549,11 @@ private GSAMember2D GsaMember2dToSpeckle(GsaMemb gsaMemb)
//-- App agnostic --
if (gsaMemb.NodeIndices.Count >= 3)
{
speckleMember2d.topology = gsaMemb.NodeIndices.Select(i => GetNodeFromIndex(i)).ToList();
var topology = gsaMemb.NodeIndices.Select(i => GetNodeFromIndex(i)).ToList();
speckleMember2d.topology = topology;
var coordinates = topology.SelectMany(x => x.basePoint.ToList()).ToList();
coordinates.AddRange(topology[0].basePoint.ToList());
speckleMember2d.outline = new Polyline(coordinates);
AddToMeaningfulNodeIndices(speckleMember2d.topology.Select(n => n.applicationId), GSALayer.Design);
}
else
Expand Down

0 comments on commit 026086e

Please sign in to comment.