Skip to content

Commit

Permalink
Add markers (#285)
Browse files Browse the repository at this point in the history
* Add markers

* Wrap markers

* Add markers to examples

* Update README.md

* Update README.md
  • Loading branch information
jasollien authored Feb 26, 2024
1 parent 0f3e266 commit 6ce1ee5
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 1 deletion.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ The Open CDE workgroup develops the BCF standard. The group meets every second M
- [Optimization rules](#optimization-rules-3)
- [3.5.2.15 Translucency setup hints](#35215-translucency-setup-hints)
- [3.5.2.16 Topic File Ids](#35216-topic-file-ids)
- [3.5.2.17 Marker](#35217-marker)
- [3.5.3 GET Viewpoint Service](#353-get-viewpoint-service)
- [3.5.4 GET Viewpoint Snapshot Service](#354-get-viewpoint-snapshot-service)
- [3.5.5 GET Viewpoint Bitmap Service](#355-get-viewpoint-bitmap-service)
Expand Down Expand Up @@ -1122,6 +1123,13 @@ Note: For viewpoints without audit information (For example viewpoints created i
"z": 0.7
}
}],
"markers": [{
"location": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
}],
"clipping_planes": [{
"location": {
"x": 0.7,
Expand Down Expand Up @@ -1172,6 +1180,13 @@ Note: For viewpoints without audit information (For example viewpoints created i
"z": 0.0
}
}],
"markers": [{
"location": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
}],
"clipping_planes": [{
"location": {
"x": 0.5,
Expand Down Expand Up @@ -1211,6 +1226,7 @@ JSON encoded body using the "application/json" content type.
| orthogonal_camera | [Orthogonal camera](#3523-orthogonal-camera) | orthogonal camera view | see viewpoint optional/mandatory fields clarification |
| perspective_camera | [Perspective camera](#3524-perspective-camera) | perspective view of the camera | see viewpoint optional/mandatory fields clarification |
| lines | array of [Line](#3525-line) | graphical line | optional |
| markers | array of [Marker](#35217-marker) | highlight specific locations | optional |
| clipping_planes | array of [Clipping Plane](#3526-clipping-plane) | clipping planes for the model view | optional |
| bitmaps | array of [Bitmap](#3527-bitmap) | embedded pictures in the viewpoint | optional |
| 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 |
Expand All @@ -1220,7 +1236,7 @@ JSON encoded body using the "application/json" content type.
**Viewpoint optional/mandatory fields clarification**

1. **Camera definition** is exactly one of `perspective_camera` or `orthogonal_camera`
2. **Visualisation information** consists of one or more of the following elements: `lines`, `clipping_plans`, `bitmaps`, `components`
2. **Visualisation information** consists of one or more of the following elements: `lines`, `markers`, `clipping_plans`, `bitmaps`, `components`
3. A viewpoint must contain a _camera definition_, a `snapshot` or both
4. A viewpoint containing _visualization information_ must also contain a _camera definition_

Expand Down Expand Up @@ -1443,6 +1459,13 @@ Viewpoints are immutable, while topics may be changed later. To ensure that view
"z": 0.0
}
}],
"markers": [{
"location": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
}],
"clipping_planes": [{
"location": {
"x": 0.5,
Expand Down Expand Up @@ -1559,6 +1582,13 @@ Viewpoints are immutable, while topics may be changed later. To ensure that view
"z": 0.0
}
}],
"markers": [{
"location": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
}],
"clipping_planes": [{
"location": {
"x": 0.5,
Expand Down Expand Up @@ -1598,6 +1628,20 @@ Viewpoints are immutable, while topics may be changed later. To ensure that view
"570477df-428d-4d3d-a7ae-704d79da8cbd"
]
}

#### 3.5.2.17 Marker
A marker is a way to pinpoint a location in the 3D model. Each vendor can decide how these markers should be rendered.

**Best practice**
Render the markers based on the topic properties.
Example: Red markers for open topics, and green markers for closed topics

[marker.json](Schemas_draft-03/Collaboration/Viewpoint/marker.json)

|parameter|type|description|required|
|---------|----|-----------|--------|
| location | [Point](#3521-point) | Location of the marker | mandatory |

### 3.5.3 GET Viewpoint Service

**Resource URL**
Expand Down Expand Up @@ -1652,6 +1696,13 @@ Retrieve a specific viewpoint.
"z": 0.0
}
}],
"markers": [{
"location": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
}],
"clipping_planes": [{
"location": {
"x": 0.5,
Expand Down
9 changes: 9 additions & 0 deletions Schemas/Collaboration/Viewpoint/marker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "marker",
"type": "object",
"properties": {
"location": {
"$ref": "point.json"
}
}
}
6 changes: 6 additions & 0 deletions Schemas/Collaboration/Viewpoint/viewpoint_GET.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
"$ref": "line.json"
}
},
"markers": {
"type": ["array", "null"],
"items": {
"$ref": "marker.json"
}
},
"clipping_planes": {
"type": ["array", "null"],
"items": {
Expand Down
6 changes: 6 additions & 0 deletions Schemas/Collaboration/Viewpoint/viewpoint_POST.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
"$ref": "line.json"
}
},
"markers": {
"type": ["array", "null"],
"items": {
"$ref": "marker.json"
}
},
"clipping_planes": {
"type": ["array", "null"],
"items": {
Expand Down

0 comments on commit 6ce1ee5

Please sign in to comment.