Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/10.2.9' into task/GSAGH-482
Browse files Browse the repository at this point in the history
-Always-export-PolyLineDefinition-for-grid-area-loads-in-.NET-API
  • Loading branch information
tlmnrnhrdt committed May 6, 2024
2 parents 7e9bfde + 148ef66 commit 869aea4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions GsaGH/Components/6_Display/ResultDiagrams.cs
Expand Up @@ -264,14 +264,14 @@ public class ResultDiagrams : GH_OasysDropDownComponent {
GraphicDrawResult diagramResults = result.Model.Model.GetDiagrams(graphic);
ReadOnlyCollection<Line> linesFromModel = diagramResults.Lines;

Color color = Color.Empty;
da.GetData(4, ref color);

double lengthScaleFactor = UnitConverter.Convert(1, Length.BaseUnit, lengthUnit);
bool doubleArrow = false;
bool isDisplacement = false;
if (_selectedItems[0] == "Displacement") {
isDisplacement = true;
}

Color color = Color.Empty;
bool doubleArrow = false;
if (!da.GetData(4, ref color) && isDisplacement) {
if (IsTranslation()) {
color = Color.FromArgb(102, 220, 103);
} else {
Expand All @@ -280,6 +280,8 @@ public class ResultDiagrams : GH_OasysDropDownComponent {
}
}

double lengthScaleFactor = UnitConverter.Convert(1, Length.BaseUnit, lengthUnit);

foreach (Line item in linesFromModel) {
if (isDisplacement) {
var anchor = new Point3d(item.Start.X, item.Start.Y, item.Start.Z);
Expand Down
1 change: 1 addition & 0 deletions GsaGHTests/1_BaseParameters/2_Geometry/GsaMember2dTest.cs
Expand Up @@ -6,6 +6,7 @@
using Rhino.Geometry;
using Xunit;
using LengthUnit = OasysUnits.Units.LengthUnit;
using Polyline = Rhino.Geometry.Polyline;

namespace GsaGHTests.Parameters {
[Collection("GrasshopperFixture collection")]
Expand Down

0 comments on commit 869aea4

Please sign in to comment.