Skip to content

Commit a70b16c

Browse files
author
Fraser Greenroyd
authored
7.1 Deployment (#234)
2 parents d544a91 + 02d9ee1 commit a70b16c

Some content is hidden

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

48 files changed

+128
-81
lines changed

RAM_Adapter/AdapterActions/Pull.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -67,3 +67,4 @@ public override IEnumerable<object> Pull(IRequest request, PullType pullType = P
6767

6868

6969

70+

RAM_Adapter/AdapterActions/Push.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -68,3 +68,4 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",
6868

6969

7070

71+

RAM_Adapter/Convert/ToBHoM.cs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -40,6 +40,7 @@
4040
using BH.oM.Adapter;
4141
using BH.Engine.Geometry;
4242
using BH.Engine.Structure;
43+
using BH.Engine.Base;
4344

4445
namespace BH.Adapter.RAM
4546
{
@@ -216,7 +217,7 @@ public static Bar ToBHoMObject(this IColumn ramColumn)
216217
ISectionProperty sectionProperty = ToBHoMSection(ramColumn);
217218

218219
// Create bars with section properties
219-
Bar bhomBar = new Bar { StartNode = startNode, EndNode = endNode, SectionProperty = sectionProperty, Name = sectionName };
220+
Bar bhomBar = new Bar { Start = startNode, End = endNode, SectionProperty = sectionProperty, Name = sectionName };
220221

221222
// Translate RAM Releases to BHoM Releases (in progress; logic not yet complete since it is difficult map Maj/Min axes to global XYZ axes for every member)
222223
// May be better to just do in custom data, although if we can do this mapping it may be useful
@@ -272,7 +273,7 @@ public static Bar ToBHoMObject(this IBeam ramBeam, ILayoutBeam ramLayoutBeam, do
272273
ISectionProperty sectionProperty = ToBHoMSection(ramBeam);
273274

274275
// Create bars with section properties
275-
Bar bhomBar = new Bar { StartNode = startNode, EndNode = endNode, SectionProperty = sectionProperty, Name = sectionName };
276+
Bar bhomBar = new Bar { Start = startNode, End = endNode, SectionProperty = sectionProperty, Name = sectionName };
276277

277278
// Set Properties
278279
bhomBar.OrientationAngle = 0;
@@ -368,7 +369,7 @@ public static Bar ToBHoMObject(this IVerticalBrace ramVerticalBrace)
368369
Node endNode = new Node { Position = endPt.PointFromRAM() };
369370

370371

371-
Bar bhomBar = new Bar { StartNode = startNode, EndNode = endNode, SectionProperty = sectionProperty, Name = sectionName };
372+
Bar bhomBar = new Bar { Start = startNode, End = endNode, SectionProperty = sectionProperty, Name = sectionName };
372373

373374
bhomBar.OrientationAngle = 0;
374375

@@ -413,7 +414,7 @@ public static Bar ToBHoMObject(IHorizBrace ramHorizBrace, ILayoutHorizBrace ramL
413414
Node startNode = new Node { Position = new oM.Geometry.Point() { X = StartSupportX.FromInch(), Y = StartSupportY.FromInch(), Z = StoryZ.FromInch() + StartSupportZOffset.FromInch() } };
414415
Node endNode = new Node { Position = new oM.Geometry.Point() { X = EndSupportX.FromInch(), Y = EndSupportY.FromInch(), Z = StoryZ.FromInch() + EndSupportZOffset.FromInch() } };
415416

416-
Bar bhomBar = new Bar { StartNode = startNode, EndNode = endNode, SectionProperty = sectionProperty, Name = sectionName };
417+
Bar bhomBar = new Bar { Start = startNode, End = endNode, SectionProperty = sectionProperty, Name = sectionName };
417418

418419
bhomBar.OrientationAngle = 0;
419420

@@ -483,20 +484,18 @@ public static Panel ToBHoMObject(IDeck ramDeck, IModel ramModel, int ramStoryUID
483484
}
484485

485486
//Create panel per outline polyline
486-
List<Opening> bhomOpenings = new List<Opening>();
487-
Panel bhomPanel = Engine.Structure.Create.Panel(outline, bhomOpenings);
487+
Panel bhomPanel = Engine.Structure.Create.Panel(outline);
488488
//Create openings per openings polylines
489489
int numOpenings = openingPLs.Count();
490490

491491
//Create openings
492492
for (int i = 0; i < numOpenings; i++)
493493
{
494494
Opening bhomOpening = Engine.Structure.Create.Opening(openingPLs[i]);
495-
bhomOpenings.Add(bhomOpening);
495+
bhomPanel.Openings.Add(bhomOpening);
496496
}
497497

498498
//Create panel and add attributes;
499-
bhomPanel.Openings = bhomOpenings;
500499

501500
HashSet<String> tag = new HashSet<string>();
502501
tag.Add("Floor");
@@ -566,7 +565,8 @@ public static Panel ToBHoMObject(this IWall ramWall)
566565
}
567566

568567
// Create wall
569-
Panel bhomPanel = Engine.Structure.Create.Panel(outline, bhomWallOpenings);
568+
Panel bhomPanel = Engine.Structure.Create.Panel(outline);
569+
bhomPanel.Openings.AddRange(bhomWallOpenings);
570570

571571
HashSet<String> tag = new HashSet<string>();
572572
tag.Add("Wall");
@@ -1000,3 +1000,4 @@ public static oM.Geometry.Point PointFromRAM(this SCoordinate sc, double zOffset
10001000

10011001

10021002

1003+

RAM_Adapter/Convert/ToRAM.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -46,8 +46,8 @@ public static ILayoutBeam ToRAM(this Bar bar, ILayoutBeams iLayoutBeams)
4646
{
4747
ILayoutBeam iLayoutBeam = iLayoutBeams.GetAt(0);
4848

49-
SCoordinate start = bar.StartNode.Position.ToRAM();
50-
SCoordinate end = bar.EndNode.Position.ToRAM();
49+
SCoordinate start = bar.Start.Position.ToRAM();
50+
SCoordinate end = bar.End.Position.ToRAM();
5151

5252
//Set support coordinates and name
5353
//CAUTION: different from actual end points and cantilevers hardcoded
@@ -88,7 +88,7 @@ public static IStory GetStory(this Bar bar, StructuralUsage1D usage1D, IStories
8888
{
8989
case StructuralUsage1D.Beam:
9090
//Use lowest end elevation
91-
elev = Math.Min(bar.StartNode.Position.Z, bar.EndNode.Position.Z).ToInch();
91+
elev = Math.Min(bar.Start.Position.Z, bar.End.Position.Z).ToInch();
9292
break;
9393
case StructuralUsage1D.Column:
9494
// Get RAM column data
@@ -101,16 +101,16 @@ public static IStory GetStory(this Bar bar, StructuralUsage1D usage1D, IStories
101101

102102
if (isHanging.Equals("True") || isHanging.Equals("1")) //Hanging Column to be placed on its btm level.
103103
{
104-
elev = Math.Min(bar.StartNode.Position.Z, bar.EndNode.Position.Z).ToInch();
104+
elev = Math.Min(bar.Start.Position.Z, bar.End.Position.Z).ToInch();
105105
}
106106
else //Column to be placed on the level it supports.
107107
{
108-
elev = Math.Max(bar.StartNode.Position.Z, bar.EndNode.Position.Z).ToInch();
108+
elev = Math.Max(bar.Start.Position.Z, bar.End.Position.Z).ToInch();
109109
}
110110
break;
111111
default:
112112
//Use lowest end elevation
113-
elev = Math.Min(bar.StartNode.Position.Z, bar.EndNode.Position.Z).ToInch();
113+
elev = Math.Min(bar.Start.Position.Z, bar.End.Position.Z).ToInch();
114114
break;
115115
}
116116

@@ -187,3 +187,4 @@ public static IStory GetStory(this Panel panel, IStories ramStories)
187187

188188

189189

190+

RAM_Adapter/Create/Bar.cs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -89,8 +89,8 @@ private bool CreateCollection(IEnumerable<Bar> bhomBars)
8989
IFloorType ramFloorType = barStory.GetFloorType();
9090
ILayoutBeams ramBeams = ramFloorType.GetLayoutBeams();
9191

92-
double zStart = bar.StartNode.Position.Z.ToInch() - barStory.dElevation;
93-
double zEnd = bar.EndNode.Position.Z.ToInch() - barStory.dElevation;
92+
double zStart = bar.Start.Position.Z.ToInch() - barStory.dElevation;
93+
double zEnd = bar.End.Position.Z.ToInch() - barStory.dElevation;
9494

9595
// Get beam fragment cantilever data
9696
double startCant = 0;
@@ -109,13 +109,13 @@ private bool CreateCollection(IEnumerable<Bar> bhomBars)
109109
SCoordinate startPt, endPt;
110110
if (startCant > 0) // Ensure startPt corresponds with support point
111111
{
112-
startPt = bar.EndNode.Position.ToRAM();
113-
endPt = bar.StartNode.Position.ToRAM();
112+
startPt = bar.End.Position.ToRAM();
113+
endPt = bar.Start.Position.ToRAM();
114114
}
115115
else
116116
{
117-
startPt = bar.StartNode.Position.ToRAM();
118-
endPt = bar.EndNode.Position.ToRAM();
117+
startPt = bar.Start.Position.ToRAM();
118+
endPt = bar.End.Position.ToRAM();
119119
}
120120

121121
ramBeam = ramBeams.AddStubCantilever(bar.SectionProperty.Material.ToRAM(), startPt.dXLoc, startPt.dYLoc, 0, endPt.dXLoc, endPt.dYLoc, 0); // No Z offsets, beams flat on closest story
@@ -124,8 +124,8 @@ private bool CreateCollection(IEnumerable<Bar> bhomBars)
124124
{
125125
// Get support points
126126
Vector barDir = bar.Tangent(true);
127-
Point startSupPt = BH.Engine.Geometry.Modify.Translate(bar.StartNode.Position, barDir * startCant);
128-
Point endSupPt = BH.Engine.Geometry.Modify.Translate(bar.EndNode.Position, -barDir * endCant);
127+
Point startSupPt = BH.Engine.Geometry.Modify.Translate(bar.Start.Position, barDir * startCant);
128+
Point endSupPt = BH.Engine.Geometry.Modify.Translate(bar.End.Position, -barDir * endCant);
129129
SCoordinate start = startSupPt.ToRAM();
130130
SCoordinate end = endSupPt.ToRAM();
131131

@@ -170,7 +170,7 @@ private bool CreateCollection(IEnumerable<Bar> bhomBars)
170170

171171
IStory barStory = bar.GetStory(StructuralUsage1D.Column, ramStories);
172172

173-
List<Node> colNodes = new List<Node>() { bar.StartNode, bar.EndNode };
173+
List<Node> colNodes = new List<Node>() { bar.Start, bar.End };
174174
colNodes.Sort((x, y) => x.Position.Z.CompareTo(y.Position.Z));
175175

176176
double xBtm = colNodes[0].Position.X.ToInch();
@@ -233,3 +233,4 @@ private bool CreateCollection(IEnumerable<Bar> bhomBars)
233233
}
234234

235235

236+

RAM_Adapter/Create/ContourLoadSet.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -111,3 +111,4 @@ private bool CreateCollection(IEnumerable<ContourLoadSet> loads)
111111
}
112112

113113

114+

RAM_Adapter/Create/Errors.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -84,3 +84,4 @@ private void CreatePropertyEvent(string failedProperty, string elemType, string
8484
}
8585

8686

87+

RAM_Adapter/Create/Grid.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -220,3 +220,4 @@ private bool CreateCollection(IEnumerable<Grid> bhomGrid)
220220
}
221221

222222

223+

RAM_Adapter/Create/Level.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -229,3 +229,4 @@ private bool CreateCollection(IEnumerable<Level> bhomLevels)
229229
}
230230

231231

232+

RAM_Adapter/Create/MaterialFragment.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -74,3 +74,4 @@ private bool CreateCollection(IEnumerable<IMaterialFragment> materials)
7474
}
7575

7676

77+

0 commit comments

Comments
 (0)