Site Model Repository
  • 15 Mar 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Site Model Repository

  • Dark
    Light
  • PDF

Article summary

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


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.