diff --git a/src/ifcopenshell-python/test/fixtures/rules/fail-lining-properties-1.0-None.ifc b/src/ifcopenshell-python/test/fixtures/rules/fail-lining-properties-1.0-None.ifc new file mode 100644 index 0000000000..40441a1413 --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/fail-lining-properties-1.0-None.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2023-02-03T21:03:39',(),(),'IfcOpenShell v0.7.0-07ee62eb9','IfcOpenShell v0.7.0-07ee62eb9',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWINDOWLININGPROPERTIES('2W70Kvm_v3u9yS3fEKz8PE',$,$,$,1.,$,$,$,$,$,$,$,$,$,$,$); +#2=IFCWINDOWTYPE('2sFDIHjAr5kQR0lJbTEoNk',$,'WindowType',$,$,(#1),$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_21.py b/src/ifcopenshell-python/test/fixtures/rules/generate_21.py new file mode 100644 index 0000000000..d402f26520 --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/generate_21.py @@ -0,0 +1,13 @@ +import itertools +import ifcopenshell + +def EXISTS(v): return v is not None +def NOT(v): return not v + +for LiningDepth, LiningThickness in itertools.product((None, 1.), (None, 1.)): + f = ifcopenshell.file(schema="IFC4") + valid = NOT(EXISTS(LiningDepth) and NOT(EXISTS(LiningThickness))) + f.createIfcWindowType(ifcopenshell.guid.new(), None, 'WindowType', HasPropertySets=[ + f.createIfcWindowLiningProperties(ifcopenshell.guid.new(), LiningDepth=LiningDepth, LiningThickness=LiningThickness) + ]) + f.write(f"{'pass' if valid else 'fail'}-lining-properties-{LiningDepth}-{LiningThickness}.ifc") \ No newline at end of file diff --git a/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-1.0-1.0.ifc b/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-1.0-1.0.ifc new file mode 100644 index 0000000000..c3b92c2dc1 --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-1.0-1.0.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2023-02-03T21:03:39',(),(),'IfcOpenShell v0.7.0-07ee62eb9','IfcOpenShell v0.7.0-07ee62eb9',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWINDOWLININGPROPERTIES('3NGl9gqpf5pAlbFx$B7S05',$,$,$,1.,1.,$,$,$,$,$,$,$,$,$,$); +#2=IFCWINDOWTYPE('3MDd04avLCdh6Ivz$WzUaX',$,'WindowType',$,$,(#1),$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-None-1.0.ifc b/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-None-1.0.ifc new file mode 100644 index 0000000000..76343f973a --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-None-1.0.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2023-02-03T21:03:39',(),(),'IfcOpenShell v0.7.0-07ee62eb9','IfcOpenShell v0.7.0-07ee62eb9',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWINDOWLININGPROPERTIES('0KDBqXun5ECAJL0nrYkMld',$,$,$,$,1.,$,$,$,$,$,$,$,$,$,$); +#2=IFCWINDOWTYPE('0mTxiq4EvF09FRitqatWTO',$,'WindowType',$,$,(#1),$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-None-None.ifc b/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-None-None.ifc new file mode 100644 index 0000000000..ce9a03aed0 --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/pass-lining-properties-None-None.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2023-02-03T21:03:39',(),(),'IfcOpenShell v0.7.0-07ee62eb9','IfcOpenShell v0.7.0-07ee62eb9',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWINDOWLININGPROPERTIES('28587KCHn5nOtS14mudQ45',$,$,$,$,$,$,$,$,$,$,$,$,$,$,$); +#2=IFCWINDOWTYPE('1KvP7IY7D8aBiPWa0yrcu2',$,'WindowType',$,$,(#1),$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21;