WR test cases for rigid op / typeof() of simple types

This commit is contained in:
Thomas Krijnen
2023-01-11 12:49:47 +01:00
parent fc3c6599c7
commit e64047c511
3 changed files with 36 additions and 0 deletions
@@ -0,0 +1,12 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('','2023-01-11T09:47:45',(),(),'IfcOpenShell v0.7.0-8a108f37','IfcOpenShell v0.7.0-8a108f37','');
FILE_SCHEMA(('IFC4X3_ADD1'));
ENDSEC;
DATA;
#1=IFCGEOGRAPHICCRS('EPSG:4326',$,$,$,$);
#2=IFCGEOGRAPHICCRS('EPSG:3857',$,$,$,$);
#3=IFCRIGIDOPERATION(#1,#2,IFCLENGTHMEASURE(0.),IFCPLANEANGLEMEASURE(0.),0.);
ENDSEC;
END-ISO-10303-21;
@@ -0,0 +1,12 @@
import ifcopenshell
for i, type_decl in enumerate(('IfcLengthMeasure', 'IfcPlaneAngleMeasure')):
f = ifcopenshell.file(schema="IFC4X3_ADD1")
f.createIfcRigidOperation(
SourceCRS=f.createIfcGeographicCRS('EPSG:4326'),
TargetCRS=f.createIfcGeographicCRS('EPSG:3857'),
FirstCoordinate=f.create_entity(type_decl, 0.0),
SecondCoordinate=f.create_entity('IfcPlaneAngleMeasure', 0.0),
Height=0.0
)
f.write(f"{'pass' if i else 'fail'}-rigid-op-IfcPlaneAngleMeasure-{type_decl}-ifc4x3_add1.ifc")
@@ -0,0 +1,12 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('','2023-01-11T09:47:45',(),(),'IfcOpenShell v0.7.0-8a108f37','IfcOpenShell v0.7.0-8a108f37','');
FILE_SCHEMA(('IFC4X3_ADD1'));
ENDSEC;
DATA;
#1=IFCGEOGRAPHICCRS('EPSG:4326',$,$,$,$);
#2=IFCGEOGRAPHICCRS('EPSG:3857',$,$,$,$);
#3=IFCRIGIDOPERATION(#1,#2,IFCPLANEANGLEMEASURE(0.),IFCPLANEANGLEMEASURE(0.),0.);
ENDSEC;
END-ISO-10303-21;