2023-01-13 11:11:00 +01:00
|
|
|
import ifcopenshell
|
|
|
|
|
|
2024-07-26 12:00:28 +10:00
|
|
|
task = lambda f: f.createIfcTask(ifcopenshell.guid.new(), None, "sleep", IsMilestone=True)
|
2023-01-13 11:11:00 +01:00
|
|
|
wall = lambda f: f.createIfcWall(ifcopenshell.guid.new())
|
|
|
|
|
|
2024-07-26 12:00:28 +10:00
|
|
|
for i, fn in enumerate((task, wall)):
|
2023-01-13 11:11:00 +01:00
|
|
|
f = ifcopenshell.file(schema="IFC4")
|
|
|
|
|
elem = fn(f)
|
2024-07-26 12:00:28 +10:00
|
|
|
f.createIfcRelAssociatesMaterial(ifcopenshell.guid.new(), None, None, None, [elem], f.createIfcMaterial("brick"))
|
2023-01-13 11:11:00 +01:00
|
|
|
f.write(f"{'pass' if i else 'fail'}-assoc-material-{elem.is_a()}-{f.schema}.ifc")
|