Skip to content

BH.oM.Geometry.PlanarSurface

A surface defined by boundary edge curves lying in a common plane. Planarity toleraces default to the BH.oM.Geometry.Tolerace.Distance.

Class structure

Implemented interfaces and base types

The PlanarSurface is inheriting from the following base type(s) and implements the following interfaces:

Properties

Defining properties

The following properties are defined on the class

Name Type Description Quantity
ExternalBoundary ICurve Closed planar curve defining the outer boundary of the surface. -
InternalBoundaries List<ICurve> List of closed (co)planar curves defining any internal openings in the surface. -

Derived properties

The following properties are defined as extension methods in one of the BHoM_Engines

Name Type Description Quantity Engine
Area double Calculates the area of the provided geometry. Area [m²] Geometry_Engine
Area double Queries the IElement2Ds area defined as the area confined by the outline curves subtracting the area of the internal elements. Area [m²] Spatial_Engine
Bounds BoundingBox Returns the global world axis oriented enclosing BoundingBox for all points on the surface, i.e. the box with the smallest volume within which all the surface points lie. - Geometry_Engine
Bounds BoundingBox Queries the IElement2Ds BoundingBox. Acts on the element curve definition of the IElement2D through the Geometry_Engine. - Spatial_Engine
Centroid Point Queries the centre of area for a IElement2Ds surface representation. For an IElement2D with homogeneous material and thickness this will also be the centre of weight. - Spatial_Engine
Centroid Point Queries the centre of area for a PlanarSurface. - Geometry_Engine
ControlPoints List<Point> Queries the control points of the element curve representation of the IElement2D. - Spatial_Engine
DominantVector Vector Gets the the dominant vector (orientation) of an Element2D based on its lines lengths. - Spatial_Engine
Edges List<ICurve> - - Geometry_Engine
ElementCurves List<ICurve> Queries the geometricly defining curves of the IElement2Ds surface. - Spatial_Engine
ElementVertices List<Point> Returns the discontinuity points from the defining ICurves of the IElement2D. - Spatial_Engine
ExternalEdges List<ICurve> Gets the external edge curves of the PlanarSurface as its ExternalBoundary. - Geometry_Engine
ExternalElementCurves List<ICurve> Queries the geometricly defining external curves of the IElement2Ds surface. - Spatial_Engine
GeometryHash string Returns a signature of the input geometry, useful for diffing.
The hash is computed as a serialised array representing the coordinate of significant points taken on the geometry.
The number of points is reduced to the minimum essential to determine uniquely any geometry.
Additionally, the resulting points are transformed based on the source geometry type, to remove or minimize collisions.
(Any transformation so performed is translational only, in order to support geometrical tolerance, i.e. numerical distance, when comparing GeometryHashes downstream).
- Geometry_Engine
IArea double Queries the area of the geometrical representation of an IElement. Area [m²] Spatial_Engine
IArea double Calculates the area of the provided geometry. Area [m²] Geometry_Engine
IBounds BoundingBox Queries the IElements BoundingBox. Acts on the elements geometrical definition of the IElement through the Geometry_Engine. - Spatial_Engine
IBounds BoundingBox Returns the global world axis oriented enclosing BoundingBox for all points of the geometry, i.e. the box with the smallest volume within which all the points on the geometry lie. - Geometry_Engine
ICentroid Point Queries the centre of weight for the homogeneous geometrical representation of an IElement. - Spatial_Engine
IControlPoints List<Point> Queries the control points of the geometrical representation of an IElement. - Spatial_Engine
IElementCurves List<ICurve> Queries the geometricly defining curves of the IElements geometry. - Spatial_Engine
IElementVertices List<Point> Returns the discontinuity points from the defining ICurves of the IElement. - Spatial_Engine
IExternalEdges List<ICurve> Gets the external edge curves of the ISurface. - Geometry_Engine
IHashArray double[] Returns a signature of the input geometry, useful for distance-based comparisons and diffing.
The hash is computed as an array representing the coordinate of significant points taken on the geometry.
The number of points is reduced to the minimum essential to determine uniquely any geometry.
Additionally, the resulting points are transformed based on the source geometry type, to remove or minimize collisions.
(Any transformation so performed is translational only, in order to support geometrical tolerance, i.e. numerical distance, when comparing GeometryHashes downstream).
- Geometry_Engine
IInternalEdges List<ICurve> - - Geometry_Engine
IInternalElements2D List<IElement2D> Queries the IElement2Ds internal IElement2Ds. Returns a empty list for objects without definied internal elements - Spatial_Engine
IIsPlanar bool Checks whether all control points of an element lie in a single plane. - Spatial_Engine
IIsPlanar bool Checks if the IGeometry is planar, i.e. all of its parts fit in a single plane. - Geometry_Engine
IIsSelfIntersecting bool Checks if any of the curves defining an IElement is closer to itself than the tolerance at any two points (is self intersecting). In case of IElement2D, does not check for intersections between external and internal curves, or between different internal curves. - Spatial_Engine
IIsValid bool - - Geometry_Engine
INewInternalElement2D IElement2D Creates a IElement2D of a type which can be assigned to the IElement2D. - Spatial_Engine
INormals List<Vector> Interface method that returns the list of vectors normal to any IGeometry. - Geometry_Engine
InternalEdges List<ICurve> - - Geometry_Engine
InternalElementCurves List<ICurve> Queries the geometricly defining internal curves, such as Openings, of the IElement2Ds surface. - Spatial_Engine
InternalElements2D List<IElement2D> Gets inner IElement2Ds from a PlanarSurface. Method required for all IElement2Ds.
For a PlanarSurface this method will return a list of new PlanarSurfaces with ExternalBoundary corresponding to the InternalBoundaries of the PlanarSurface being queried.
- Geometry_Engine
InternalOutlineCurves List<PolyCurve> Queries the IElement2Ds internal IElement2Ds outline curves. - Spatial_Engine
IOutlineElements1D List<IElement1D> Returns every IElement1D which makes up the exterior perimeter of the IElement2D. - Spatial_Engine
IPrimaryPropertyName string Returns the name of an elements primary defining construction property - Facade_Engine
IsNull bool Checks if a Geometry is null and outputs relevant error message. - Geometry_Engine
IsPlanar bool Checks whether all control points of an element lie in a single plane. - Spatial_Engine
IsPlanar bool Checks if the PlanarSurface is planar, i.e. all of its parts fit in a single plane. A PlanarSurface is ensured to be planar at creation, why this method always returns true if the default tolerance is provided. For other tolerances the method returns true if the controlpoints of external and internal boundaries are co-planar within tolerance. - Geometry_Engine
IsSelfIntersecting bool Checks if any of the element curves of the IElement2D is closer to itself than the tolerance at any two points. Does not check for intersections between external and internal curves, or between different internal curves. - Spatial_Engine
ISubParts IEnumerable<IGeometry> - - Geometry_Engine
ISubParts IEnumerable<ISurface> - - Geometry_Engine
IsValid bool - - Geometry_Engine
NewInternalElement2D IElement2D Creates a a new PlanarSurface that can be used as internal element for another PlanarSurface. The resulting PlanarSurface will have a null ExternalBoundary and empty list of InternalBoundaries. The resulting PlanarSurface is casted to IElement2D for generalization purposes.
Method required for any IElement2D that contians internal IElement2Ds.
- Geometry_Engine
Normal Vector Returns a vector normal to the planar surface. - Geometry_Engine
Normal Vector Returns the normal to the IElement2D which is perpendicular to its plane and oriented according to the right hand rule in relation to the outline curve. - Spatial_Engine
OutlineCurve PolyCurve Returns a single polycurve outline created from the external elements. - Spatial_Engine
OutlineElements1D List<IElement1D> Gets the edge elements from an PlanarSurface defining the boundary of the element. Method required for all IElement2Ds.
For an PlanarSurface this will return a list of its Curves coresponding to the SubParts of the ExternalBoundary of the PlanarSurface.
- Geometry_Engine

