Skip to content

Commit

Permalink
Merge branch 'task/GSAGH-149-node-springprop' of https://github.com/a…
Browse files Browse the repository at this point in the history
…rup-group/GSA-Grasshopper into task/GSAGH-149-node-springprop
  • Loading branch information
Kristjan Nielsen committed Dec 13, 2023
2 parents 3804ab6 + 84f3af0 commit 93be0ec
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions GsaGH/Components/1_Properties/GetSpringProperty.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using GH_IO.Serialization;
Expand Down Expand Up @@ -185,7 +184,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
protected override void SolveInstance(IGH_DataAccess da) {
GsaSpringPropertyGoo springPropertyGoo = null;
if (!da.GetData(0, ref springPropertyGoo)) {
this.AddRuntimeWarning("Input PB failed to collect data");
this.AddRuntimeWarning("Input PS failed to collect data");
return;
}
GsaSpringProperty springProperty = springPropertyGoo.Value;
Expand Down Expand Up @@ -251,9 +250,9 @@ protected override void SolveInstance(IGH_DataAccess da) {
break;

case FrictionSpringProperty friction:
da.SetData(2, new GH_UnitNumber(new ForcePerLength((double)friction.StiffnessX, ForcePerLengthUnit.NewtonPerMeter).ToUnit(_stiffnessUnit)));
da.SetData(4, new GH_UnitNumber(new ForcePerLength((double)friction.StiffnessY, ForcePerLengthUnit.NewtonPerMeter).ToUnit(_stiffnessUnit)));
da.SetData(6, new GH_UnitNumber(new ForcePerLength((double)friction.StiffnessZ, ForcePerLengthUnit.NewtonPerMeter).ToUnit(_stiffnessUnit)));
da.SetData(2, new GH_UnitNumber(new ForcePerLength((double)friction.StiffnessX, ForcePerLengthUnit.NewtonPerMeter).ToUnit(_stiffnessUnit)));
da.SetData(4, new GH_UnitNumber(new ForcePerLength((double)friction.StiffnessY, ForcePerLengthUnit.NewtonPerMeter).ToUnit(_stiffnessUnit)));
da.SetData(6, new GH_UnitNumber(new ForcePerLength((double)friction.StiffnessZ, ForcePerLengthUnit.NewtonPerMeter).ToUnit(_stiffnessUnit)));
da.SetData(16, friction.FrictionCoefficient);
break;

Expand Down

0 comments on commit 93be0ec

Please sign in to comment.