Skip to content

Commit

Permalink
Merge pull request #287 from CBenghi/pr/Fix227
Browse files Browse the repository at this point in the history
add tests for more containment relation outcomes
  • Loading branch information
CBenghi authored May 3, 2024
2 parents 858f910 + 3345939 commit 2cce7bf
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<ids xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>The container may be indirect</title>
<title>The container must be related using specified relation 2/2</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="The container may be indirect" ifcVersion="IFC2X3 IFC4">
<specification name="The container must be related using specified relation 2/2" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('','2022-10-07T13:48:44',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCBEAM('0eA6m4fELI9QBIhP3wiLAp',$,$,$,$,$,$,$,$);
#2=IFCSPACE('3Agm079vPIYBL4JExVrhD5',$,$,$,$,$,$,$,$,$,$);
#3=IFCRELAGGREGATES('05rScmOVzMoQXOfbYdtLYj',$,$,$,#2,(#1));
#10=IFCPROJECT('1eA6m4fELI9QBIhP3wiLAp',$,'TestProject',$,$,$,$,$,$);
#11=IFCRELAGGREGATES('2eA6m4fELI9QBIhP3wiLAp',$,$,$,#10,(#2));
ENDSEC;
END-ISO-10303-21;

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ids xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>The containment can be indirect 2/2</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="The containment can be indirect 2/2" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
<simpleValue>IFCBEAM</simpleValue>
</name>
</entity>
</applicability>
<requirements>
<partOf relation="IFCRELAGGREGATES">
<entity>
<name>
<simpleValue>IFCBUILDING</simpleValue>
</name>
</entity>
</partOf>
</requirements>
</specification>
</specifications>
</ids>
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ FILE_NAME('','2022-10-07T13:48:44',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpen
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCSLAB('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$);
#1=IFCSPACE('3Agm079vPIYBL4JExVrhD5',$,$,$,$,$,$,$,$,$,$);
#2=IFCBEAM('0eA6m4fELI9QBIhP3wiLAp',$,$,$,$,$,$,$,$);
#3=IFCRELAGGREGATES('05rScmOVzMoQXOfbYdtLYj',$,$,$,#1,(#2));
#4=IFCSPACE('3Agm079vPIYBL4JExVrhD5',$,$,$,$,$,$,$,$,$,$);
#4=IFCBUILDING('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$,$,$,$);
#5=IFCRELCONTAINEDINSPATIALSTRUCTURE('0BbkGoC6vPvRW13UT7D8zH',$,$,$,(#1),#4);
#10=IFCPROJECT('1eA6m4fELI9QBIhP3wiLAp',$,'TestProject',$,$,$,$,$,$);
#11=IFCRELAGGREGATES('2eA6m4fELI9QBIhP3wiLAp',$,$,$,#10,(#4));
ENDSEC;
END-ISO-10303-21;
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ids xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>The container must be related using specified relation 1/2</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="The container must be related using specified relation 1/2" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
<simpleValue>IFCBEAM</simpleValue>
</name>
</entity>
</applicability>
<requirements>
<partOf relation="IFCRELCONTAINEDINSPATIALSTRUCTURE">
<entity>
<name>
<simpleValue>IFCSPACE</simpleValue>
</name>
</entity>
</partOf>
</requirements>
</specification>
</specifications>
</ids>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('','2022-10-07T13:48:44',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCBEAM('0eA6m4fELI9QBIhP3wiLAp',$,$,$,$,$,$,$,$);
#2=IFCSPACE('3Agm079vPIYBL4JExVrhD5',$,$,$,$,$,$,$,$,$,$);
#3=IFCRELCONTAINEDINSPATIALSTRUCTURE('0BbkGoC6vPvRW13UT7D8zH',$,$,$,(#1),#2);
#10=IFCPROJECT('1eA6m4fELI9QBIhP3wiLAp',$,'TestProject',$,$,$,$,$,$);
#11=IFCRELAGGREGATES('2eA6m4fELI9QBIhP3wiLAp',$,$,$,#10,(#2));
ENDSEC;
END-ISO-10303-21;
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ids xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>The containment can be indirect 1/2</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="The containment can be indirect 1/2" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
<simpleValue>IFCBEAM</simpleValue>
</name>
</entity>
</applicability>
<requirements>
<partOf relation="IFCRELAGGREGATES">
<entity>
<name>
<simpleValue>IFCBUILDING</simpleValue>
</name>
</entity>
</partOf>
</requirements>
</specification>
</specifications>
</ids>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('','2022-10-07T13:48:44',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCSPACE('3Agm079vPIYBL4JExVrhD5',$,$,$,$,$,$,$,$,$,$);
#2=IFCBEAM('0eA6m4fELI9QBIhP3wiLAp',$,$,$,$,$,$,$,$);
#3=IFCRELAGGREGATES('05rScmOVzMoQXOfbYdtLYj',$,$,$,#1,(#2));
#4=IFCBUILDING('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$,$,$,$);
#5=IFCRELAGGREGATES('15rScmOVzMoQXOfbYdtLYj',$,$,$,#4,(#1));
#10=IFCPROJECT('1eA6m4fELI9QBIhP3wiLAp',$,'TestProject',$,$,$,$,$,$);
#11=IFCRELAGGREGATES('2eA6m4fELI9QBIhP3wiLAp',$,$,$,#10,(#4));
ENDSEC;
END-ISO-10303-21;
33 changes: 30 additions & 3 deletions Documentation/testcases/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -1681,15 +1681,42 @@ Requirements:
PartOf: Pattern(''.*''),IFCRELCONTAINEDINSPATIALSTRUCTURE
```

### The container may be indirect
### The container must be related using specified relation 1/2

``` ids partof/pass-the_container_may_be_indirect.ids
The container may be indirect
``` ids partof/pass-the_container_must_be_related_using_specified_relation_1_2.ids
The container must be related using specified relation 1/2
Entity: ''IFCBEAM''
Requirements:
PartOf: ''IFCSPACE'',IFCRELCONTAINEDINSPATIALSTRUCTURE
```

### The container must be related using specified relation 2/2

``` ids partof/fail-the_container_must_be_related_using_specified_relation_2_2.ids
The container must be related using specified relation 2/2
Entity: ''IFCBEAM''
Requirements:
PartOf: ''IFCSPACE'',IFCRELCONTAINEDINSPATIALSTRUCTURE
```

### The containment can be indirect 1/2

``` ids partof/pass-the_containment_can_be_indirect_1_2.ids
The containment can be indirect 1/2
Entity: ''IFCBEAM''
Requirements:
PartOf: ''IFCBUILDING'',IFCRELAGGREGATES
```

### The containment can be indirect 2/2

``` ids partof/fail-the_containment_can_be_indirect_2_2.ids
The containment can be indirect 2/2
Entity: ''IFCBEAM''
Requirements:
PartOf: ''IFCBUILDING'',IFCRELAGGREGATES
```

### The container predefined type must match exactly 1/2

``` ids partof/fail-the_container_predefined_type_must_match_exactly_1_2.ids
Expand Down

0 comments on commit 2cce7bf

Please sign in to comment.