- 15 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Site Model Repository
- Updated on 15 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
The Site Model Repository provides filters for finding buildings, floors, and rooms from a given point within a site model in NavVis IVION.
A Site Model is a three-dimensional, hierarchical model that clusters information by assigning meaningful names to clearly defined areas in the space of a Site. Each site model entity type may have a logical set of sub-entities, for example, a BUILDING
site model entity type may contain ROOM
types as its children.
Getting a Floor from a Point
Procedure
Use the MainViewInterface 3D cursor to obtain an arbitrary coordinate by calling
getCurrentCursorPosition().geometry.coordinates
.Use
findWithin
to return an array of site model entities that contain the given coordinate:
// typescript
const point: Vector3 = new api.lib.THREE.Vector3(10, 20, 1);
let floors: SiteModelEntityInterface[] = api.siteModel.repository
.findWithinGlobal(point, api.siteModel.types.FLOOR);
Getting the Closest Room within Range of a Point
Procedure
Use the MainViewInterface 3D cursor to obtain an arbitrary coordinate by calling
getCurrentCursorPosition().geometry.coordinates
.Use
findClosestByTypeAndDistance2D
to return the site model entity that is nearest to the given coordinate:
// typescript
const point: Vector3 = new api.lib.THREE.Vector3(10, 20, 1);
let room: SiteModelEntityInterface = api.siteModel.repository
.findClosestByTypeAndDistance2D(api.siteModel.types.ROOM, point, 5);