Skip to content

Commit 7a519d9

Browse files
committed
Progress commit. Not building yet.
1 parent 446d697 commit 7a519d9

7 files changed

+934
-1865
lines changed

src/AnalyticalBar.cs

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace Dynamo.Analysis
7+
{
8+
public enum SectionType : byte
9+
{
10+
Tube00 = 1,
11+
Tube01 = 2,
12+
Tube02 = 3,
13+
Plate00 = 4,
14+
Plate01 = 5,
15+
Plate02 = 6,
16+
Cable = 7
17+
}
18+
19+
//!The Bar Class
20+
public class AnalyticalBar : AnalyticalModelBase
21+
{
22+
#region properties
23+
24+
//The start node.
25+
public AnalyticalNode Start { get; private set; }
26+
27+
//The the end node.
28+
public AnalyticalNode End { get; private set; }
29+
30+
//The diameter of the bar.
31+
public double Diameter { get; private set; }
32+
33+
//The section thickness.
34+
public double SectionThickness { get; private set; }
35+
36+
//The section type - bar or plate.
37+
public SectionType SectionType { get; private set; }
38+
39+
//The end release.
40+
public string EndRelease { get; private set; }
41+
42+
#endregion
43+
44+
/// <summary>
45+
/// Create an analytical bar.
46+
/// </summary>
47+
/// <param name="start">The start node.</param>
48+
/// <param name="end">The end node.</param>
49+
/// <param name="diameter">The diameter.</param>
50+
/// <param name="sectionType">The section type.</param>
51+
/// <param name="thickness">The thickness.</param>
52+
/// <param name="endRelease">The end release.</param>
53+
public AnalyticalBar(AnalyticalNode start, AnalyticalNode end, double diameter, SectionType sectionType, double thickness, string endRelease)
54+
{
55+
Start = start;
56+
End = end;
57+
Diameter = diameter;
58+
SectionType = sectionType;
59+
SectionThickness = thickness;
60+
EndRelease = endRelease;
61+
}
62+
}
63+
}

src/AnalyticalModelBase.cs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace Dynamo.Analysis
7+
{
8+
public abstract class AnalyticalModelBase
9+
{
10+
public int Id { get; set; }
11+
12+
public AnalyticalModelBase()
13+
{
14+
}
15+
16+
}
17+
}

src/AnalyticalNode.cs

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace Dynamo.Analysis
7+
{
8+
//!The Node Class
9+
public class AnalyticalNode : AnalyticalModelBase
10+
{
11+
#region properties
12+
//*!The X coordinate of the node.
13+
public double X { get; private set; }
14+
15+
//!The Y coordinate of the node.
16+
public double Y { get; private set; }
17+
18+
//!The Z coordinate of the node.
19+
public double Z { get; private set; }
20+
21+
//!The fixity of the node
22+
public int Fixed { get; private set; }
23+
24+
#endregion properties
25+
26+
//!The node constructor
27+
public AnalyticalNode(double x, double y, double z, int fixity)
28+
{
29+
X = x;
30+
Y = y;
31+
Z = z;
32+
Fixed = fixity;
33+
}
34+
}
35+
}

src/AnalyticalPlate.cs

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System.Collections.Generic;
2+
3+
namespace Dynamo.Analysis
4+
{
5+
public enum PlateType : byte
6+
{
7+
Slab = 1,
8+
Panel = 2,
9+
Shear = 3
10+
}
11+
12+
public class AnalyticalPlate : AnalyticalModelBase
13+
{
14+
//!The list of Robot Nodes which make up the plate element.
15+
public List<int> Nodes { get; set; }
16+
17+
public double WindLoad { get; private set; }
18+
19+
public double LiveLoad { get; private set; }
20+
21+
public double BuildingLoad { get; private set; }
22+
23+
public PlateType PlateType { get; set; }
24+
25+
public double Thickness { get; private set; }
26+
27+
//!The Plate constructor.
28+
public AnalyticalPlate(List<int> nodes, double[] loads, double thickness)
29+
{
30+
Nodes = nodes;
31+
WindLoad = loads[0];
32+
LiveLoad = loads[1];
33+
BuildingLoad = loads[2];
34+
Thickness = thickness;
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)