mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix #7331: derive cost item quantities from IfcSpace base quantities
assign_cost_item_quantity skipped every IfcSpatialElement, which also swallowed IfcSpace. Spaces are legitimate quantifiable objects, so their Qto_SpaceBaseQuantities (for example GrossFloorArea) were never picked up and count based cost items fell back to 0. Keep skipping spatial containers (site, building, storey) but allow IfcSpace. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
committed by
Massimo Fabbro
parent
6085894433
commit
e23142d01a
@@ -137,7 +137,7 @@ class Usecase:
|
||||
if self.prop_name or formula:
|
||||
self.quantities = set(cost_item.CostQuantities or [])
|
||||
for product in products:
|
||||
if product.is_a("IfcSpatialElement"):
|
||||
if product.is_a("IfcSpatialElement") and not product.is_a("IfcSpace"):
|
||||
continue
|
||||
ifcopenshell.api.control.assign_control(
|
||||
self.file,
|
||||
|
||||
Reference in New Issue
Block a user