Skip to content

Commit f4f5035

Browse files
authored
Feature/#321 topic files in viewpoints (#330)
* Add id to topic files * Add topic file ids to viewpoints * Update TOC * Fix reference to correct section in README * Add clarification to not allow deletion of used topic files
1 parent 3885f36 commit f4f5035

File tree

4 files changed

+51
-6
lines changed

4 files changed

+51
-6
lines changed

README.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ The Open CDE workgroup develops the BCF standard. The group meets every second M
9090
- [3.5.2.14 Translucency](#35214-translucency)
9191
- [Optimization rules](#optimization-rules-3)
9292
- [3.5.2.15 Translucency setup hints](#35215-translucency-setup-hints)
93+
- [3.5.2.16 Topic File Ids](#35216-topic-file-ids)
9394
- [3.5.3 GET Viewpoint Service](#353-get-viewpoint-service)
9495
- [3.5.4 GET Viewpoint Snapshot Service](#354-get-viewpoint-snapshot-service)
9596
- [3.5.5 GET Viewpoint Bitmap Service](#355-get-viewpoint-bitmap-service)
@@ -824,10 +825,12 @@ Retrieve a **collection** of file references as topic header.
824825
Response Code: 200 - OK
825826
Body:
826827
[{
828+
"id": "570477df-428d-4d3d-a7ae-704d79da8cbd",
827829
"ifc_project": "0J$yPqHBD12v72y4qF6XcD",
828830
"filename": "OfficeBuilding_Architecture_0001.ifc",
829831
"reference": "https://example.com/files/0J$yPqHBD12v72y4qF6XcD_0001.ifc"
830832
}, {
833+
"id": "5328e0a1-d027-4cca-81d1-d59afb4cf798",
831834
"ifc_project": "3hwBHP91jBRwPsmyf$3Hea",
832835
"filename": "OfficeBuilding_Heating_0003.ifc",
833836
"reference": "cf37bae6-0900-46be-b37f-b34754fe0b4a"
@@ -843,7 +846,7 @@ Retrieve a **collection** of file references as topic header.
843846

844847
[file_PUT.json](Schemas/Collaboration/File/file_PUT.json)
845848

846-
Update a **collection** of file references on the topic header. This operation is only possible when the server returns the `updateFiles` flag in the Topic authorization, see section [3.2.8](#328-determining-allowed-topic-modifications). Servers must always accept a [File](Schemas/Collaboration/File/file_GET.json) reference returned by the [files_information](#331-get-project-files-information-service) endpoint. Servers may also accept other values such as a combination of fields from the header of the IFC file.
849+
Update a **collection** of file references on the topic header. This operation is only possible when the server returns the `updateFiles` flag in the Topic authorization, see section [3.2.8](#328-determining-allowed-topic-modifications). Servers must always accept a [File](Schemas/Collaboration/File/file_GET.json) reference returned by the [files_information](#331-get-project-files-information-service) endpoint. Servers may also accept other values such as a combination of fields from the header of the IFC file. Servers should reject requests that remove files that are still referenced by viewpoints withing the same topic.
847850

848851
**Example Request**
849852

@@ -864,10 +867,12 @@ Update a **collection** of file references on the topic header. This operation i
864867
Response Code: 200 - OK
865868
Body:
866869
[{
870+
"id": "570477df-428d-4d3d-a7ae-704d79da8cbd",
867871
"ifc_project": "0J$yPqHBD12v72y4qF6XcD",
868872
"filename": "OfficeBuilding_Architecture_0001.ifc",
869873
"reference": "https://example.com/files/0J$yPqHBD12v72y4qF6XcD_0001.ifc"
870874
}, {
875+
"id": "5328e0a1-d027-4cca-81d1-d59afb4cf798",
871876
"ifc_project": "3hwBHP91jBRwPsmyf$3Hea",
872877
"filename": "OfficeBuilding_Heating_0003.ifc",
873878
"reference": "cf37bae6-0900-46be-b37f-b34754fe0b4a"
@@ -1125,7 +1130,10 @@ Note: For viewpoints without audit information (For example viewpoints created i
11251130
"y": 0.4,
11261131
"z": 0.1
11271132
}
1128-
}]
1133+
}],
1134+
"topic_file_ids": [
1135+
"570477df-428d-4d3d-a7ae-704d79da8cbd"
1136+
]
11291137
}, {
11301138
"guid": "a11a82e7-e66c-34b4-ada1-5846abf39133",
11311139
"creation_date": "2013-10-21T17:34:22.409Z",
@@ -1172,7 +1180,11 @@ Note: For viewpoints without audit information (For example viewpoints created i
11721180
"y": 0.0,
11731181
"z": 0.0
11741182
}
1175-
}]
1183+
}],
1184+
"topic_file_ids": [
1185+
"570477df-428d-4d3d-a7ae-704d79da8cbd",
1186+
"5328e0a1-d027-4cca-81d1-d59afb4cf798"
1187+
]
11761188
}]
11771189

11781190
### 3.5.2 POST Viewpoint Service
@@ -1200,6 +1212,7 @@ JSON encoded body using the "application/json" content type.
12001212
| bitmaps | array of [Bitmap](#3527-bitmap) | embedded pictures in the viewpoint | optional |
12011213
| snapshot | [Snapshot](#3528-snapshot) | snapshot image of the viewpoint. Note: The longest dimension of should not exceed 1500 px, length or width. | see viewpoint optional/mandatory fields clarification |
12021214
| components | [Components](#3529-components) | Components in the viewpoint | optional |
1215+
| topic_file_ids | array of strings | List of file ids that are referenced in the viewpoint | required, but can be an empty list |
12031216

12041217
**Viewpoint optional/mandatory fields clarification**
12051218

@@ -1385,6 +1398,11 @@ BCF is suitable for controlling the translucency of a few components. A huge lis
13851398
| space_boundaries_translucent | boolean | Translucency of space_boundaries | optional, default true |
13861399
| openings_translucent | boolean | Translucency of openings | optional, default true |
13871400

1401+
1402+
#### 3.5.2.16 Topic File Ids
1403+
1404+
Viewpoints are immutable, while topics may be changed later. To ensure that viewpoints are always referring to the correct models, the topic file IDs are used. This is a list of file IDs that are referenced in the viewpoint. The file IDs are from [GET Files (Header) Service](#332-get-files-header-service) endpoint.
1405+
13881406
**Example Request**
13891407

13901408
POST /bcf/3.0/projects/F445F4F2-4D02-4B2A-B612-5E456BEF9137/topics/B345F4F2-3A04-B43B-A713-5E456BEF8228/viewpoints
@@ -1492,7 +1510,10 @@ BCF is suitable for controlling the translucency of a few components. A huge lis
14921510
"openings_translucent": false
14931511
}
14941512
}
1495-
}
1513+
},
1514+
"topic_file_ids": [
1515+
"570477df-428d-4d3d-a7ae-704d79da8cbd"
1516+
]
14961517
}
14971518

14981519
**Example Response**
@@ -1567,7 +1588,10 @@ BCF is suitable for controlling the translucency of a few components. A huge lis
15671588
}],
15681589
"snapshot": {
15691590
"snapshot_type": "png"
1570-
}
1591+
},
1592+
"topic_file_ids": [
1593+
"570477df-428d-4d3d-a7ae-704d79da8cbd"
1594+
]
15711595
}
15721596
### 3.5.3 GET Viewpoint Service
15731597

