Skip to content

Commit 94e79f3

Browse files
committed
Building clean.
1 parent 7a519d9 commit 94e79f3

File tree

4 files changed

+583
-531
lines changed

4 files changed

+583
-531
lines changed

src/AnalyticalNode.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ public class AnalyticalNode : AnalyticalModelBase
1919
public double Z { get; private set; }
2020

2121
//!The fixity of the node
22-
public int Fixed { get; private set; }
22+
public bool IsFixed { get; private set; }
2323

2424
#endregion properties
2525

2626
//!The node constructor
27-
public AnalyticalNode(double x, double y, double z, int fixity)
27+
public AnalyticalNode(double x, double y, double z, bool isFixed)
2828
{
2929
X = x;
3030
Y = y;
3131
Z = z;
32-
Fixed = fixity;
32+
IsFixed = isFixed;
3333
}
3434
}
3535
}

src/DynamoBot.cs

+20-27
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,10 @@ You should have received a copy of the GNU General Public License
3131

3232
namespace Dynamo.Analysis
3333
{
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)
5038

5139
[NodeName("DynamoBotSectionType")]
5240
[NodeCategory(BuiltinNodeCategories.ANALYSIS)]
@@ -87,17 +75,22 @@ public DynamoRobotModel()
8775
InPortData.Add(new PortData("nodes", "A list of analytical nodes.", typeof(object)));
8876
InPortData.Add(new PortData("bars", "A list of analytical bars.", typeof(object)));
8977
InPortData.Add(new PortData("plates", "A list of analytical plates.", typeof(object)));
90-
9178
OutPortData.Add(new PortData("model", "The analytical model.", typeof(object)));
79+
80+
NodeUI.RegisterAllPorts();
9281
}
9382

9483
public override FScheme.Value Evaluate(FSharpList<FScheme.Value> args)
9584
{
9685
_eng = (RobotEngine)((Value.Container)args[0]).Item;
9786

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));
10194

10295
RobotModel model = new RobotModel(_eng.Application, nodes, bars, plates);
10396

@@ -136,7 +129,7 @@ public override FScheme.Value Evaluate(FSharpList<FScheme.Value> args)
136129
}
137130

138131
//!The Node Class
139-
[NodeName("DynamoBotNode")]
132+
[NodeName("DynamoAnalyticalNode")]
140133
[NodeCategory(BuiltinNodeCategories.ANALYSIS)]
141134
[NodeDescription("Creates a structural analytical node in Robot.")]
142135
public class DynAnalyticalNode : dynNodeWithOneOutput
@@ -165,7 +158,7 @@ public override FScheme.Value Evaluate(FSharpList<FScheme.Value> args)
165158
}
166159

167160
//!The Bar Class
168-
[NodeName("DynamoBotBar")]
161+
[NodeName("DynamoAnalyticalBar")]
169162
[NodeCategory(BuiltinNodeCategories.ANALYSIS)]
170163
[NodeDescription("Creates a structural analytical bar in Robot.")]
171164
public class DynAnalyticalBar : dynNodeWithOneOutput
@@ -179,17 +172,17 @@ public DynAnalyticalBar()
179172
InPortData.Add(new PortData("n", "The section type of the bar.", typeof(SectionType)));
180173
InPortData.Add(new PortData("n", "The section thickness of the bar.", typeof(double)));
181174
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)));
183176

184177
NodeUI.RegisterAllPorts();
185178
}
186179

187180
public override Value Evaluate(FSharpList<Value> args)
188181
{
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;
191184
var diameter = ((Value.Number)args[2]).Item;
192-
var sectionType = ((Value.Container)args[3]).Item;
185+
var sectionType = (SectionType)((Value.Container)args[3]).Item;
193186
var thickness = ((Value.Number)args[4]).Item;
194187
var endRelease = ((Value.String)args[5]).Item;
195188

@@ -199,7 +192,7 @@ public override Value Evaluate(FSharpList<Value> args)
199192
}
200193

201194
//!The Plate Class
202-
[NodeName("DynamoBotPlate")]
195+
[NodeName("DynamoAnalyticalPlate")]
203196
[NodeCategory(BuiltinNodeCategories.ANALYSIS)]
204197
[NodeDescription("Creates a structural analytical plate in Robot.")]
205198
public class DynAnalyticalPlate

src/DynamoBot.csproj

+8-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ProjectGuid>{81621DA3-9BCF-4DB6-BE81-3C17D32779CD}</ProjectGuid>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<OutputType>Exe</OutputType>
7+
<OutputType>Library</OutputType>
88
<RootNamespace>Dynamo.Analysis</RootNamespace>
99
<AssemblyName>DynamoBot</AssemblyName>
1010
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -49,12 +49,19 @@
4949
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
5050
<OutputPath>..\bin\</OutputPath>
5151
<PlatformTarget>x64</PlatformTarget>
52+
<RegisterForComInterop>false</RegisterForComInterop>
5253
</PropertyGroup>
5354
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
5455
<OutputPath>..\bin\</OutputPath>
5556
</PropertyGroup>
57+
<PropertyGroup>
58+
<StartupObject />
59+
</PropertyGroup>
5660
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
5761
<ItemGroup>
62+
<Reference Include="DragCanvas">
63+
<HintPath>..\..\Dynamo\bin\Debug\DragCanvas.dll</HintPath>
64+
</Reference>
5865
<Reference Include="DynamoElements">
5966
<HintPath>..\..\Dynamo\bin\Debug\DynamoElements.dll</HintPath>
6067
</Reference>

0 commit comments

Comments
 (0)