From 09cd4ba8c1be223885e4b603baaba6cc3166f129 Mon Sep 17 00:00:00 2001 From: Isak Naslund Date: Fri, 13 Nov 2020 09:36:54 +0100 Subject: [PATCH] Aligning with changes in Structure_Engine --- RAM_Adapter/CRUD/Create.cs | 9 +++++---- RAM_Adapter/Convert/ToRAM.cs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/RAM_Adapter/CRUD/Create.cs b/RAM_Adapter/CRUD/Create.cs index 7c5cb24..ab17eee 100644 --- a/RAM_Adapter/CRUD/Create.cs +++ b/RAM_Adapter/CRUD/Create.cs @@ -38,6 +38,7 @@ using BH.Engine.Geometry; using BH.Engine.Base; using BH.Engine.Structure; +using BH.Engine.Spatial; using BH.Adapter.RAM; using BH.oM.Adapters.RAM; using BH.oM.Adapter; @@ -375,7 +376,7 @@ private bool CreateCollection(IEnumerable bhomPanels) { RAMId RAMId = new RAMId(); string name = panel.Name; - PolyCurve outlineExternal = panel.Outline(); + PolyCurve outlineExternal = panel.OutlineCurve(); ramStory = panel.GetStory(ramStories); ramFloorType = ramStory.GetFloorType(); @@ -407,7 +408,7 @@ private bool CreateCollection(IEnumerable bhomPanels) foreach (Opening opening in panelOpenings) { - PolyCurve outlineOpening = opening.Outline(); + PolyCurve outlineOpening = opening.OutlineCurve(); openingOutlines.Add(outlineOpening); } @@ -493,7 +494,7 @@ private bool CreateCollection(IEnumerable bhomPanels) } // Find outline of planar panel - PolyCurve outline = BH.Engine.Structure.Query.Outline(wallPanel); + PolyCurve outline = BH.Engine.Spatial.Query.OutlineCurve(wallPanel); List wallPts = outline.DiscontinuityPoints(); List sortedWallPts = wallPts.OrderBy(p => p.X).ToList(); Point leftPt = sortedWallPts.First(); @@ -529,7 +530,7 @@ private bool CreateCollection(IEnumerable bhomPanels) // Find opening location, width, and height from outline and apply foreach (Opening open in wallPanel.Openings) { - PolyCurve openOutline = open.Outline(); + PolyCurve openOutline = open.OutlineCurve(); BoundingBox openBounds = BH.Engine.Geometry.Query.Bounds(openOutline); Point openMin = openBounds.Min; Point openMax = openBounds.Max; diff --git a/RAM_Adapter/Convert/ToRAM.cs b/RAM_Adapter/Convert/ToRAM.cs index 30c190a..cf2288d 100644 --- a/RAM_Adapter/Convert/ToRAM.cs +++ b/RAM_Adapter/Convert/ToRAM.cs @@ -157,7 +157,7 @@ public static IStory GetStory(this Panel panel, IStories ramStories) List panelPoints = new List(); // Get heights of wall and floor corners to create levels - PolyCurve panelOutline = Engine.Structure.Query.Outline(panel); + PolyCurve panelOutline = Engine.Spatial.Query.OutlineCurve(panel); panelPoints = panelOutline.DiscontinuityPoints(); foreach (Point pt in panelPoints)