mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
assign_cost_item_quantity: fix indendation and missing values (de65e50)
`values` dictionary was missing and variables were never collected to it, so `FormulaEvaluator(values)` was always resulting in missing variable error.
This commit is contained in:
@@ -150,9 +150,11 @@ class Usecase:
|
|||||||
collector.visit(tree)
|
collector.visit(tree)
|
||||||
variables = collector.variables
|
variables = collector.variables
|
||||||
|
|
||||||
|
values: dict[str, float | None] = {}
|
||||||
for variable in variables:
|
for variable in variables:
|
||||||
getter = self.get_value_from_pset if "." in variable else self.get_value_from_qset
|
getter = self.get_value_from_pset if "." in variable else self.get_value_from_qset
|
||||||
value = getter(product, variable)
|
value = getter(product, variable)
|
||||||
|
values[variable] = value
|
||||||
|
|
||||||
if value is None:
|
if value is None:
|
||||||
print(
|
print(
|
||||||
|
|||||||
Reference in New Issue
Block a user