Skip to content

Commit 701fa4d

Browse files
authored
Merge pull request #137 from arup-group/task/COMPSGH-188-Update-OasysGH-version
COMPSGH-188-Update-OasysGH-version
2 parents 0b0a52e + bd40aca commit 701fa4d

File tree

112 files changed

+688
-215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+688
-215
lines changed

Compos/ComposAPI.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>net48</TargetFramework>
4-
<Version>0.9.13-beta</Version>
4+
<Version>0.9.14-beta</Version>
55
<Title>ComposAPI</Title>
66
<Description>Description</Description>
77
<PlatformTarget>x64</PlatformTarget>

ComposGH/Components/0_File/OpenComposFile.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
110110
pManager.AddGenericParameter(MemberGoo.Name + "(s)", MemberGoo.NickName, MemberGoo.Description + "s contained in the file.", GH_ParamAccess.list);
111111
}
112112

113-
protected override void SolveInstance(IGH_DataAccess DA) {
113+
protected override void SolveInternal(IGH_DataAccess DA) {
114114
var gh_typ = new GH_ObjectWrapper();
115115
if (DA.GetData(0, ref gh_typ)) {
116116
if (gh_typ.Value is GH_String) {

ComposGH/Components/0_File/SaveComposFile.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
143143
pManager.AddGenericParameter(MemberGoo.Name, MemberGoo.NickName, "Saved " + MemberGoo.Description, GH_ParamAccess.list);
144144
}
145145

146-
protected override void SolveInstance(IGH_DataAccess DA) {
146+
protected override void SolveInternal(IGH_DataAccess DA) {
147147
var list = new List<GH_ObjectWrapper>();
148148
if (DA.GetDataList(0, list)) {
149149
if (list == null || list.Count < 1) { return; }

ComposGH/Components/1_Beam/1_Primary/CreateBeam.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
7171
pManager.AddParameter(new ComposBeamParameter());
7272
}
7373

74-
protected override void SolveInstance(IGH_DataAccess DA) {
74+
protected override void SolveInternal(IGH_DataAccess DA) {
7575
var ghln = new GH_Line();
7676
if (DA.GetData(0, ref ghln)) {
7777
if (ghln == null) { AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, "Line input is null"); }
@@ -87,9 +87,9 @@ protected override void SolveInstance(IGH_DataAccess DA) {
8787
try {
8888
if (Params.Input[4].Sources.Count > 0) {
8989
List<WebOpeningGoo> webOpenings = Input.GenericGooList<WebOpeningGoo>(this, DA, 4);
90-
Output.SetItem(this, DA, 0, new BeamGoo(new LineCurve(ln), LengthUnit, res.Value, mat.Value, beamSections.Select(x => x.Value as IBeamSection).ToList(), webOpenings.Select(x => x.Value as IWebOpening).ToList()));
90+
DA.SetData(0, new BeamGoo(new LineCurve(ln), LengthUnit, res.Value, mat.Value, beamSections.Select(x => x.Value as IBeamSection).ToList(), webOpenings.Select(x => x.Value as IWebOpening).ToList()));
9191
} else {
92-
Output.SetItem(this, DA, 0, new BeamGoo(new LineCurve(ln), LengthUnit, res.Value, mat.Value, beamSections.Select(x => x.Value as IBeamSection).ToList()));
92+
DA.SetData(0, new BeamGoo(new LineCurve(ln), LengthUnit, res.Value, mat.Value, beamSections.Select(x => x.Value as IBeamSection).ToList()));
9393
}
9494
} catch (Exception e) {
9595
AddRuntimeMessage(GH_RuntimeMessageLevel.Error, e.Message);

ComposGH/Components/1_Beam/2_Secondary/CreateSupport.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
9393
pManager.AddParameter(new SupportsParam());
9494
}
9595

96-
protected override void SolveInstance(IGH_DataAccess DA) {
96+
protected override void SolveInternal(IGH_DataAccess DA) {
9797
// override intermediate support?
9898
if (Params.Input[3].Sources.Count > 0) {
9999
string restraintType = "";
@@ -130,10 +130,10 @@ protected override void SolveInstance(IGH_DataAccess DA) {
130130
List<IQuantity> restrs = Input.LengthsOrRatios(this, DA, 2, LengthUnit);
131131
_selectedItems[0] = "Custom";
132132
var sup = new Supports(restrs, smir, ffre);
133-
Output.SetItem(this, DA, 0, new SupportsGoo(sup));
133+
DA.SetData(0, new SupportsGoo(sup));
134134
} else {
135135
var sup = new Supports(RestraintType, smir, ffre);
136-
Output.SetItem(this, DA, 0, new SupportsGoo(sup));
136+
DA.SetData(0, new SupportsGoo(sup));
137137
}
138138
}
139139

ComposGH/Components/1_Beam/3_Tertiary/CreateCustomSteelMaterial.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
110110
pManager.AddParameter(new SteelMaterialParam(), "Custom " + SteelMaterialGoo.Name, SteelMaterialGoo.NickName, "Custom " + SteelMaterialGoo.Description + " for a " + BeamGoo.Description, GH_ParamAccess.item);
111111
}
112112

113-
protected override void SolveInstance(IGH_DataAccess DA) {
113+
protected override void SolveInternal(IGH_DataAccess DA) {
114114
// override steel grade?
115115
if (Params.Input[4].Sources.Count > 0) {
116116
string grade = "";
@@ -143,7 +143,7 @@ protected override void SolveInstance(IGH_DataAccess DA) {
143143
}
144144
}
145145

146-
Output.SetItem(this, DA, 0, new SteelMaterialGoo(new SteelMaterial(
146+
DA.SetData(0, new SteelMaterialGoo(new SteelMaterial(
147147
(Pressure)Input.UnitNumber(this, DA, 0, StressUnit),
148148
(Pressure)Input.UnitNumber(this, DA, 1, StressUnit),
149149
(Density)Input.UnitNumber(this, DA, 2, DensityUnit),

ComposGH/Components/1_Beam/3_Tertiary/CreateStandardASNZSteelMaterial.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
6868
pManager.AddParameter(new SteelMaterialParam(), "Standard " + SteelMaterialGoo.Name, SteelMaterialGoo.NickName, "Standard ASNZ " + SteelMaterialGoo.Description + " for a " + BeamGoo.Description, GH_ParamAccess.item);
6969
}
7070

71-
protected override void SolveInstance(IGH_DataAccess DA) {
71+
protected override void SolveInternal(IGH_DataAccess DA) {
7272
// override steel grade?
7373
if (Params.Input[0].Sources.Count > 0) {
7474
string grade = "";
@@ -94,7 +94,7 @@ protected override void SolveInstance(IGH_DataAccess DA) {
9494
Override_dropDownItems[0] = false;
9595
}
9696

97-
Output.SetItem(this, DA, 0, new SteelMaterialGoo(new ASNZSteelMaterial(SteelGrade)));
97+
DA.SetData(0, new SteelMaterialGoo(new ASNZSteelMaterial(SteelGrade)));
9898
}
9999

100100
protected override void UpdateUIFromSelectedItems() {

ComposGH/Components/1_Beam/3_Tertiary/CreateStandardENSteelMaterial.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
6767
pManager.AddParameter(new SteelMaterialParam(), "Standard " + SteelMaterialGoo.Name, SteelMaterialGoo.NickName, "Standard EN1993-1-1 " + SteelMaterialGoo.Description + " for a " + BeamGoo.Description, GH_ParamAccess.item);
6868
}
6969

70-
protected override void SolveInstance(IGH_DataAccess DA) {
70+
protected override void SolveInternal(IGH_DataAccess DA) {
7171
// override steel grade?
7272
if (Params.Input[0].Sources.Count > 0) {
7373
string grade = "";
@@ -100,7 +100,7 @@ protected override void SolveInstance(IGH_DataAccess DA) {
100100
Override_dropDownItems[0] = false;
101101
}
102102

103-
Output.SetItem(this, DA, 0, new SteelMaterialGoo(new SteelMaterial(SteelGrade, Code.EN1994_1_1_2004)));
103+
DA.SetData(0, new SteelMaterialGoo(new SteelMaterial(SteelGrade, Code.EN1994_1_1_2004)));
104104
}
105105

106106
protected override void UpdateUIFromSelectedItems() {

ComposGH/Components/1_Beam/3_Tertiary/CreateStandardSteelMaterial.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
6666
pManager.AddParameter(new SteelMaterialParam(), "Standard " + SteelMaterialGoo.Name, SteelMaterialGoo.NickName, "Standard " + SteelMaterialGoo.Description + " for a " + BeamGoo.Description, GH_ParamAccess.item);
6767
}
6868

69-
protected override void SolveInstance(IGH_DataAccess DA) {
69+
protected override void SolveInternal(IGH_DataAccess DA) {
7070
// override steel grade?
7171
if (Params.Input[0].Sources.Count > 0) {
7272
string grade = "";
@@ -95,7 +95,7 @@ protected override void SolveInstance(IGH_DataAccess DA) {
9595
Override_dropDownItems[0] = false;
9696
}
9797

98-
Output.SetItem(this, DA, 0, new SteelMaterialGoo(new SteelMaterial(SteelGrade, Code.BS5950_3_1_1990_A1_2010))); //any code other than EN or ASNZ will do...
98+
DA.SetData(0, new SteelMaterialGoo(new SteelMaterial(SteelGrade, Code.BS5950_3_1_1990_A1_2010))); //any code other than EN or ASNZ will do...
9999
}
100100

101101
protected override void UpdateUIFromSelectedItems() {

ComposGH/Components/1_Beam/4_Quarternary/BeamSectionProperties.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
8181
pManager.AddBooleanParameter("Catalogue", "Cat", "True if profile is Catalogue", GH_ParamAccess.item);
8282
}
8383

84-
protected override void SolveInstance(IGH_DataAccess DA) {
84+
protected override void SolveInternal(IGH_DataAccess DA) {
8585
var profile = new BeamSection(CustomInput.BeamSection(this, DA, 0, false));
8686

8787
int i = 0;

ComposGH/Components/1_Beam/4_Quarternary/CreateBeamSection.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
6969
pManager.AddParameter(new BeamSectionParam());
7070
}
7171

72-
protected override void SolveInstance(IGH_DataAccess DA) {
72+
protected override void SolveInternal(IGH_DataAccess DA) {
7373
string profile = Helpers.CustomInput.BeamSection(this, DA, 0, false);
7474
profile = profile.Trim();
7575

@@ -89,7 +89,7 @@ protected override void SolveInstance(IGH_DataAccess DA) {
8989
StartPosition = start,
9090
TaperedToNext = taper
9191
};
92-
Output.SetItem(this, DA, 0, new BeamSectionGoo(beamSection));
92+
DA.SetData(0, new BeamSectionGoo(beamSection));
9393
}
9494

9595
protected override void UpdateUIFromSelectedItems() {

ComposGH/Components/1_Beam/4_Quarternary/CreateProfile.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
10121012
pManager.AddParameter(new BeamSectionParam());
10131013
}
10141014

1015-
protected override void SolveInstance(IGH_DataAccess DA) {
1015+
protected override void SolveInternal(IGH_DataAccess DA) {
10161016
ClearRuntimeMessages();
10171017
for (int i = 0; i < Params.Input.Count; i++) {
10181018
Params.Input[i].ClearRuntimeMessages();
@@ -1041,7 +1041,7 @@ protected override void SolveInstance(IGH_DataAccess DA) {
10411041
ExpireSolution(true);
10421042
}
10431043

1044-
Output.SetItem(this, DA, 0, new BeamSectionGoo(new BeamSection("CAT " + ProfileString)));
1044+
DA.SetData(0, new BeamSectionGoo(new BeamSection("CAT " + ProfileString)));
10451045

10461046
return;
10471047
}
@@ -1090,7 +1090,7 @@ protected override void SolveInstance(IGH_DataAccess DA) {
10901090
return;
10911091
}
10921092

1093-
Output.SetItem(this, DA, 0, new BeamSectionGoo(new BeamSection(profile)));
1093+
DA.SetData(0, new BeamSectionGoo(new BeamSection(profile)));
10941094
}
10951095
#endregion
10961096
}

ComposGH/Components/1_Beam/5_Quinary/CreateNotch.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
9494
pManager.AddParameter(new ComposWebOpeningParameter(), WebOpeningGoo.Name, WebOpeningGoo.NickName, "Notch " + WebOpeningGoo.Description + " for a " + BeamGoo.Description, GH_ParamAccess.list);
9595
}
9696

97-
protected override void SolveInstance(IGH_DataAccess DA) {
97+
protected override void SolveInternal(IGH_DataAccess DA) {
9898
var width = (Length)Input.UnitNumber(this, DA, 0, LengthUnit);
9999
var height = (Length)Input.UnitNumber(this, DA, 1, LengthUnit);
100100
var stiff = (WebOpeningStiffenersGoo)Input.GenericGoo<WebOpeningStiffenersGoo>(this, DA, 2);
@@ -106,19 +106,19 @@ protected override void SolveInstance(IGH_DataAccess DA) {
106106

107107
switch (OpeningType) {
108108
case NotchTypes.Start:
109-
Output.SetItem(this, DA, 0, new WebOpeningGoo(new WebOpening(width, height, NotchPosition.Start, stiff?.Value)));
109+
DA.SetData(0, new WebOpeningGoo(new WebOpening(width, height, NotchPosition.Start, stiff?.Value)));
110110
break;
111111

112112
case NotchTypes.End:
113-
Output.SetItem(this, DA, 0, new WebOpeningGoo(new WebOpening(width, height, NotchPosition.End, stiff?.Value)));
113+
DA.SetData(0, new WebOpeningGoo(new WebOpening(width, height, NotchPosition.End, stiff?.Value)));
114114
break;
115115

116116
case NotchTypes.Both_ends:
117117
var both = new List<WebOpeningGoo> {
118118
new WebOpeningGoo(new WebOpening(width, height, NotchPosition.Start, stiff?.Value)),
119119
new WebOpeningGoo(new WebOpening(width, height, NotchPosition.End, stiff?.Value))
120120
};
121-
Output.SetList(this, DA, 0, both);
121+
DA.SetDataList(0, both);
122122
break;
123123
}
124124
}

ComposGH/Components/1_Beam/5_Quinary/CreateWebOpening.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
137137
pManager.AddParameter(new ComposWebOpeningParameter());
138138
}
139139

140-
protected override void SolveInstance(IGH_DataAccess DA) {
140+
protected override void SolveInternal(IGH_DataAccess DA) {
141141
var width_dia = (Length)Input.UnitNumber(this, DA, 0, LengthUnit);
142142

143143
int i = 1;
@@ -155,11 +155,11 @@ protected override void SolveInstance(IGH_DataAccess DA) {
155155

156156
switch (OpeningType) {
157157
case WebOpeningShape.Rectangular:
158-
Output.SetItem(this, DA, 0, new WebOpeningGoo(new WebOpening(width_dia, height, x, z, stiff?.Value)));
158+
DA.SetData(0, new WebOpeningGoo(new WebOpening(width_dia, height, x, z, stiff?.Value)));
159159
break;
160160

161161
case WebOpeningShape.Circular:
162-
Output.SetItem(this, DA, 0, new WebOpeningGoo(new WebOpening(width_dia, x, z, stiff?.Value)));
162+
DA.SetData(0, new WebOpeningGoo(new WebOpening(width_dia, x, z, stiff?.Value)));
163163
break;
164164
}
165165
}

ComposGH/Components/1_Beam/5_Quinary/CreateWebOpeningStiffener.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
106106
pManager.AddParameter(new WebOpeningStiffenersParam());
107107
}
108108

109-
protected override void SolveInstance(IGH_DataAccess DA) {
109+
protected override void SolveInternal(IGH_DataAccess DA) {
110110
bool bothSides = false;
111111
DA.GetData(0, ref bothSides);
112112
var start = (Length)Input.UnitNumber(this, DA, 1, LengthUnit);
@@ -115,10 +115,10 @@ protected override void SolveInstance(IGH_DataAccess DA) {
115115
if (OpeningType == Stiff_types.Web_Opening) {
116116
var bottomWidth = (Length)Input.UnitNumber(this, DA, 4, LengthUnit);
117117
var bottomTHK = (Length)Input.UnitNumber(this, DA, 5, LengthUnit);
118-
Output.SetItem(this, DA, 0, new WebOpeningStiffenersGoo(new WebOpeningStiffeners(
118+
DA.SetData(0, new WebOpeningStiffenersGoo(new WebOpeningStiffeners(
119119
start, topWidth, topTHK, bottomWidth, bottomTHK, bothSides)));
120120
} else {
121-
Output.SetItem(this, DA, 0, new WebOpeningStiffenersGoo(new WebOpeningStiffeners(
121+
DA.SetData(0, new WebOpeningStiffenersGoo(new WebOpeningStiffeners(
122122
start, topWidth, topTHK, bothSides)));
123123
}
124124
}

ComposGH/Components/2_Studs/1_Primary/CreateStud.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
9292
pManager.AddParameter(new ComposStudParameter());
9393
}
9494

95-
protected override void SolveInstance(IGH_DataAccess DA) {
95+
protected override void SolveInternal(IGH_DataAccess DA) {
9696
// we need to eventually add a check if dimensions and specification fit together here!
9797

9898
var studDimensions = (StudDimensionsGoo)Input.GenericGoo<StudDimensionsGoo>(this, DA, 0);
@@ -110,23 +110,23 @@ protected override void SolveInstance(IGH_DataAccess DA) {
110110
case StudSpacingType.Automatic:
111111
case StudSpacingType.Min_Num_of_Studs:
112112
DA.GetData(2, ref minSav);
113-
Output.SetItem(this, DA, 0, new StudGoo(
113+
DA.SetData(0, new StudGoo(
114114
new Stud(studDimensions.Value, studSpec.Value, minSav, SpacingType)));
115115
break;
116116

117117
case StudSpacingType.Partial_Interaction:
118118
DA.GetData(2, ref minSav);
119119
double interaction = 0.85;
120120
DA.GetData(3, ref interaction);
121-
Output.SetItem(this, DA, 0, new StudGoo(
121+
DA.SetData(0, new StudGoo(
122122
new Stud(studDimensions.Value, studSpec.Value, minSav, interaction)));
123123
break;
124124

125125
case StudSpacingType.Custom:
126126
List<StudGroupSpacingGoo> spacings = Input.GenericGooList<StudGroupSpacingGoo>(this, DA, 2);
127127
bool check = false;
128128
DA.GetData(3, ref check);
129-
Output.SetItem(this, DA, 0, new StudGoo(
129+
DA.SetData(0, new StudGoo(
130130
new Stud(studDimensions.Value, studSpec.Value, spacings?.Select(x => x.Value as IStudGroupSpacing).ToList(), check)));
131131
break;
132132
}

ComposGH/Components/2_Studs/2_Secondary/CreateCustomStudDims.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
8282
pManager.AddParameter(new StudDimensionsParam());
8383
}
8484

85-
protected override void SolveInstance(IGH_DataAccess DA) {
85+
protected override void SolveInternal(IGH_DataAccess DA) {
8686
var dia = (Length)Input.UnitNumber(this, DA, 0, LengthUnit, true);
8787
var h = (Length)Input.UnitNumber(this, DA, 1, LengthUnit, true);
8888
var strengthF = (Force)Input.UnitNumber(this, DA, 2, ForceUnit);
89-
Output.SetItem(this, DA, 0, new StudDimensionsGoo(new StudDimensions(dia, h, strengthF)));
89+
DA.SetData(0, new StudDimensionsGoo(new StudDimensions(dia, h, strengthF)));
9090
}
9191

9292
protected override void UpdateUIFromSelectedItems() {

ComposGH/Components/2_Studs/2_Secondary/CreateStandardStudDims.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
6060
pManager.AddParameter(new StudDimensionsParam());
6161
}
6262

63-
protected override void SolveInstance(IGH_DataAccess DA) {
64-
Output.SetItem(this, DA, 0, new StudDimensionsGoo(new StudDimensions(StdSize)));
63+
protected override void SolveInternal(IGH_DataAccess DA) {
64+
DA.SetData(0, new StudDimensionsGoo(new StudDimensions(StdSize)));
6565
}
6666

6767
protected override void UpdateUIFromSelectedItems() {

ComposGH/Components/2_Studs/2_Secondary/CreateStandardStudDimsEN.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
150150
pManager.AddParameter(new StudDimensionsParam(), StudDimensionsGoo.Name, StudDimensionsGoo.NickName, "EN " + StudDimensionsGoo.Description + " for a " + StudGoo.Description, GH_ParamAccess.item);
151151
}
152152

153-
protected override void SolveInstance(IGH_DataAccess DA) {
153+
protected override void SolveInternal(IGH_DataAccess DA) {
154154
if (_selectedItems[0] == StandardSizes[0]) // custom size
155155
{
156156
var dia = (Length)Input.UnitNumber(this, DA, 0, LengthUnit);
@@ -159,17 +159,17 @@ protected override void SolveInstance(IGH_DataAccess DA) {
159159
if (Params.Input[2].Sources.Count > 0) {
160160
_selectedItems[1] = "Custom";
161161
var strengthS = (Pressure)Input.UnitNumber(this, DA, 2, StressUnit);
162-
Output.SetItem(this, DA, 0, new StudDimensionsGoo(new StudDimensions(dia, h, strengthS)));
162+
DA.SetData(0, new StudDimensionsGoo(new StudDimensions(dia, h, strengthS)));
163163
} else {
164-
Output.SetItem(this, DA, 0, new StudDimensionsGoo(new StudDimensions(dia, h, StdGrd)));
164+
DA.SetData(0, new StudDimensionsGoo(new StudDimensions(dia, h, StdGrd)));
165165
}
166166
} else {
167167
if (Params.Input[0].Sources.Count > 0) {
168168
_selectedItems[1] = "Custom";
169169
var strengthS = (Pressure)Input.UnitNumber(this, DA, 0, StressUnit);
170-
Output.SetItem(this, DA, 0, new StudDimensionsGoo(new StudDimensions(StdSize, strengthS)));
170+
DA.SetData(0, new StudDimensionsGoo(new StudDimensions(StdSize, strengthS)));
171171
} else {
172-
Output.SetItem(this, DA, 0, new StudDimensionsGoo(new StudDimensions(StdSize, StdGrd)));
172+
DA.SetData(0, new StudDimensionsGoo(new StudDimensions(StdSize, StdGrd)));
173173
}
174174
}
175175
}

ComposGH/Components/2_Studs/3_Tertiary/CreateStudSpecAZNZHK.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager) {
7777
pManager.AddParameter(new StudSpecificationParam(), StudSpecificationGoo.Name, StudSpecificationGoo.NickName, StudSpecificationGoo.Description + " applicable for AS/NZ or HK codes, for a " + StudGoo.Description, GH_ParamAccess.item);
7878
}
7979

80-
protected override void SolveInstance(IGH_DataAccess DA) {
80+
protected override void SolveInternal(IGH_DataAccess DA) {
8181
// get default length inputs used for all cases
8282
IQuantity noStudZoneStart = Length.Zero;
8383
if (Params.Input[0].Sources.Count > 0) {
@@ -93,7 +93,7 @@ protected override void SolveInstance(IGH_DataAccess DA) {
9393

9494
var specOther = new StudSpecification(
9595
noStudZoneStart, noStudZoneEnd, welded);
96-
Output.SetItem(this, DA, 0, new StudSpecificationGoo(specOther));
96+
DA.SetData(0, new StudSpecificationGoo(specOther));
9797
}
9898

9999
protected override void UpdateUIFromSelectedItems() {

0 commit comments

Comments
 (0)