From 7dd0a09145db4e6088307aef13df3f03ca88e947 Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 13:30:44 +0000 Subject: [PATCH 1/9] removed deprecated NewElementXD methods, and moved NewInternalElement2D methods to Query class and folders --- .../IElement2D/NewInternalElement2D.cs | 2 +- Environment_Engine/Query/NewElement1D.cs | 80 ------------------- .../IElement2D/NewInternalElement2D.cs | 2 +- .../IElement/IElement1D/NewElement1D.cs | 69 ---------------- .../IElement2D/NewInternalElement2D.cs | 2 +- Spatial_Engine/Create/NewElement0D.cs | 52 ------------ Spatial_Engine/Create/NewElement1D.cs | 52 ------------ .../{Create => Query}/NewInternalElement2D.cs | 2 +- 8 files changed, 4 insertions(+), 257 deletions(-) rename Analytical_Engine/{Create => Query}/IElement2D/NewInternalElement2D.cs (98%) delete mode 100644 Environment_Engine/Query/NewElement1D.cs rename Geometry_Engine/{Create => Query}/IElement2D/NewInternalElement2D.cs (98%) delete mode 100644 Physical_Engine/Create/IElement/IElement1D/NewElement1D.cs rename Physical_Engine/{Create => Query}/IElement/IElement2D/NewInternalElement2D.cs (98%) delete mode 100644 Spatial_Engine/Create/NewElement0D.cs delete mode 100644 Spatial_Engine/Create/NewElement1D.cs rename Spatial_Engine/{Create => Query}/NewInternalElement2D.cs (98%) diff --git a/Analytical_Engine/Create/IElement2D/NewInternalElement2D.cs b/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs similarity index 98% rename from Analytical_Engine/Create/IElement2D/NewInternalElement2D.cs rename to Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs index 17e366b35..07b1634a4 100644 --- a/Analytical_Engine/Create/IElement2D/NewInternalElement2D.cs +++ b/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs @@ -31,7 +31,7 @@ namespace BH.Engine.Analytical { - public static partial class Create + public static partial class Query { /***************************************************/ /**** Public Methods ****/ diff --git a/Environment_Engine/Query/NewElement1D.cs b/Environment_Engine/Query/NewElement1D.cs deleted file mode 100644 index 1d7fa9d70..000000000 --- a/Environment_Engine/Query/NewElement1D.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Environment.Elements; -using BH.oM.Dimensional; -using BH.oM.Geometry; -using BH.Engine.Geometry; - -using BH.oM.Base.Attributes; -using System.ComponentModel; - -using BH.Engine.Base; - -namespace BH.Engine.Environment -{ - public static partial class Query - { - /***************************************************/ - /**** Public Methods ****/ - /***************************************************/ - - [ToBeRemoved("3.2", "Was used for incode purposes of defaulting elements, a task which is now achived by providing a ICurve to the SetOutlineElement1D.")] - [Description("Returns an instance of an IElement1D from the given object")] - [Input("opening", "An Environmental Opening object")] - [Input("curve", "The curve to clone")] - [Output("element", "A 1D element object")] - public static IElement1D NewElement1D(this Opening opening, ICurve curve) - { - return curve.DeepClone(); - } - - /***************************************************/ - - [ToBeRemoved("3.2", "Was used for incode purposes of defaulting elements, a task which is now achived by providing a ICurve to the SetOutlineElement1D.")] - [Description("Returns an instance of an IElement1D from the given object")] - [Input("panel", "An Environmental Panel object")] - [Input("curve", "The curve to clone")] - [Output("element", "A 1D element object")] - public static IElement1D NewElement1D(this Panel panel, ICurve curve) - { - return curve.DeepClone(); - } - - /***************************************************/ - - [ToBeRemoved("3.2", "Was used for incode purposes of defaulting elements, a task which is now achived by providing a ICurve to the SetOutlineElement1D.")] - [Description("Returns an instance of an IElement1D from the given object")] - [Input("space", "An Environment Space object")] - [Input("curve", "The curve to clone")] - [Output("element", "A 1D element object")] - public static IElement1D NewElement1D(this Space space, ICurve curve) - { - return curve.DeepClone(); - } - } -} - - - - - diff --git a/Geometry_Engine/Create/IElement2D/NewInternalElement2D.cs b/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs similarity index 98% rename from Geometry_Engine/Create/IElement2D/NewInternalElement2D.cs rename to Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs index 5558ee7ac..8da72b0f9 100644 --- a/Geometry_Engine/Create/IElement2D/NewInternalElement2D.cs +++ b/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs @@ -30,7 +30,7 @@ namespace BH.Engine.Geometry { - public static partial class Create + public static partial class Query { /***************************************************/ /**** Public Methods ****/ diff --git a/Physical_Engine/Create/IElement/IElement1D/NewElement1D.cs b/Physical_Engine/Create/IElement/IElement1D/NewElement1D.cs deleted file mode 100644 index b04342f53..000000000 --- a/Physical_Engine/Create/IElement/IElement1D/NewElement1D.cs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Geometry; -using BH.oM.Dimensional; -using BH.Engine.Geometry; -using BH.oM.Physical.Elements; -using System.ComponentModel; -using BH.oM.Base.Attributes; -using BH.Engine.Base; - -namespace BH.Engine.Physical -{ - public static partial class Create - { - /***************************************************/ - /**** Public Methods ****/ - /***************************************************/ - - [ToBeRemoved("3.2", "Was used for incode purposes of defaulting elements, a task which is now achived by providing a ICurve to the SetOutlineElement1D.")] - [Description("Creates a valid IElement1D which can be assigned to the ISurface.")] - [Input("surface", "The 2-dimensional element which a corresponding valid IElement1D is to be gotten from.")] - [Input("curve", "The geometrical location of the new IElement1D as a ICurve.")] - [Output("element1D", "a valid IElement1D of a type which can be assigned to the ISurface.")] - public static IElement1D NewElement1D(this oM.Physical.Elements.ISurface surface, ICurve curve) - { - return curve.DeepClone(); - } - - /***************************************************/ - - [ToBeRemoved("3.2", "Was used for incode purposes of defaulting elements, a task which is now achived by providing a ICurve to the SetOutlineElement1D.")] - [Description("Creates a valid IElement1D which can be assigned to the IOpening.")] - [Input("surface", "The 2-dimensional element which a corresponding valid IElement1D is to be gotten from.")] - [Input("curve", "The geometrical location of the new IElement1D as a ICurve.")] - [Output("element1D", "a valid IElement1D of a type which can be assigned to the IOpening.")] - public static IElement1D NewElement1D(this IOpening surface, ICurve curve) - { - return curve.DeepClone(); - } - - /***************************************************/ - - } -} - - - - - diff --git a/Physical_Engine/Create/IElement/IElement2D/NewInternalElement2D.cs b/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs similarity index 98% rename from Physical_Engine/Create/IElement/IElement2D/NewInternalElement2D.cs rename to Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs index 711340c02..2acf0404c 100644 --- a/Physical_Engine/Create/IElement/IElement2D/NewInternalElement2D.cs +++ b/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs @@ -28,7 +28,7 @@ namespace BH.Engine.Physical { - public static partial class Create + public static partial class Query { /***************************************************/ /**** Public Methods ****/ diff --git a/Spatial_Engine/Create/NewElement0D.cs b/Spatial_Engine/Create/NewElement0D.cs deleted file mode 100644 index 72b0cee71..000000000 --- a/Spatial_Engine/Create/NewElement0D.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Dimensional; -using BH.oM.Geometry; -using BH.oM.Base.Attributes; -using System.ComponentModel; - -namespace BH.Engine.Spatial -{ - public static partial class Create - { - /******************************************/ - /**** IElement1D ****/ - /******************************************/ - - [ToBeRemoved("3.2", "Was used for incode purposes of defaulting elements, a task which is now achived by providing a Point to the SetElement0D.")] - [Description("Creates a IElement0D of a type which can be assigned to the IElement1D at the location of the point.")] - [Input("element1D", "A IElement1D with a IElement0D type defined. The element is only used to identify the type of IElement0D to create, and will remain unchanged by this method.")] - [Input("point", "The point location of which to assign to the new IElement0D.")] - [Output("element0D", "A IElement0D which can be assigned to the IElement1D located at the point's location. Returns null if the IElement1D does not have a IElement0D type defined.")] - public static IElement0D INewElement0D(this IElement1D element1D, Point point) - { - return point; - } - - /******************************************/ - } -} - - - - diff --git a/Spatial_Engine/Create/NewElement1D.cs b/Spatial_Engine/Create/NewElement1D.cs deleted file mode 100644 index 7828affc4..000000000 --- a/Spatial_Engine/Create/NewElement1D.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Dimensional; -using BH.oM.Geometry; -using BH.oM.Base.Attributes; -using System.ComponentModel; - -namespace BH.Engine.Spatial -{ - public static partial class Create - { - /******************************************/ - /**** IElement2D ****/ - /******************************************/ - - [ToBeRemoved("3.2", "Was used for incode purposes of defaulting elements, a task which is now achived by providing a ICurve to the SetOutlineElement1D.")] - [Description("Creates a IElement1D of a type which can be assigned to the IElement2D at the location of the curve.")] - [Input("element2D", "A IElement2D of which to get the correct IElement1D type of. The element is only used to identify the type of IElement1D to create, and will remain unchanged by this method.")] - [Input("curve", "The curve location of which to assign to the new IElement1D.")] - [Output("element1D", "A IElement1D which can be assigned to the IElement2D located at the curve's location.")] - public static IElement1D INewElement1D(this IElement2D element2D, ICurve curve) - { - return curve; - } - - /******************************************/ - } -} - - - - diff --git a/Spatial_Engine/Create/NewInternalElement2D.cs b/Spatial_Engine/Query/NewInternalElement2D.cs similarity index 98% rename from Spatial_Engine/Create/NewInternalElement2D.cs rename to Spatial_Engine/Query/NewInternalElement2D.cs index 45b76c31a..f3fc4986c 100644 --- a/Spatial_Engine/Create/NewInternalElement2D.cs +++ b/Spatial_Engine/Query/NewInternalElement2D.cs @@ -27,7 +27,7 @@ namespace BH.Engine.Spatial { - public static partial class Create + public static partial class Query { /******************************************/ /**** IElement2D ****/ From 67076fac860c1e77e7af38ef1f65c073852cd82d Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 13:49:23 +0000 Subject: [PATCH 2/9] make compile work --- .../Create/IElement1D/NewElement1D.cs | 60 ------------------- .../Create/IElement2D/NewInternalElement2D.cs | 51 ---------------- 2 files changed, 111 deletions(-) delete mode 100644 Environment_Engine/Create/IElement1D/NewElement1D.cs delete mode 100644 Environment_Engine/Create/IElement2D/NewInternalElement2D.cs diff --git a/Environment_Engine/Create/IElement1D/NewElement1D.cs b/Environment_Engine/Create/IElement1D/NewElement1D.cs deleted file mode 100644 index 45857dbd0..000000000 --- a/Environment_Engine/Create/IElement1D/NewElement1D.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Environment.Elements; -using BH.oM.Dimensional; -using BH.oM.Geometry; -using BH.Engine.Geometry; - -using BH.oM.Base.Attributes; -using System.ComponentModel; - -namespace BH.Engine.Environment -{ - public static partial class Create - { - /***************************************************/ - /**** Public Methods ****/ - /***************************************************/ - - [Replaced("3.2", "Method moved to query", typeof(BH.Engine.Environment.Query), "NewElement1D(BH.oM.Environment.Elements.Opening, BH.oM.Geometry.ICurve)")] - public static IElement1D NewElement1D(this Opening opening, ICurve curve) - { - return Query.NewElement1D(opening, curve); - } - - /***************************************************/ - - [Replaced("3.2", "Method moved to query", typeof(BH.Engine.Environment.Query), "NewElement1D(BH.oM.Environment.Elements.Panel, BH.oM.Geometry.ICurve)")] - public static IElement1D NewElement1D(this Panel panel, ICurve curve) - { - return Query.NewElement1D(panel, curve); - } - - /***************************************************/ - } -} - - - - - diff --git a/Environment_Engine/Create/IElement2D/NewInternalElement2D.cs b/Environment_Engine/Create/IElement2D/NewInternalElement2D.cs deleted file mode 100644 index 0f6e6ebf7..000000000 --- a/Environment_Engine/Create/IElement2D/NewInternalElement2D.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Environment.Elements; -using BH.oM.Dimensional; -using BH.oM.Geometry; - -using BH.oM.Base.Attributes; -using System.ComponentModel; - -namespace BH.Engine.Environment -{ - public static partial class Create - { - /***************************************************/ - /**** Public Methods ****/ - /***************************************************/ - - [Replaced("3.2", "Method moved to query", typeof(BH.Engine.Environment.Query), "NewElement2D(BH.oM.Environment.Elements.Panel)")] - public static IElement2D NewInternalElement2D(this Panel panel) - { - return new Opening(); - } - - /***************************************************/ - } -} - - - - - From 39150df62f16c84453fea9d5d56e09d9e2d16133 Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 13:59:44 +0000 Subject: [PATCH 3/9] added versioning for environment engine --- Environment_Engine/Versioning71.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Environment_Engine/Versioning71.json diff --git a/Environment_Engine/Versioning71.json b/Environment_Engine/Versioning71.json new file mode 100644 index 000000000..bdd6cff13 --- /dev/null +++ b/Environment_Engine/Versioning71.json @@ -0,0 +1,7 @@ +{ + "MessageForDeleted": { + "BH.Engine.Environment.Query.NewElement1D(BH.oM.Environment.Elements.Opening, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", + "BH.Engine.Environment.Query.NewElement1D(BH.oM.Environment.Elements.Panel, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", + "BH.Engine.Environment.Query.NewElement1D(BH.oM.Environment.Elements.Space, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." + } +} \ No newline at end of file From 2462fd07b265ca4bcc649ad2a0a62d1f77bb173d Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 14:31:01 +0000 Subject: [PATCH 4/9] versioning for analytical, geometry and physical engines --- Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs | 1 + Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs | 1 + .../Query/IElement/IElement2D/NewInternalElement2D.cs | 1 + Physical_Engine/Versioning71.json | 6 ++++++ 4 files changed, 9 insertions(+) create mode 100644 Physical_Engine/Versioning71.json diff --git a/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs b/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs index 07b1634a4..af71c4cb8 100644 --- a/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs +++ b/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs @@ -41,6 +41,7 @@ public static partial class Query "Method required for any IElement2D that contians internal IElement2Ds.")] [Input("panel", "Panel just used to determine the appropriate type of IElement2D to create.")] [Output("opening", "The created Opening as a IElement2D.")] + [PreviousVersion("7.0", "BH.Engine.Analytical.Create.NewInternalElement2D(BH.oM.Analytical.Elements.IPanel>)")] public static IElement2D NewInternalElement2D(this IPanel panel) where TEdge : IEdge where TOpening : IOpening diff --git a/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs b/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs index 8da72b0f9..460b691e6 100644 --- a/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs +++ b/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs @@ -40,6 +40,7 @@ public static partial class Query "Method required for any IElement2D that contians internal IElement2Ds.")] [Input("surface", "PlanarSurface just used to determine the appropriate type of IElement2D to create.")] [Output("opening", "The created Opening as a IElement2D.")] + [PreviousVersion("7.0", "BH.Engine.Geometry.Create.NewInternalElement2D(BH.oM.Geometry.PlanarSurface)")] public static IElement2D NewInternalElement2D(this PlanarSurface surface) { return new PlanarSurface(null, new System.Collections.Generic.List()); diff --git a/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs b/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs index 2acf0404c..7ae2a3052 100644 --- a/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs +++ b/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs @@ -37,6 +37,7 @@ public static partial class Query [Description("Creates a valid IElement2D which can be assigned as an internal element to the ISurface")] [Input("surface", "The 2-dimensional element which a valid corresponding internal element is to be gotten from")] [Output("element2D", "a Void which can be assigned as an internal element to a ISurface")] + [PreviousVersion("7.0", "BH.Engine.Physical.Create.NewInternalElement2D(BH.oM.Physical.Elements.ISurface)")] public static IElement2D NewInternalElement2D(this oM.Physical.Elements.ISurface surface) { Engine.Base.Compute.RecordNote("The ISurface's IOpening may have been modified and replaced, if so the new IOpening has been set as a Void"); diff --git a/Physical_Engine/Versioning71.json b/Physical_Engine/Versioning71.json new file mode 100644 index 000000000..1fc8ef8d1 --- /dev/null +++ b/Physical_Engine/Versioning71.json @@ -0,0 +1,6 @@ +{ + "MessageForDeleted": { + "BH.Engine.Physical.Create.NewElement1D(BH.oM.Physical.Elements.ISurface, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", + "BH.Engine.Physical.Create.NewElement1D(BH.oM.Physical.Elements.IOpening, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." + } +} \ No newline at end of file From 420f506356cae98cd2c2674a7269ae48500c71a9 Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 14:36:51 +0000 Subject: [PATCH 5/9] added versioning for spatial engine --- Spatial_Engine/Query/NewInternalElement2D.cs | 1 + Spatial_Engine/Versioning71.json | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 Spatial_Engine/Versioning71.json diff --git a/Spatial_Engine/Query/NewInternalElement2D.cs b/Spatial_Engine/Query/NewInternalElement2D.cs index f3fc4986c..1ccaa2250 100644 --- a/Spatial_Engine/Query/NewInternalElement2D.cs +++ b/Spatial_Engine/Query/NewInternalElement2D.cs @@ -36,6 +36,7 @@ public static partial class Query [Description("Creates a IElement2D of a type which can be assigned to the IElement2D.")] [Input("element2D", "A IElement2D with a internal IElement2D type defined. The element is only used to identify the type of internal IElement2D to create, and will remain unchanged by this method.")] [Output("element2D", "A internal IElement2D which can be assigned to the IElement2D. Returns null if the IElement2D does not have a type of internal IElement2D.")] + [PreviousVersion("7.0", "BH.Engine.Spatial.Create.NewInternalElement2D(BH.oM.Dimentional.IElement2D)")] public static IElement2D INewInternalElement2D(this IElement2D element2D) { return Base.Compute.RunExtensionMethod(element2D, "NewInternalElement2D") as IElement2D; diff --git a/Spatial_Engine/Versioning71.json b/Spatial_Engine/Versioning71.json new file mode 100644 index 000000000..797f23a9a --- /dev/null +++ b/Spatial_Engine/Versioning71.json @@ -0,0 +1,6 @@ +{ + "MessageForDeleted": { + "BH.Engine.Spatial.Create.INewElement0D(BH.oM.Dimensional.IElement1D, BH.oM.Geometry.Point)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", + "BH.Engine.Spatial.Create.INewElement1D(BH.oM.Dimensional.IElement2D, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." + } +} \ No newline at end of file From bcf7e397dc666f1f69477b63dfb658f240a8027b Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 14:52:15 +0000 Subject: [PATCH 6/9] apparently I forgot which version we're on :facepalm: --- Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs | 2 +- Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs | 2 +- .../Query/IElement/IElement2D/NewInternalElement2D.cs | 2 +- Spatial_Engine/Query/NewInternalElement2D.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs b/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs index af71c4cb8..01d6b89a5 100644 --- a/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs +++ b/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs @@ -41,7 +41,7 @@ public static partial class Query "Method required for any IElement2D that contians internal IElement2Ds.")] [Input("panel", "Panel just used to determine the appropriate type of IElement2D to create.")] [Output("opening", "The created Opening as a IElement2D.")] - [PreviousVersion("7.0", "BH.Engine.Analytical.Create.NewInternalElement2D(BH.oM.Analytical.Elements.IPanel>)")] + [PreviousVersion("7.1", "BH.Engine.Analytical.Create.NewInternalElement2D(BH.oM.Analytical.Elements.IPanel>)")] public static IElement2D NewInternalElement2D(this IPanel panel) where TEdge : IEdge where TOpening : IOpening diff --git a/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs b/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs index 460b691e6..0ba37b8b7 100644 --- a/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs +++ b/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs @@ -40,7 +40,7 @@ public static partial class Query "Method required for any IElement2D that contians internal IElement2Ds.")] [Input("surface", "PlanarSurface just used to determine the appropriate type of IElement2D to create.")] [Output("opening", "The created Opening as a IElement2D.")] - [PreviousVersion("7.0", "BH.Engine.Geometry.Create.NewInternalElement2D(BH.oM.Geometry.PlanarSurface)")] + [PreviousVersion("7.1", "BH.Engine.Geometry.Create.NewInternalElement2D(BH.oM.Geometry.PlanarSurface)")] public static IElement2D NewInternalElement2D(this PlanarSurface surface) { return new PlanarSurface(null, new System.Collections.Generic.List()); diff --git a/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs b/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs index 7ae2a3052..5e76b7ad5 100644 --- a/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs +++ b/Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs @@ -37,7 +37,7 @@ public static partial class Query [Description("Creates a valid IElement2D which can be assigned as an internal element to the ISurface")] [Input("surface", "The 2-dimensional element which a valid corresponding internal element is to be gotten from")] [Output("element2D", "a Void which can be assigned as an internal element to a ISurface")] - [PreviousVersion("7.0", "BH.Engine.Physical.Create.NewInternalElement2D(BH.oM.Physical.Elements.ISurface)")] + [PreviousVersion("7.1", "BH.Engine.Physical.Create.NewInternalElement2D(BH.oM.Physical.Elements.ISurface)")] public static IElement2D NewInternalElement2D(this oM.Physical.Elements.ISurface surface) { Engine.Base.Compute.RecordNote("The ISurface's IOpening may have been modified and replaced, if so the new IOpening has been set as a Void"); diff --git a/Spatial_Engine/Query/NewInternalElement2D.cs b/Spatial_Engine/Query/NewInternalElement2D.cs index 1ccaa2250..1b553df67 100644 --- a/Spatial_Engine/Query/NewInternalElement2D.cs +++ b/Spatial_Engine/Query/NewInternalElement2D.cs @@ -36,7 +36,7 @@ public static partial class Query [Description("Creates a IElement2D of a type which can be assigned to the IElement2D.")] [Input("element2D", "A IElement2D with a internal IElement2D type defined. The element is only used to identify the type of internal IElement2D to create, and will remain unchanged by this method.")] [Output("element2D", "A internal IElement2D which can be assigned to the IElement2D. Returns null if the IElement2D does not have a type of internal IElement2D.")] - [PreviousVersion("7.0", "BH.Engine.Spatial.Create.NewInternalElement2D(BH.oM.Dimentional.IElement2D)")] + [PreviousVersion("7.1", "BH.Engine.Spatial.Create.NewInternalElement2D(BH.oM.Dimensional.IElement2D)")] public static IElement2D INewInternalElement2D(this IElement2D element2D) { return Base.Compute.RunExtensionMethod(element2D, "NewInternalElement2D") as IElement2D; From bbc9fb5438aefb6ca50f6b8000d0be623fc6d400 Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 15:18:13 +0000 Subject: [PATCH 7/9] fix versioning file names --- .../{Versioning71.json => Versioning_71.json} | 0 Physical_Engine/{Versioning71.json => Versioning_71.json} | 0 Spatial_Engine/Query/NewInternalElement2D.cs | 2 +- Spatial_Engine/Versioning71.json | 6 ------ Spatial_Engine/Versioning_71.json | 4 +++- 5 files changed, 4 insertions(+), 8 deletions(-) rename Environment_Engine/{Versioning71.json => Versioning_71.json} (100%) rename Physical_Engine/{Versioning71.json => Versioning_71.json} (100%) delete mode 100644 Spatial_Engine/Versioning71.json diff --git a/Environment_Engine/Versioning71.json b/Environment_Engine/Versioning_71.json similarity index 100% rename from Environment_Engine/Versioning71.json rename to Environment_Engine/Versioning_71.json diff --git a/Physical_Engine/Versioning71.json b/Physical_Engine/Versioning_71.json similarity index 100% rename from Physical_Engine/Versioning71.json rename to Physical_Engine/Versioning_71.json diff --git a/Spatial_Engine/Query/NewInternalElement2D.cs b/Spatial_Engine/Query/NewInternalElement2D.cs index 1b553df67..ba6d254e6 100644 --- a/Spatial_Engine/Query/NewInternalElement2D.cs +++ b/Spatial_Engine/Query/NewInternalElement2D.cs @@ -36,7 +36,7 @@ public static partial class Query [Description("Creates a IElement2D of a type which can be assigned to the IElement2D.")] [Input("element2D", "A IElement2D with a internal IElement2D type defined. The element is only used to identify the type of internal IElement2D to create, and will remain unchanged by this method.")] [Output("element2D", "A internal IElement2D which can be assigned to the IElement2D. Returns null if the IElement2D does not have a type of internal IElement2D.")] - [PreviousVersion("7.1", "BH.Engine.Spatial.Create.NewInternalElement2D(BH.oM.Dimensional.IElement2D)")] + [PreviousVersion("7.1", "BH.Engine.Spatial.Create.INewInternalElement2D(BH.oM.Dimensional.IElement2D)")] public static IElement2D INewInternalElement2D(this IElement2D element2D) { return Base.Compute.RunExtensionMethod(element2D, "NewInternalElement2D") as IElement2D; diff --git a/Spatial_Engine/Versioning71.json b/Spatial_Engine/Versioning71.json deleted file mode 100644 index 797f23a9a..000000000 --- a/Spatial_Engine/Versioning71.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "MessageForDeleted": { - "BH.Engine.Spatial.Create.INewElement0D(BH.oM.Dimensional.IElement1D, BH.oM.Geometry.Point)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", - "BH.Engine.Spatial.Create.INewElement1D(BH.oM.Dimensional.IElement2D, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." - } -} \ No newline at end of file diff --git a/Spatial_Engine/Versioning_71.json b/Spatial_Engine/Versioning_71.json index 98da4043f..bf1687db6 100644 --- a/Spatial_Engine/Versioning_71.json +++ b/Spatial_Engine/Versioning_71.json @@ -29,7 +29,9 @@ }, "MessageForDeleted": { "BH.Engine.Spatial.Query.Area(BH.oM.Dimensional.IElement0D)": "Querying the area of a 0 diemnsional is not possible. The method was added in error and should not have been available. Area methods are suitable for 2D objects and above.", - "BH.Engine.Spatial.Query.Area(BH.oM.Dimensional.IElement1D)": "Area of an IElement1D cannot be queried because IElement1D has only 1 dimension, i.e. should not be represented as a region even if closed. Method has been removed to avoid confusion." + "BH.Engine.Spatial.Query.Area(BH.oM.Dimensional.IElement1D)": "Area of an IElement1D cannot be queried because IElement1D has only 1 dimension, i.e. should not be represented as a region even if closed. Method has been removed to avoid confusion.", + "BH.Engine.Spatial.Create.INewElement0D(BH.oM.Dimensional.IElement1D, BH.oM.Geometry.Point)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", + "BH.Engine.Spatial.Create.INewElement1D(BH.oM.Dimensional.IElement2D, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." }, "MessageForNoUpgrade": { From bf31c399c082e881efa66ef1c8ae2854924db8db Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 15:55:42 +0000 Subject: [PATCH 8/9] added versioning for environment create methods --- Environment_Engine/Versioning_71.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Environment_Engine/Versioning_71.json b/Environment_Engine/Versioning_71.json index bdd6cff13..d4fd2a888 100644 --- a/Environment_Engine/Versioning_71.json +++ b/Environment_Engine/Versioning_71.json @@ -2,6 +2,9 @@ "MessageForDeleted": { "BH.Engine.Environment.Query.NewElement1D(BH.oM.Environment.Elements.Opening, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", "BH.Engine.Environment.Query.NewElement1D(BH.oM.Environment.Elements.Panel, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", - "BH.Engine.Environment.Query.NewElement1D(BH.oM.Environment.Elements.Space, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." + "BH.Engine.Environment.Query.NewElement1D(BH.oM.Environment.Elements.Space, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", + "BH.Engine.Environment.Create.NewElement1D(BH.oM.Environment.Elements.Opening, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", + "BH.Engine.Environment.Create.NewElement1D(BH.oM.Environment.Elements.Panel, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", + "BH.Engine.Environment.Create.NewInternalElement2D(BH.oMEnvironment.Elements.Panel)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." } } \ No newline at end of file From a996b539d40a7b54aad8a2ad6a0374e55fe2c22a Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Fri, 12 Jan 2024 16:18:01 +0000 Subject: [PATCH 9/9] I forgot a single full stop. --- Environment_Engine/Versioning_71.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Environment_Engine/Versioning_71.json b/Environment_Engine/Versioning_71.json index d4fd2a888..7b4e80715 100644 --- a/Environment_Engine/Versioning_71.json +++ b/Environment_Engine/Versioning_71.json @@ -5,6 +5,6 @@ "BH.Engine.Environment.Query.NewElement1D(BH.oM.Environment.Elements.Space, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", "BH.Engine.Environment.Create.NewElement1D(BH.oM.Environment.Elements.Opening, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", "BH.Engine.Environment.Create.NewElement1D(BH.oM.Environment.Elements.Panel, BH.oM.Geometry.ICurve)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed.", - "BH.Engine.Environment.Create.NewInternalElement2D(BH.oMEnvironment.Elements.Panel)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." + "BH.Engine.Environment.Create.NewInternalElement2D(BH.oM.Environment.Elements.Panel)": "NewElement methods were refactored in BHoM 3.2 with these methods marked for deletion, and have now been removed." } } \ No newline at end of file