Files
IfcOpenShell/src/ifcopenshell-python/test/fixtures/rules/generate_20.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
467 B
Python
Raw Normal View History

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