diff --git a/TriangleNet_Engine/Compute/DelaunayTriangulation.cs b/TriangleNet_Engine/Compute/DelaunayTriangulation.cs index 547cdb8..241c78b 100644 --- a/TriangleNet_Engine/Compute/DelaunayTriangulation.cs +++ b/TriangleNet_Engine/Compute/DelaunayTriangulation.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -238,3 +238,4 @@ public static List DelaunayTriangulation(List points, Plane pla + diff --git a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/CustomObject.cs b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/CustomObject.cs index 8c99431..8162fa9 100644 --- a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/CustomObject.cs +++ b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/CustomObject.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -53,3 +53,4 @@ private static IGeometry GeometricalRepresentation(this CustomObject obj, Repres } } + diff --git a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element0D/Point.cs b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element0D/Point.cs index f240148..260cbba 100644 --- a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element0D/Point.cs +++ b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element0D/Point.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -57,3 +57,4 @@ public static IGeometry GeometricalRepresentation(this Point point, Representati } } + diff --git a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element0D/Structure/Node.cs b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element0D/Structure/Node.cs index 18b79b6..d834536 100644 --- a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element0D/Structure/Node.cs +++ b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element0D/Structure/Node.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -119,3 +119,4 @@ public static IGeometry GeometricalRepresentation(this Node node, Representation } } + diff --git a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element1D/ICurve.cs b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element1D/ICurve.cs index 816718c..351c7a5 100644 --- a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element1D/ICurve.cs +++ b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element1D/ICurve.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -55,3 +55,4 @@ public static IGeometry GeometricalRepresentation(this ICurve curve, Representat } } + diff --git a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element1D/Structure/Bar.cs b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element1D/Structure/Bar.cs index 2076673..ccd36b3 100644 --- a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element1D/Structure/Bar.cs +++ b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element1D/Structure/Bar.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -63,3 +63,4 @@ public static IGeometry GeometricalRepresentation(this Bar bar, RepresentationOp } } + diff --git a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element2D/Environment/Panel.cs b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element2D/Environment/Panel.cs index 68c8bd6..2b6bcc6 100644 --- a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element2D/Environment/Panel.cs +++ b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element2D/Environment/Panel.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -83,3 +83,4 @@ public static IGeometry GeometricalRepresentation(this BH.oM.Environment.Element } } + diff --git a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element2D/Structure/Panel.cs b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element2D/Structure/Panel.cs index 66d8840..0e8c27f 100644 --- a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element2D/Structure/Panel.cs +++ b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/Element2D/Structure/Panel.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -87,3 +87,4 @@ public static IGeometry GeometricalRepresentation(this Panel panel, Representati } } + diff --git a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/IGeometricalRepresentation.cs b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/IGeometricalRepresentation.cs index a196d56..102a39a 100644 --- a/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/IGeometricalRepresentation.cs +++ b/TriangleNet_Engine/Compute/Representation/GeometricalRepresentation/IGeometricalRepresentation.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -86,3 +86,4 @@ private static IGeometry GeometricalRepresentation(this IObject obj, Representat } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element1D/ICurve.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element1D/ICurve.cs index eb029cd..da08b5c 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element1D/ICurve.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element1D/ICurve.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -54,3 +54,4 @@ public static BH.oM.Graphics.RenderMesh RenderMesh(this ICurve curve, RenderMesh } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element2D/PlanarSurface.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element2D/PlanarSurface.cs index 1b26260..4880f3c 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element2D/PlanarSurface.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element2D/PlanarSurface.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -87,3 +87,4 @@ public static BH.oM.Graphics.RenderMesh RenderMesh(this PlanarSurface planarSurf } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/BoundingBox.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/BoundingBox.cs index fd70f1a..f0dba3a 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/BoundingBox.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/BoundingBox.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -60,3 +60,4 @@ public static BH.oM.Graphics.RenderMesh RenderMesh(this BoundingBox bbox, Render } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Cone.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Cone.cs index af79b72..3f3f106 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Cone.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Cone.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -91,3 +91,4 @@ public static BH.oM.Graphics.RenderMesh RenderMesh(this Cone cone, RenderMeshOpt } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Cuboid.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Cuboid.cs index 7e60e68..16762f1 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Cuboid.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Cuboid.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -156,3 +156,4 @@ private static BH.oM.Graphics.RenderMesh BoxRenderMesh(Point centrePoint, double } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Extrusion.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Extrusion.cs index 93392b9..f1c8c2f 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Extrusion.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Extrusion.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -130,3 +130,4 @@ public static BH.oM.Graphics.RenderMesh RenderMesh(this Extrusion extrusion, Ren } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Pipe.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Pipe.cs index cc0d9f5..0a2cdc1 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Pipe.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Pipe.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -123,3 +123,4 @@ public static BH.oM.Graphics.RenderMesh RenderMesh(this Pipe pipe, RenderMeshOpt } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Sphere.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Sphere.cs index dc6e754..d993a29 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Sphere.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Element3D/Sphere.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -140,3 +140,4 @@ public static BH.oM.Graphics.RenderMesh RenderMesh(this Sphere sphere, RenderMes } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/IRenderMesh.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/IRenderMesh.cs index b838f17..b2183b3 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/IRenderMesh.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/IRenderMesh.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -58,6 +58,9 @@ public static BH.oM.Graphics.RenderMesh IRenderMesh(this IObject obj, RenderMesh if (obj is BH.oM.Graphics.RenderMesh) return obj as BH.oM.Graphics.RenderMesh; + if (obj is RenderGeometry) + return RenderMesh(obj as RenderGeometry); + BH.oM.Geometry.Mesh mesh = obj as BH.oM.Geometry.Mesh; if (mesh != null) return mesh.ToRenderMesh(); @@ -84,3 +87,4 @@ private static BH.oM.Graphics.RenderMesh RenderMesh(this IGeometry geom, RenderM } } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/CompositeGeometry.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/CompositeGeometry.cs index dd7396e..36ed6b3 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/CompositeGeometry.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/CompositeGeometry.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -60,3 +60,4 @@ public static BH.oM.Graphics.RenderMesh RenderMesh(this CompositeGeometry compos } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/JoinMeshes.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/JoinMeshes.cs index 1ada671..f4661fc 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/JoinMeshes.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/JoinMeshes.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -68,3 +68,4 @@ public static Mesh JoinMeshes(List meshes) + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/JoinRenderMeshes.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/JoinRenderMeshes.cs index 29f84d0..e167536 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/JoinRenderMeshes.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/JoinRenderMeshes.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -78,3 +78,4 @@ public static RenderMesh JoinRenderMeshes(this RenderMesh a, RenderMesh b) + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/Utilities.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/Utilities.cs index c51573b..0c8669e 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/Utilities.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Other/Utilities.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -71,3 +71,4 @@ private static bool IsStraight(this ICurve curve) } + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Rationalise/IRationalise.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Rationalise/IRationalise.cs index 0844862..37b0152 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Rationalise/IRationalise.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Rationalise/IRationalise.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -60,3 +60,4 @@ private static Polyline Rationalise(this ICurve curve, RenderMeshOptions renderM + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/Rationalise/Rationalise.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/Rationalise/Rationalise.cs index ddfd83b..2aae506 100644 --- a/TriangleNet_Engine/Compute/Representation/RenderMesh/Rationalise/Rationalise.cs +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/Rationalise/Rationalise.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -161,3 +161,4 @@ public static Polyline Rationalise(this Circle circle, RenderMeshOptions renderM + diff --git a/TriangleNet_Engine/Compute/Representation/RenderMesh/RenderMesh.cs b/TriangleNet_Engine/Compute/Representation/RenderMesh/RenderMesh.cs new file mode 100644 index 0000000..6e7bd80 --- /dev/null +++ b/TriangleNet_Engine/Compute/Representation/RenderMesh/RenderMesh.cs @@ -0,0 +1,71 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2023, 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.Graphics; +using System; +using System.Drawing; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using BH.Engine.Geometry; +using BH.oM.Base; +using System.ComponentModel; +using BH.oM.Base.Attributes; + +namespace BH.Engine.Representation +{ + public static partial class Compute + { + /***************************************************/ + /**** Public Methods - Graphics ****/ + /***************************************************/ + + [Description("Returns the RenderMesh representation of an input RenderGeometry.")] + [Input("renderGeometry", "The RenderGeometry to get a RenderMesh from.")] + [Input("renderMeshOptions", "Options that regulate both the calculation of the Geometrical Representation and how it should be meshed.")] + [Output("A RenderMesh, which is a geometrical mesh that can potentially have additional attributes like Colours.")] + + public static BH.oM.Graphics.RenderMesh RenderMesh(this RenderGeometry renderGeometry, RenderMeshOptions renderMeshOptions = null) + { + if (renderGeometry == null) + { + BH.Engine.Base.Compute.RecordError($"Cannot compute the mesh of a null {nameof(RenderGeometry)} object."); + return null; + } + + renderMeshOptions = renderMeshOptions ?? new RenderMeshOptions(); + + RenderMesh renderMesh = IRenderMesh(renderGeometry.Geometry); + + foreach (RenderPoint vertice in renderMesh.Vertices) + { + vertice.Colour = renderGeometry.Colour; + } + + return renderMesh; + } + } +} + + diff --git a/TriangleNet_Engine/Compute/VoronoiRegions.cs b/TriangleNet_Engine/Compute/VoronoiRegions.cs index 6912269..b414398 100644 --- a/TriangleNet_Engine/Compute/VoronoiRegions.cs +++ b/TriangleNet_Engine/Compute/VoronoiRegions.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -643,3 +643,4 @@ private static Polyline CreateRegion(Point mid1, Point mid2, Vector perp) } + diff --git a/TriangleNet_Engine/Modify/Representation/RenderMesh/SetRendermesh.cs b/TriangleNet_Engine/Modify/Representation/RenderMesh/SetRendermesh.cs index be0fc6b..6dbaa67 100644 --- a/TriangleNet_Engine/Modify/Representation/RenderMesh/SetRendermesh.cs +++ b/TriangleNet_Engine/Modify/Representation/RenderMesh/SetRendermesh.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -99,3 +99,4 @@ private static IBHoMObject SetRendermesh(this IBHoMObject bHoMObject, object rep + diff --git a/TriangleNet_Engine/Properties/AssemblyInfo.cs b/TriangleNet_Engine/Properties/AssemblyInfo.cs index 55d98f2..84d7c05 100644 --- a/TriangleNet_Engine/Properties/AssemblyInfo.cs +++ b/TriangleNet_Engine/Properties/AssemblyInfo.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -55,6 +55,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.0.0")] +[assembly: AssemblyFileVersion("6.1.0.0")] + diff --git a/TriangleNet_Engine/Query/Representation/RenderMesh/TryGetRendermesh.cs b/TriangleNet_Engine/Query/Representation/RenderMesh/TryGetRendermesh.cs index afb3650..ed0ee10 100644 --- a/TriangleNet_Engine/Query/Representation/RenderMesh/TryGetRendermesh.cs +++ b/TriangleNet_Engine/Query/Representation/RenderMesh/TryGetRendermesh.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2022, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -56,3 +56,4 @@ public static bool TryGetRendermesh(this IBHoMObject bHoMObject, out RenderMesh + diff --git a/TriangleNet_Engine/TriangleNet_Engine.csproj b/TriangleNet_Engine/TriangleNet_Engine.csproj index 77ba149..2c97d33 100644 --- a/TriangleNet_Engine/TriangleNet_Engine.csproj +++ b/TriangleNet_Engine/TriangleNet_Engine.csproj @@ -1,4 +1,4 @@ - + @@ -118,6 +118,7 @@ + @@ -130,6 +131,7 @@ + @@ -180,4 +182,4 @@ xcopy "$(TargetDir)Triangle.dll" "C:\ProgramData\BHoM\Assemblies" /Y --> - + \ No newline at end of file