Site Model Repository

Prev Next

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

  1. Use the MainViewInterface 3D cursor to obtain an arbitrary coordinate by calling getCurrentCursorPosition().geometry.coordinates.

  2. UsfindWithin 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

  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);