Code and Schema

C# implementation

C#
public class PlanarSurface : BH.oM.Geometry.ISurface,
BH.oM.Geometry.IGeometry,
BH.oM.Base.IObject,
BH.oM.Base.IImmutable,
BH.oM.Dimensional.IElement2D,
BH.oM.Dimensional.IElement

Assembly: Geometry_oM.dll

The C# class definition is available on github:

All history and changes of the class can be found by inspection the history.

JSON Schema implementation

The object is defined as a JSON schema. You can validate a JSON instance against this schema by reference. To do this, use the schema reference below in a validator like this one.

JSON Schema
{
 "$ref" : "https://raw.githubusercontent.com/BHoM/BHoM_JSONSchema/develop/Geometry_oM/PlanarSurface.json"
}

The JSON Schema is available on github here:

Example JSON instance

Example JSON instance of type PlanarSurface.

Example JSON
{
  "_t": "BH.oM.Geometry.PlanarSurface",
  "ExternalBoundary": {
    "_t": "BH.oM.Geometry.Polygon",
    "Vertices": {
      "_t": "System.Collections.ObjectModel.ReadOnlyCollection\u00601[[BH.oM.Geometry.Point, Geometry_oM, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null]]",
      "_v": [
        {
          "_t": "BH.oM.Geometry.Point",
          "X": -4.0,
          "Y": -6.0,
          "Z": 0.0
        },
        {
          "_t": "BH.oM.Geometry.Point",
          "X": 4.0,
          "Y": -6.0,
          "Z": 0.0
        },
        {
          "_t": "BH.oM.Geometry.Point",
          "X": 4.0,
          "Y": 5.0,
          "Z": 0.0
        },
        {
          "_t": "BH.oM.Geometry.Point",
          "X": -4.0,
          "Y": 5.0,
          "Z": 0.0
        }
      ]
    }
  },
  "InternalBoundaries": [
    {
      "_t": "BH.oM.Geometry.Polygon",
      "Vertices": {
        "_t": "System.Collections.ObjectModel.ReadOnlyCollection\u00601[[BH.oM.Geometry.Point, Geometry_oM, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null]]",
        "_v": [
          {
            "_t": "BH.oM.Geometry.Point",
            "X": 1.0,
            "Y": -2.0,
            "Z": 0.0
          },
          {
            "_t": "BH.oM.Geometry.Point",
            "X": 1.0,
            "Y": -4.0,
            "Z": 0.0
          },
          {
            "_t": "BH.oM.Geometry.Point",
            "X": 3.0,
            "Y": -4.0,
            "Z": 0.0
          },
          {
            "_t": "BH.oM.Geometry.Point",
            "X": 3.0,
            "Y": -2.0,
            "Z": 0.0
          }
        ]
      }
    },
    {
      "_t": "BH.oM.Geometry.Circle",
      "Centre": {
        "_t": "BH.oM.Geometry.Point",
        "X": -2.0,
        "Y": 1.0,
        "Z": 0.0
      },
      "Normal": {
        "_t": "BH.oM.Geometry.Vector",
        "X": 0.0,
        "Y": 0.0,
        "Z": 1.0
      },
      "Radius": 1.0
    }
  ],
  "_bhomVersion": "8.2"
}