mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 16:22:53 +00:00
See #6570. Formula column minor improvements and documentation
This commit is contained in:
committed by
Massimo Fabbro
parent
528964ca56
commit
f0b5ab860f
@@ -0,0 +1,14 @@
|
||||
Index,Identification,Name,Unit,Value,Quantity,Query,Property,Formula
|
||||
1,E.01,Walls,m3,,,,,
|
||||
2,E.01.01,Ground floor walls,m3,100,,"IfcWall, location=""Ground Floor""",GrossVolume,
|
||||
2,E.01.02,First floor walls,m3,200,,"IfcWall, location=""First Floor""",GrossVolume,
|
||||
1,A.02,Paintings,m2,,,,,
|
||||
2,A.03,Paintings with water,m2,,,,,
|
||||
3,B.05,White paintings,m2,25,,IfcWall,GrossVolume,
|
||||
3,B.06,Colored paintings,m2,32,33,,,
|
||||
3,B.07,Double paintings,m,,,IfcWall,,NetSideArea*2
|
||||
2,C-01,Paintings with machine,m2,17,133,,,
|
||||
2,C-02,Decorated paintings,m2,40,8,,,
|
||||
1,D,Reinforcements,,,,,,
|
||||
2,D.1,Walls reinforcements weight,kg,,,IfcWall,,Pset_ConcreteElementGeneral.ReinforcementVolumeRatio * GrossVolume
|
||||
2,D.2,Beams reinforcements weight,kg,,,,,
|
||||
|
@@ -39,6 +39,7 @@ See example files as a CSV file format reference:
|
||||
- Ex5 - SoR_with_description.csv (a simple SoR with description column)
|
||||
- Ex6 - BoQ with categories.csv (a simple BoQ with categories columns)
|
||||
- Ex7 - BoQ with Rates.csv (a simple BoQ that connect to an existing SoR. It needs an already loaded SoR.)
|
||||
- Ex8 - Boq with formula.csv (a simple BoQ with formula field used to calculate quantities when specified)
|
||||
- `sample_cost_schedule_house_FR.csv` / `.ods`
|
||||
- `schedule.csv`, `rates.csv` (schedule of rates example)
|
||||
|
||||
|
||||
@@ -412,16 +412,13 @@ class Csv2Ifc:
|
||||
results = ifcopenshell.util.selector.filter_elements(self.file, cost_item["Query"])
|
||||
results = [r for r in results]
|
||||
ifc_quantity_class = ifcopenshell.util.unit.get_symbol_quantity_class(cost_item["Unit"])
|
||||
try:
|
||||
quantity = ifcopenshell.api.cost.assign_cost_item_quantity(
|
||||
self.file,
|
||||
cost_item=cost_item["ifc"],
|
||||
products=results,
|
||||
formula=cost_item["Formula"],
|
||||
ifc_class=ifc_quantity_class,
|
||||
quantity = ifcopenshell.api.cost.assign_cost_item_quantity(
|
||||
self.file,
|
||||
cost_item=cost_item["ifc"],
|
||||
products=results,
|
||||
formula=cost_item["Formula"],
|
||||
ifc_class=ifc_quantity_class,
|
||||
)
|
||||
except:
|
||||
quantity=0
|
||||
|
||||
self.create_cost_items(cost_item["children"], cost_item["ifc"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user