Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align with changes in oM and Engine on Reflection -> Base #185

Merged
merged 4 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions IES_Adapter/CRUD/Create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

using BH.oM.Adapter;
using BH.Engine.Adapter;
using BH.oM.Reflection;

namespace BH.Adapter.IES
{
Expand Down Expand Up @@ -69,7 +68,7 @@ protected override bool ICreate<T>(IEnumerable<T> objects, ActionConfig actionCo
}
catch(Exception e)
{
BH.Engine.Reflection.Compute.RecordError("An error occurred in exporting the IES GEM file. Error is: " + e.ToString());
BH.Engine.Base.Compute.RecordError("An error occurred in exporting the IES GEM file. Error is: " + e.ToString());
}

sw.Close();
Expand Down
4 changes: 2 additions & 2 deletions IES_Adapter/CRUD/Read.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private List<Panel> ReadPanels()
{
if (!System.IO.File.Exists(_fileSettings.GetFullFileName()))
{
BH.Engine.Reflection.Compute.RecordError("File does not exist to pull from");
BH.Engine.Base.Compute.RecordError("File does not exist to pull from");
return new List<Panel>();
}

Expand Down Expand Up @@ -156,7 +156,7 @@ private List<Space> ReadSpaces(List<Panel> panels)
Point centre = perim != null ? perim.Centroid() : null;

if (perim == null)
BH.Engine.Reflection.Compute.RecordWarning("The space " + space.ConnectedSpaceName() + " did not return a valid floor geometry from its panels. The geometry is null but the space has been pulled. You may wish to investigate and fix manually.");
BH.Engine.Base.Compute.RecordWarning("The space " + space.ConnectedSpaceName() + " did not return a valid floor geometry from its panels. The geometry is null but the space has been pulled. You may wish to investigate and fix manually.");

spaces.Add(new Space
{
Expand Down
8 changes: 4 additions & 4 deletions IES_Adapter/IESAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
using BH.oM.IES.Settings;

using System.ComponentModel;
using BH.oM.Reflection.Attributes;
using BH.oM.Base.Attributes;

using BH.Engine.Adapters.IES;

Expand All @@ -55,19 +55,19 @@ public IESAdapter(BH.oM.Adapter.FileSettings fileSettings = null, SettingsIES se

if (fileSettings == null)
{
BH.Engine.Reflection.Compute.RecordError("Please set the File Settings correctly to enable the IES Adapter to work correctly");
BH.Engine.Base.Compute.RecordError("Please set the File Settings correctly to enable the IES Adapter to work correctly");
return;
}

if (!Path.HasExtension(fileSettings.FileName) || Path.GetExtension(fileSettings.FileName) != ".gem")
{
BH.Engine.Reflection.Compute.RecordError("File Name must contain a file extension");
BH.Engine.Base.Compute.RecordError("File Name must contain a file extension");
return;
}

if (settingsIES == null)
{
BH.Engine.Reflection.Compute.RecordError("Please set some IES Settings on the IES Adapter before pushing");
BH.Engine.Base.Compute.RecordError("Please set some IES Settings on the IES Adapter before pushing");
return;
}

Expand Down
17 changes: 7 additions & 10 deletions IES_Adapter/IES_Adapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
<Reference Include="Adapter_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Adapter_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Adapter_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Adapter_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Analytical_oM">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -47,14 +49,17 @@
<Reference Include="BHoM">
<HintPath>C:\ProgramData\BHoM\Assemblies\BHoM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BHoM_Adapter">
<HintPath>C:\ProgramData\BHoM\Assemblies\BHoM_Adapter.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BHoM_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\BHoM_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Data_oM">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -69,6 +74,7 @@
<Reference Include="Environment_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Environment_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Environment_oM">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -78,6 +84,7 @@
<Reference Include="Geometry_Engine">
<HintPath>C:\ProgramData\BHoM\Assemblies\Geometry_Engine.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Geometry_oM">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -100,16 +107,6 @@
<HintPath>..\packages\DynamicLanguageRuntime.1.1.2\lib\Net45\Microsoft.Scripting.Metadata.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Reflection_Engine">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\ProgramData\BHoM\Assemblies\Reflection_Engine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Reflection_oM">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\ProgramData\BHoM\Assemblies\Reflection_oM.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand Down
3 changes: 1 addition & 2 deletions IES_Engine/Convert/Environment/Opening.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
using System.Threading.Tasks;

using BH.oM.Geometry;
using BH.oM.Reflection.Attributes;
using BH.oM.Base.Attributes;
using System.ComponentModel;
using BH.Engine.Reflection;
using BH.oM.Environment.Elements;
using BH.Engine.Environment;
using BH.Engine.Geometry;
Expand Down
3 changes: 1 addition & 2 deletions IES_Engine/Convert/Environment/OpeningType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
using System.Threading.Tasks;

using BH.oM.Geometry;
using BH.oM.Reflection.Attributes;
using BH.oM.Base.Attributes;
using System.ComponentModel;
using BH.Engine.Reflection;
using BH.oM.Environment.Elements;
using BH.Engine.Environment;
using BH.Engine.Geometry;
Expand Down
5 changes: 2 additions & 3 deletions IES_Engine/Convert/Environment/Panel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
using System.Threading.Tasks;

using BH.oM.Geometry;
using BH.oM.Reflection.Attributes;
using BH.oM.Base.Attributes;
using System.ComponentModel;
using BH.Engine.Reflection;
using BH.oM.Environment.Elements;
using BH.Engine.Environment;
using BH.Engine.Geometry;
Expand All @@ -48,7 +47,7 @@ public static List<string> ToIESShading(this List<Panel> panelsAsShade, Settings
List<Panel> panels = panelsAsShade.Where(x => x.ExternalEdges.Count > 0).ToList();

if (panels.Count != panelsAsShade.Count)
BH.Engine.Reflection.Compute.RecordWarning("The panels for shading contain panels which did not contain geometry. Panels without valid geometry cannot be converted for IES to handle and have been ignored.");
BH.Engine.Base.Compute.RecordWarning("The panels for shading contain panels which did not contain geometry. Panels without valid geometry cannot be converted for IES to handle and have been ignored.");

List<string> gemPanel = new List<string>();

Expand Down
5 changes: 2 additions & 3 deletions IES_Engine/Convert/Environment/Space.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
using System.Threading.Tasks;

using BH.oM.Geometry;
using BH.oM.Reflection.Attributes;
using BH.oM.Base.Attributes;
using System.ComponentModel;
using BH.Engine.Reflection;
using BH.oM.Environment.Elements;
using BH.Engine.Environment;
using BH.Engine.Geometry;
Expand All @@ -48,7 +47,7 @@ public static List<string> ToIES(this List<Panel> panelsAsSpace, SettingsIES set
List<Panel> panels = panelsAsSpace.Where(x => x.ExternalEdges.Count > 0).ToList();

if (panels.Count != panelsAsSpace.Count)
BH.Engine.Reflection.Compute.RecordWarning("The space " + panelsAsSpace.ConnectedSpaceName() + " has panels which did not contain geometry. Panels without valid geometry cannot be converted for IES to handle and have been ignored.");
BH.Engine.Base.Compute.RecordWarning("The space " + panelsAsSpace.ConnectedSpaceName() + " has panels which did not contain geometry. Panels without valid geometry cannot be converted for IES to handle and have been ignored.");

List<string> gemSpace = new List<string>();

Expand Down
5 changes: 2 additions & 3 deletions IES_Engine/Convert/Geometry/Point.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
using System.Threading.Tasks;

using BH.oM.Geometry;
using BH.oM.Reflection.Attributes;
using BH.oM.Base.Attributes;
using System.ComponentModel;
using BH.Engine.Reflection;
using BH.oM.Environment.Elements;
using BH.Engine.Environment;
using BH.Engine.Geometry;
Expand Down Expand Up @@ -67,7 +66,7 @@ public static Point FromIES(this string iesPt, SettingsIES settingsIES)
}
catch(Exception e)
{
BH.Engine.Reflection.Compute.RecordError("An error occurred in parsing that IES string to a BHoM point. Error was: " + e.ToString());
BH.Engine.Base.Compute.RecordError("An error occurred in parsing that IES string to a BHoM point. Error was: " + e.ToString());
return null;
}
}
Expand Down
65 changes: 0 additions & 65 deletions IES_Engine/Create/SettingsIES.cs

This file was deleted.

12 changes: 1 addition & 11 deletions IES_Engine/IES_Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<Reference Include="Dimensional_oM">
<HintPath>C:\ProgramData\BHoM\Assemblies\Dimensional_oM.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Environment_Engine">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -74,16 +75,6 @@
<HintPath>C:\ProgramData\BHoM\Assemblies\Geometry_oM.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Reflection_Engine">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\ProgramData\BHoM\Assemblies\Reflection_Engine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Reflection_oM">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\ProgramData\BHoM\Assemblies\Reflection_oM.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -99,7 +90,6 @@
<Compile Include="Convert\Environment\Panel.cs" />
<Compile Include="Convert\Environment\Space.cs" />
<Compile Include="Convert\Geometry\Point.cs" />
<Compile Include="Create\SettingsIES.cs" />
<Compile Include="Modify\RepairOpening.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Query\Polyline.cs" />
Expand Down
4 changes: 2 additions & 2 deletions IES_Engine/Modify/RepairOpening.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using BH.Engine.Geometry;

using System.ComponentModel;
using BH.oM.Reflection.Attributes;
using BH.oM.Base.Attributes;

using BH.oM.Geometry.CoordinateSystem;

Expand Down Expand Up @@ -68,7 +68,7 @@ public static Opening RepairOpening(this Opening opening, Panel host, List<Panel

if(panelBottomRightReference == null || panelBottomLeftReference == null || panelTopRightReference == null)
{
BH.Engine.Reflection.Compute.RecordWarning("An error occurred in attempting to repair opening with GUID " + opening.BHoM_Guid + " hosted by the panel with GUID " + host.BHoM_Guid + " . The opening on this panel may not be correctly pulled and should be investigated.");
BH.Engine.Base.Compute.RecordWarning("An error occurred in attempting to repair opening with GUID " + opening.BHoM_Guid + " hosted by the panel with GUID " + host.BHoM_Guid + " . The opening on this panel may not be correctly pulled and should be investigated.");
return opening;
}

Expand Down
2 changes: 1 addition & 1 deletion IES_Engine/Query/Polyline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using System.Collections.Generic;
using System.Linq;

using BH.oM.Reflection.Attributes;
using BH.oM.Base.Attributes;
using System.ComponentModel;
using BH.Engine.Geometry;

Expand Down
18 changes: 0 additions & 18 deletions IES_Engine/Versioning_32.json

This file was deleted.

8 changes: 8 additions & 0 deletions IES_Engine/Versioning_51.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Namespace": {
},
"MessageForDeleted": {
"BH.Engine.Adapters.IES.Create.SettingsIES(System.Double)": "This method was replaced by the default constructor method for IES Settings. Please replace with that component.",
"BH.Engine.Adapters.IES.Create.SettingsIES(System.Double, System.Int32)" : "This method was replaced by the default constructor method for IES Settings. Please replace with that component."
}
}