diff --git a/Analytical_Engine/Create/IElement2D/NewInternalElement2D.cs b/Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs similarity index 90% rename from Analytical_Engine/Create/IElement2D/NewInternalElement2D.cs rename to Analytical_Engine/Query/IElement2D/NewInternalElement2D.cs index 17e366b35..01d6b89a5 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 ****/ @@ -41,6 +41,7 @@ public static partial class Create "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.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/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(); - } - - /***************************************************/ - } -} - - - - - 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/Environment_Engine/Versioning_71.json b/Environment_Engine/Versioning_71.json new file mode 100644 index 000000000..7b4e80715 --- /dev/null +++ b/Environment_Engine/Versioning_71.json @@ -0,0 +1,10 @@ +{ + "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.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.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 diff --git a/Geometry_Engine/Create/IElement2D/NewInternalElement2D.cs b/Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs similarity index 94% rename from Geometry_Engine/Create/IElement2D/NewInternalElement2D.cs rename to Geometry_Engine/Query/IElement2D/NewInternalElement2D.cs index 5558ee7ac..0ba37b8b7 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 ****/ @@ -40,6 +40,7 @@ public static partial class Create "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.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/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 94% rename from Physical_Engine/Create/IElement/IElement2D/NewInternalElement2D.cs rename to Physical_Engine/Query/IElement/IElement2D/NewInternalElement2D.cs index 711340c02..5e76b7ad5 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 ****/ @@ -37,6 +37,7 @@ public static partial class Create [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.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/Physical_Engine/Versioning_71.json b/Physical_Engine/Versioning_71.json new file mode 100644 index 000000000..1fc8ef8d1 --- /dev/null +++ b/Physical_Engine/Versioning_71.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 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 94% rename from Spatial_Engine/Create/NewInternalElement2D.cs rename to Spatial_Engine/Query/NewInternalElement2D.cs index 45b76c31a..ba6d254e6 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 ****/ @@ -36,6 +36,7 @@ public static partial class Create [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.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/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": {