@@ -1657,7 +1681,10 @@ Retrieve a specific viewpoint.
16571681
}],
16581682
"snapshot": {
16591683
"snapshot_type": "png"
1660-
}
1684+
},
1685+
"topic_file_ids": [
1686+
"570477df-428d-4d3d-a7ae-704d79da8cbd"
1687+
]
16611688
}
16621689

16631690
### 3.5.4 GET Viewpoint Snapshot Service

Schemas/Collaboration/File/file_GET.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"reference": {
2424
"type": ["string",
2525
"null"]
26+
},
27+
"id": {
28+
"type": ["string",
29+
"null"]
2630
}
2731
}
2832
}

Schemas/Collaboration/Viewpoint/viewpoint_GET.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
"$ref": "../Action/viewpoint_actions.json"
5656
}
5757
}
58+
},
59+
"topic_file_ids": {
60+
"required": true,
61+
"type": "array",
62+
"items": {
63+
"type": "string"
64+
}
5865
}
5966
}
6067
}

Schemas/Collaboration/Viewpoint/viewpoint_POST.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
},
4242
"components": {
4343
"$ref": "components.json"
44+
},
45+
"topic_file_ids": {
46+
"required": true,
47+
"type": "array",
48+
"items": {
49+
"type": "string"
50+
}
4451
}
4552
}
4653
}

0 commit comments

Comments
 (0)