IElement required extension methods - BHoM/documentation GitHub Wiki
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.
-
If the BHoM class implements an
IElementinterface corresponding with its geometrical representation:Interface Implementing classes IElement0DClasses which can be represented by Point(e.g. nodes)IElement1DClasses which can be represented by ICurve(e.g. bars)IElement2DClasses which can be represented by a planar set of
closedICurves(e.g. planar building panels)IElementMClasses which is containing matter in the form of a material and a volume -
It needs to have the following methods implemented in it's oM-specific Engine:
Interface Required methods Optional methods When IElement0DGeometry()SetGeometry(Point point)HasMergeablePropertiesWith(IElement0D)
IElement1DGeometry()SetGeometry(ICurve curve)HasMergeablePropertiesWith(IElement1D)
Elements0D()-
SetElements0D(List<IElement0D> newElements0D) NewElement0D(Point point)
IElement1Dwhich endpoints are defined byIElement0DIElement2DOutlineElements1D()-
SetOutlineElements1D(List<IElement1D> outlineElements1D) NewElement1D(ICurve curve)HasMergeablePropertiesWith(IElement2D)
InternalElements2D()NewInternalElement2D()-
SetInternalElements2D(List<IElement2D> internalElements2D)
If the IElement2Dhas internal elementsIElementMMaterialComposition()SolidVolume()
VolumetricMaterialTakeoff()
-
Spatial_Enginecontains a defaultTransformmethod for allIElementXDs. 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 specificTransformmethod must be implemented.