get_top_area to calculate area for the roof #5899

This commit is contained in:
Andrej730
2024-12-27 18:20:53 +05:00
parent 6c6e40b07c
commit d55a291589
3 changed files with 11 additions and 2 deletions
+2 -2
View File
@@ -484,8 +484,8 @@
},
"IfcRoof": {
"Qto_RoofBaseQuantities": {
"GrossArea": null,
"NetArea": null,
"GrossArea": "gross_get_top_area",
"NetArea": "net_get_top_area",
"ProjectedArea": null
}
},
+5
View File
@@ -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",