@@ -31,22 +31,10 @@ You should have received a copy of the GNU General Public License
31
31
32
32
namespace Dynamo . Analysis
33
33
{
34
- class RobotLink
35
- {
36
-
37
- static List < int > m_failedNodes = new List < int > ( ) ;
38
- static List < int > m_failedBars = new List < int > ( ) ;
39
- static double m_displacementTolerance = 0.0 ; //13mm mm->M
40
- static double m_stressTolerance = .6 * 248211262.8 ; //36ksi(steel) -> Pascal * .6 (per ASD)
41
- static double m_windx , m_windy , m_windz ; //the wind vector
42
-
43
- static string m_errorMessage = "" ;
44
-
45
-
46
-
47
-
48
-
49
- }
34
+ //static List<int> m_failedNodes = new List<int>();
35
+ //static List<int> m_failedBars = new List<int>();
36
+ //static double m_displacementTolerance = 0.0; //13mm mm->M
37
+ //static double m_stressTolerance = .6 * 248211262.8; //36ksi(steel) -> Pascal * .6 (per ASD)
50
38
51
39
[ NodeName ( "DynamoBotSectionType" ) ]
52
40
[ NodeCategory ( BuiltinNodeCategories . ANALYSIS ) ]
@@ -87,17 +75,22 @@ public DynamoRobotModel()
87
75
InPortData . Add ( new PortData ( "nodes" , "A list of analytical nodes." , typeof ( object ) ) ) ;
88
76
InPortData . Add ( new PortData ( "bars" , "A list of analytical bars." , typeof ( object ) ) ) ;
89
77
InPortData . Add ( new PortData ( "plates" , "A list of analytical plates." , typeof ( object ) ) ) ;
90
-
91
78
OutPortData . Add ( new PortData ( "model" , "The analytical model." , typeof ( object ) ) ) ;
79
+
80
+ NodeUI . RegisterAllPorts ( ) ;
92
81
}
93
82
94
83
public override FScheme . Value Evaluate ( FSharpList < FScheme . Value > args )
95
84
{
96
85
_eng = ( RobotEngine ) ( ( Value . Container ) args [ 0 ] ) . Item ;
97
86
98
- var nodes ;
99
- var bars ;
100
- var plates ;
87
+ var nodes_in = ( ( Value . List ) args [ 1 ] ) . Item ;
88
+ var bars_in = ( ( Value . List ) args [ 2 ] ) . Item ;
89
+ var plates_in = ( ( Value . List ) args [ 3 ] ) . Item ;
90
+
91
+ var nodes = nodes_in . Select ( x => ( ( AnalyticalNode ) ( ( Value . Container ) x ) . Item ) ) ;
92
+ var bars = bars_in . Select ( x => ( ( AnalyticalBar ) ( ( Value . Container ) x ) . Item ) ) ;
93
+ var plates = plates_in . Select ( x => ( ( AnalyticalPlate ) ( ( Value . Container ) x ) . Item ) ) ;
101
94
102
95
RobotModel model = new RobotModel ( _eng . Application , nodes , bars , plates ) ;
103
96
@@ -136,7 +129,7 @@ public override FScheme.Value Evaluate(FSharpList<FScheme.Value> args)
136
129
}
137
130
138
131
//!The Node Class
139
- [ NodeName ( "DynamoBotNode " ) ]
132
+ [ NodeName ( "DynamoAnalyticalNode " ) ]
140
133
[ NodeCategory ( BuiltinNodeCategories . ANALYSIS ) ]
141
134
[ NodeDescription ( "Creates a structural analytical node in Robot." ) ]
142
135
public class DynAnalyticalNode : dynNodeWithOneOutput
@@ -165,7 +158,7 @@ public override FScheme.Value Evaluate(FSharpList<FScheme.Value> args)
165
158
}
166
159
167
160
//!The Bar Class
168
- [ NodeName ( "DynamoBotBar " ) ]
161
+ [ NodeName ( "DynamoAnalyticalBar " ) ]
169
162
[ NodeCategory ( BuiltinNodeCategories . ANALYSIS ) ]
170
163
[ NodeDescription ( "Creates a structural analytical bar in Robot." ) ]
171
164
public class DynAnalyticalBar : dynNodeWithOneOutput
@@ -179,17 +172,17 @@ public DynAnalyticalBar()
179
172
InPortData . Add ( new PortData ( "n" , "The section type of the bar." , typeof ( SectionType ) ) ) ;
180
173
InPortData . Add ( new PortData ( "n" , "The section thickness of the bar." , typeof ( double ) ) ) ;
181
174
InPortData . Add ( new PortData ( "n" , "The the end release of the bar." , typeof ( string ) ) ) ;
182
- OutPortData . Add ( new PortData ( "bar" , "The analytical bar." , typeof ( Bar ) ) ) ;
175
+ OutPortData . Add ( new PortData ( "bar" , "The analytical bar." , typeof ( AnalyticalBar ) ) ) ;
183
176
184
177
NodeUI . RegisterAllPorts ( ) ;
185
178
}
186
179
187
180
public override Value Evaluate ( FSharpList < Value > args )
188
181
{
189
- var start = ( ( Value . Container ) args [ 0 ] ) . Item ;
190
- var end = ( ( Value . Container ) args [ 1 ] ) . Item ;
182
+ var start = ( AnalyticalNode ) ( ( Value . Container ) args [ 0 ] ) . Item ;
183
+ var end = ( AnalyticalNode ) ( ( Value . Container ) args [ 1 ] ) . Item ;
191
184
var diameter = ( ( Value . Number ) args [ 2 ] ) . Item ;
192
- var sectionType = ( ( Value . Container ) args [ 3 ] ) . Item ;
185
+ var sectionType = ( SectionType ) ( ( Value . Container ) args [ 3 ] ) . Item ;
193
186
var thickness = ( ( Value . Number ) args [ 4 ] ) . Item ;
194
187
var endRelease = ( ( Value . String ) args [ 5 ] ) . Item ;
195
188
@@ -199,7 +192,7 @@ public override Value Evaluate(FSharpList<Value> args)
199
192
}
200
193
201
194
//!The Plate Class
202
- [ NodeName ( "DynamoBotPlate " ) ]
195
+ [ NodeName ( "DynamoAnalyticalPlate " ) ]
203
196
[ NodeCategory ( BuiltinNodeCategories . ANALYSIS ) ]
204
197
[ NodeDescription ( "Creates a structural analytical plate in Robot." ) ]
205
198
public class DynAnalyticalPlate
0 commit comments