MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / add_quantity

Method add_quantity

src/ifc5d/ifc5d/ifc5Dspreadsheet.py:213–221  ·  view source on GitHub ↗
(quantity: ifcopenshell.entity_instance, take_off_name: str)

Source from the content-addressed store, hash-verified

211
212 # TODO: handle multiple quantities, THOSE WHHICH ARE JUYST ASSIGNED TO THE COST ITEM DIRECTLY, NOT THROUGH OBJECTS.
213 def add_quantity(quantity: ifcopenshell.entity_instance, take_off_name: str) -> float:
214 accounted_for.add(quantity)
215 if take_off_name == "":
216 # 0 IfcPhysicalSimpleQuantity.Name
217 take_off_name = quantity[0]
218 if quantity[0] != take_off_name:
219 take_off_name = "mixed-takeoff-quantities"
220 # 3 IfcPhysicalSimpleQuantity.Value
221 return quantity[3]
222
223 unit = ""
224 cost_item_quantities: list[ifcopenshell.entity_instance] = cost_item.CostQuantities

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected