Extensions¶
Mixins injected into generated models. See Extensions.
Geometry¶
Surface geometry
¶
Geometry functions
¶
Pure geometry functions for 3-D polygons (Newell's method).
polygon_normal
¶
Compute the surface normal of a 3-D polygon using Newell's method.
Returns the unit normal vector. For a degenerate polygon (all
collinear vertices) the zero vector (0, 0, 0) is returned.
polygon_area_3d
¶
Compute the area of a planar 3-D polygon using Newell's method.
The polygon does not need to be convex.
polygon_centroid
¶
Compute the centroid (arithmetic mean of vertices) of a 3-D polygon.
polygon_tilt
¶
Compute the tilt angle (degrees) between outward normal and +Z axis.
0° means the surface faces straight up (roof/ceiling exterior),
90° is vertical (wall), and 180° faces straight down (floor
exterior). Returns 0.0 for degenerate polygons. Range [0, 180].
polygon_azimuth
¶
Compute the surface azimuth (degrees), clockwise from north (+Y).
Follows the EnergyPlus convention: N=0, E=90, S=180, W=270. The
angle is derived from the projection of the outward normal onto the
XY plane. Purely horizontal surfaces have an undefined azimuth and
return 0.0. Range [0, 360).
polygon_perimeter
¶
Compute the perimeter of a closed polygon as the sum of edge lengths.
Returns 0.0 for degenerate inputs with fewer than 3 vertices.
polygon_bounding_box
¶
Compute the axis-aligned bounding box of a 3-D polygon.
Returns ((xmin, ymin, zmin), (xmax, ymax, zmax)). For an empty
vertex list both corners are the origin (0, 0, 0).
polygon_is_convex
¶
Return True if the planar polygon is convex.
Walks each vertex triple and projects the cross product of the
incoming/outgoing edges onto the polygon normal. Collinear triples
(zero cross product) are tolerated — only a sign flip among non-zero
projections indicates a reflex vertex. Degenerate polygons
(fewer than 3 vertices, or a zero normal) return False.
Construction¶
ConstructionLayersMixin
¶
Construction functions
¶
Material classification and layer resolution for layered constructions.
is_window_material
¶
is_window_material(material: IDFBaseModel) -> bool
Whether material is a window-material layer (glazing, gas or shading).
construction_layers
¶
construction_layers(
construction: Construction,
) -> list[MaterialNameTarget]
Resolve the layers of a bound construction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
construction
|
Construction
|
Construction bound to an IDF container. |
required |
Returns:
| Type | Description |
|---|---|
list[MaterialNameTarget]
|
Materials from outside to inside; repeated names yield repeated |
list[MaterialNameTarget]
|
entries and empty layer fields are skipped. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the construction is not bound to an IDF. |
LookupError
|
If a layer name does not resolve to any material. |