...
Code Block |
---|
{
id: "54dd1d25-4c58-4af2-96a1-1d26fa440177",
name: "Element",
type: "10074EEF-9418-4D64-9C6D-23932835A7F1",
division,
parent: null,
attributes: {
general: {
name: "<PP>Wall layer",
valid: true
},
quantity: {
length: 8523.27,
width: 300,
height: 2500,
volume: 6392448992.508584,
area: 21308163.308361948
},
<...>,
geometry: {
<geometry_type>: {
'C':4291993670,
'V':[96.149, 179.546...],
'F':[4,0,1,2,3, 3,4,5,6, ...]
}
}
},
children: <child_objects>
}
|
...
as mentioned above this format is optimized for viewing on mobile devices or in browser. Native model will be filtered and tessellated in order to deliver minimal JSON size and maximal navigation speed (FPS). This model has ThreeJS JSON v 3.1 format and can be directly parsed by the client. JSON object in this case looks like:
Code Block |
---|
threejs: { elementcount: 14312, viewbox: { x: 827364, y: 23765, z: 2974652, with: 827346, height: 2873456, depth: 1726354 }, colors: [123414, 9817413, ....], geometries: [ {<ThreeJS_JSON_format>}, {...}, ... ] } |
Object services and resulting object collections structures.
As described above different types of JSON object collections can be obtained, depending on which object service will be used. It doesn't alter single object structure, but resulting object collections can have slightly different structure. Since we're working with object collections, we can have a set of objects which contain topology tree without geometry, or object collections with geometry. In the case we've requested a collection of objects with geometry, we need some additional information f.e. like view box size (3D model dimensions which should be rendered). So these properties will be added to the set of objects. Thus generally we can consider objects collection like a set of objects with additional properties. Object collection type defined by additional element in the resource path, f.e. if we have service getTopology(), that means that HTTP request will look like .
Service getTopology() and getProjectTree()
HTTP request: (see BIM+ Services):
Code Block |
---|
GET https://api.bimplus.net/v2/bimplus/objects/<object_id>/topology
|
As a resulting set following JSON object should be created:
Code Block |
---|
{
objects: {
id: "54dd1d25-4c58-4af2-96a1-1d26fa440177",
name: "Element",
type: "10074EEF-9418-4D64-9C6D-23932835A7F1",
division,
parent: null,
attributes: {
general: {
name: "<PP>Wall layer",
valid: true
},
quantity: {
length: 8523.27,
width: 300,
height: 2500,
volume: 6392448992.508584,
area: 21308163.308361948
},
<...>,
},
children: <child_objects>}
},
{...},
...
}
|
Services getMesh(), getThreejs()
HTTP request: (see BIM+ Services):
Code Block |
---|
GET https://api.bimplus.net/v2/bimplus/objects/<object_id>/geometries this is default request. In case we want to obtain ThreeJS geometry type for each object, we should add geometry type to the request: GET https://api.bimplus.net/v2/bimplus/objects/<object_id>/geometries/topologythreejs |
As a resulting set following JSON object should be created for getMesh():
Code Block |
---|
{ colors: [123414, 9817413, ....], objects: [ { id: "54dd1d25-4c58-4af2-96a1-1d26fa440177", name: "Element", type: "10074EEF-9418-4D64-9C6D-23932835A7F1", division, parent: null, attributes: { general: { name: "<PP>Wall layer", valid: true }, quantity: { length: 8523.27, width: 300, height: 2500, volume: 6392448992.508584, area: 21308163.308361948 }, <...>, geometry: { mesh: {<mesh_type_geometry>} } }, children: <child_objects> }, {...}, ... ], } |
JSON object for getThreejs():
Code Block |
---|
{ elementcount: 14312, viewbox: { x: 827364, y: 23765, z: 2974652, with: 827346, height: 2873456, depth: 1726354 }, colors: [123414, 9817413, ....], objects: [ { id: "54dd1d25-4c58-4af2-96a1-1d26fa440177", name: "Element", type: "10074EEF-9418-4D64-9C6D-23932835A7F1", division, parent: null, attributes: { general: { name: "<PP>Wall layer", valid: true }, quantity: { length: 8523.27, width: 300, height: 2500, volume: 6392448992.508584, area: 21308163.308361948 }, <...>, geometry: { threejs: {<threejs_type_geometry>} } }, children: <child_objects> }, {...}, ... ], } |
Class diagram (v2, draft)
...