Window lining test case

This commit is contained in:
Thomas Krijnen
2023-02-03 21:17:48 +01:00
parent 5526bed4c3
commit 3f4417c9f2
5 changed files with 57 additions and 0 deletions
@@ -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;
@@ -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")
@@ -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;
@@ -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;
@@ -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;