Skip to content

Extension methods required for the IElement interface

The following points outlines the use of the dimensional interfaces as well as extension methods required to be implemented by them for them to function correctly in the Spatial_Engine methods.

Please note that for classes that implement any of the following analytical interfaces, an default implementation already exists in the Analytical_Engine and for those classes an implementation is only needed if any extra action needs to be taken for that particular case. The analytical interfaces with default support are:

Analytical Interface Dimensional interface implemented
INode IElement0D
ILink<TNode> IElement1D
IEdge IElement1D
IOpening<TEdge> IElement2D
IPanel<TEdge, TOpening> IElement2D

Please note that the default implementations do not cover the mass interface IElementM.

  1. If the BHoM class implements an IElement interface corresponding with its geometrical representation:

    Interface Implementing classes
    IElement0D Classes which can be represented by Point (e.g. nodes)
    IElement1D Classes which can be represented by ICurve (e.g. bars)
    IElement2D Classes which can be represented by a planar set of
    closed ICurves (e.g. planar building panels)
    IElementM Classes which is containing matter in the form of a material and a volume
  2. It needs to have the following methods implemented in it's oM-specific Engine:

    Interface Required methods Optional methods When
    IElement0D
    • Geometry()
    • SetGeometry(Point point)
    • HasMergeablePropertiesWith(IElement0D)

    IElement1D
    • Geometry()
    • SetGeometry(ICurve curve)
    • HasMergeablePropertiesWith(IElement1D)
    • Elements0D()
    • SetElements0D(
      List<IElement0D> newElements0D)
    • NewElement0D(Point point)
    IElement1D which endpoints are defined by IElement0D
    IElement2D
    • OutlineElements1D()
    • SetOutlineElements1D(
      List<IElement1D> outlineElements1D)
    • HasMergeablePropertiesWith(IElement2D)
    • InternalElements2D()
    • NewInternalElement2D()
    • SetInternalElements2D(
      List<IElement2D> internalElements2D)
    If the IElement2D has internal elements
    IElementM
    • MaterialComposition()
    • SolidVolume()
    or
    • VolumetricMaterialTakeoff()
  3. Spatial_Engine contains a default Transform method for all IElementXDs. This implementation only covers the transformation of the base geometry, and does not handle any additional parameters, such as local orientations of the element. For an object that contains this additional layer of information, a object specific Transform method must be implemented.

This is checked by this CI check so any changes to the requirements should be reflected in the check appropriately.