Skip to main content

Site Model Repository

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 which 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

Follow these steps to find a floor from a point in your site model:
  1. Use the MainViewInterface 3D cursor to obtain an arbitrary coordinate by calling getCurrentCursorPosition().geometry.coordinates.
  2. 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

Follow these steps to find the closest room within the range of a point:
  1. Use the MainViewInterface 3D cursor to obtain an arbitrary coordinate by calling getCurrentCursorPosition().geometry.coordinates.
  2. 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);