diff --git a/src/ifcopenshell-python/test/fixtures/rules/fail-assoc-material-IfcTask-IFC4.ifc b/src/ifcopenshell-python/test/fixtures/rules/fail-assoc-material-IfcTask-IFC4.ifc new file mode 100644 index 0000000000..0648c718b0 --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/fail-assoc-material-IfcTask-IFC4.ifc @@ -0,0 +1,12 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2023-01-13T11:08:39',(),(),'IfcOpenShell v0.7.0-8a108f37','IfcOpenShell v0.7.0-8a108f37',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASK('0J288bRSP71RkTGLX57Mso',$,'sleep',$,$,$,$,$,$,.T.,$,$,$); +#2=IFCMATERIAL('brick',$,$); +#3=IFCRELASSOCIATESMATERIAL('3CndjAA6v4f9K4OHeiDzQJ',$,$,$,(#1),#2); +ENDSEC; +END-ISO-10303-21; diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_20.py b/src/ifcopenshell-python/test/fixtures/rules/generate_20.py new file mode 100644 index 0000000000..4fb5b30b48 --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/generate_20.py @@ -0,0 +1,10 @@ +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") diff --git a/src/ifcopenshell-python/test/fixtures/rules/pass-assoc-material-IfcWall-IFC4.ifc b/src/ifcopenshell-python/test/fixtures/rules/pass-assoc-material-IfcWall-IFC4.ifc new file mode 100644 index 0000000000..edd8109cdb --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/pass-assoc-material-IfcWall-IFC4.ifc @@ -0,0 +1,12 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2023-01-13T11:08:39',(),(),'IfcOpenShell v0.7.0-8a108f37','IfcOpenShell v0.7.0-8a108f37',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('2AgqCFV5f2XhqZDQAUeko6',$,$,$,$,$,$,$,$); +#2=IFCMATERIAL('brick',$,$); +#3=IFCRELASSOCIATESMATERIAL('2dtKImsN59_hw0uWDJiJUA',$,$,$,(#1),#2); +ENDSEC; +END-ISO-10303-21;