mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
get_top_area to calculate area for the roof #5899
This commit is contained in:
@@ -484,8 +484,8 @@
|
||||
},
|
||||
"IfcRoof": {
|
||||
"Qto_RoofBaseQuantities": {
|
||||
"GrossArea": null,
|
||||
"NetArea": null,
|
||||
"GrossArea": "gross_get_top_area",
|
||||
"NetArea": "net_get_top_area",
|
||||
"ProjectedArea": null
|
||||
}
|
||||
},
|
||||
|
||||
@@ -145,6 +145,11 @@ class IfcOpenShell:
|
||||
"Side area",
|
||||
"The side (non-projected) are of the shape as seen from the local Y-axis",
|
||||
),
|
||||
"get_top_area": Function(
|
||||
"IfcAreaMeasure",
|
||||
"Top area",
|
||||
"The total surface area deviating by no more than 45 degrees from the local Z+ axis.",
|
||||
),
|
||||
# IfcVolumeMeasure
|
||||
"get_volume": Function("IfcVolumeMeasure", "Volume", "Calculates the volume of a manifold shape"),
|
||||
}
|
||||
|
||||
@@ -532,6 +532,10 @@ def get_max_side_area(geometry: ShapeType) -> float:
|
||||
return max(get_side_area(geometry, axis="X"), get_side_area(geometry, axis="Y"), get_side_area(geometry, axis="Z"))
|
||||
|
||||
|
||||
def get_top_area(geometry: ShapeType) -> float:
|
||||
return get_side_area(geometry, axis="Z", angle=45)
|
||||
|
||||
|
||||
def get_footprint_area(
|
||||
geometry: ShapeType,
|
||||
axis: AXIS_LITERAL = "Z",
|
||||
|
||||
Reference in New Issue
Block a user