mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 22:12:32 +00:00
get_top_area to calculate area for the roof #5899
This commit is contained in:
@@ -484,8 +484,8 @@
|
|||||||
},
|
},
|
||||||
"IfcRoof": {
|
"IfcRoof": {
|
||||||
"Qto_RoofBaseQuantities": {
|
"Qto_RoofBaseQuantities": {
|
||||||
"GrossArea": null,
|
"GrossArea": "gross_get_top_area",
|
||||||
"NetArea": null,
|
"NetArea": "net_get_top_area",
|
||||||
"ProjectedArea": null
|
"ProjectedArea": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -145,6 +145,11 @@ class IfcOpenShell:
|
|||||||
"Side area",
|
"Side area",
|
||||||
"The side (non-projected) are of the shape as seen from the local Y-axis",
|
"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
|
# IfcVolumeMeasure
|
||||||
"get_volume": Function("IfcVolumeMeasure", "Volume", "Calculates the volume of a manifold shape"),
|
"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"))
|
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(
|
def get_footprint_area(
|
||||||
geometry: ShapeType,
|
geometry: ShapeType,
|
||||||
axis: AXIS_LITERAL = "Z",
|
axis: AXIS_LITERAL = "Z",
|
||||||
|
|||||||
Reference in New Issue
Block a user