BH.oM.Structure.Elements.Edge¶
Edge class to describe the edges of panels (or other objects) by a curve and properties.
Class structure¶
Implemented interfaces and base types¶
The Edge is inheriting from the following base type(s) and implements the following interfaces:
- BH.oM.Base.BHoMObject
- BH.oM.Base.IBHoMObject
- BH.oM.Base.IObject
- BH.oM.Dimensional.IElement1D
- BH.oM.Dimensional.IElement
- BH.oM.Analytical.Elements.IEdge
- BH.oM.Analytical.IAnalytical
Properties¶
Defining properties¶
The following properties are defined on the class
Name | Type | Description | Quantity |
---|---|---|---|
Curve | ICurve | Curve of the edge. Should be a planar curve if used on panels. | - |
Release | Constraint4DOF | Release of the edge, defining the connectivity between the host panel and the edge. Three translational and one rotational degree of freedom, where the rotational refers to the rotation about the axis of the edge. |
- |
Support | Constraint6DOF | Support of the edge, used to constrain the edge in space. | - |
Inherited properties¶
The following properties are inherited from the base class of the object
Name | Type | Description | Quantity |
---|---|---|---|
BHoM_Guid | Guid | - | - |
Name | string | - | - |
Fragments | FragmentSet | - | - |
Tags | HashSet<string> | - | - |
CustomData | Dictionary<string, object> | - | - |
Derived properties¶
The following properties are defined as extension methods in one of the BHoM_Engines
Name | Type | Description | Quantity | Engine |
---|---|---|---|---|
Bounds | BoundingBox | Queries the IElement1Ds BoundingBox. Acts on the ICurve definition of the IElement1D through the Geometry_Engine. | - | Spatial_Engine |
Centroid | Point | Queries the centre of weight for a IElement1Ds ICurve representation. | - | Spatial_Engine |
ControlPoints | List<Point> | Queries the control points of the one dimensional representation of the IElement1D. | - | Spatial_Engine |
DominantVector | Vector | Gets the the dominant vector (orientation) of an Element1D based on its lines lengths. | - | Spatial_Engine |
ElementCurves | List<ICurve> | Queries the defining curves of an IElement1D. | - | Spatial_Engine |
ElementVertices | List<Point> | Returns the discontinuity points from the defining ICurve of the IElement1D. | - | Spatial_Engine |
Geometry | ICurve | Gets the geometry of a IEdge as its Curve. Method required for automatic display in UI packages. | - | Analytical_Engine |
IArea | double | Queries the area of the geometrical representation of an IElement. | Area [m²] | Spatial_Engine |
IBounds | BoundingBox | Queries the IElements BoundingBox. Acts on the elements geometrical definition of the IElement through the Geometry_Engine. | - | Spatial_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 |
IElements0D | List<IElement0D> | Queries the IElement0Ds from a IElement1D. Returns null if no IElement0Ds are defined for the type of IElement1D. | - | Spatial_Engine |
IElementVertices | List<Point> | Returns the discontinuity points from the defining ICurves of the IElement. | - | Spatial_Engine |
IGeometry | ICurve | Queries the defining geometrical object which all spatial operations will act on. | - | Spatial_Engine |
IIsPlanar | bool | Checks whether all control points of an element lie in a single plane. | - | Spatial_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 |
InvalidEdge | bool | - | - | Lusas_Engine |
IPrimaryPropertyName | string | Returns the name of an elements primary defining property | - | Facade_Engine |
IsNull | bool | Checks if a Edge or its defining properties are null and outputs relevant error message. | - | Structure_Engine |
IsPlanar | bool | Checks whether all control points of an element lie in a single plane. | - | Spatial_Engine |
IsSelfIntersecting | bool | Checks if the one dimensional representation of the IElement1D is closer to itself than the tolerance at any two points. | - | Spatial_Engine |
Length | double | Returns the length of the IElement1Ds curve. | Length [m] | Spatial_Engine |
PrimaryPropertyName | string | Returns the name of a frameEdge's primary defining property | - | Facade_Engine |
Code and Schema¶
C# implementation¶
C#
public class Edge : BH.oM.Base.BHoMObject,
BH.oM.Base.IBHoMObject,
BH.oM.Base.IObject,
BH.oM.Dimensional.IElement1D,
BH.oM.Dimensional.IElement,
BH.oM.Analytical.Elements.IEdge,
BH.oM.Analytical.IAnalytical
Assembly: Structure_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/Structure_oM/Elements/Edge.json"
}
The JSON Schema is available on github here:
Example JSON instance¶
Example JSON instance of type Edge.
Example JSON
{
"_t": "BH.oM.Structure.Elements.Edge",
"Curve": {
"_t": "BH.oM.Geometry.Line",
"Start": {
"_t": "BH.oM.Geometry.Point",
"X": -4.0,
"Y": 2.0,
"Z": 0.0
},
"End": {
"_t": "BH.oM.Geometry.Point",
"X": -1.0,
"Y": 2.0,
"Z": 0.0
},
"Infinite": false
},
"Release": {
"_t": "BH.oM.Structure.Constraints.Constraint4DOF",
"Name": null,
"TranslationX": "Free",
"TranslationY": "Free",
"TranslationZ": "Free",
"RotationX": "Free",
"TranslationalStiffnessX": 0.0,
"TranslationalStiffnessY": 0.0,
"TranslationalStiffnessZ": 0.0,
"RotationalStiffnessX": 0.0,
"BHoM_Guid": "98240133-10c8-42bb-8f2d-62a25eddd727"
},
"Support": {
"_t": "BH.oM.Structure.Constraints.Constraint6DOF",
"Name": null,
"TranslationalStiffnessX": 0.0,
"TranslationalStiffnessY": 0.0,
"TranslationalStiffnessZ": 0.0,
"RotationalStiffnessX": 0.0,
"RotationalStiffnessY": 0.0,
"RotationalStiffnessZ": 0.0,
"TranslationX": "Free",
"TranslationY": "Free",
"TranslationZ": "Free",
"RotationX": "Free",
"RotationY": "Free",
"RotationZ": "Free",
"BHoM_Guid": "454affc3-0278-43d4-aebc-cac58138507e"
},
"BHoM_Guid": "99a1b32b-a114-4907-b49b-c8742f44ead8",
"Name": "Edge Name",
"_bhomVersion": "8.2"
}