Snap4BIM is a web application that adds interactive objects in a 3D BIM project. It offers two different interfaces. Viewer is the simplified version of the main interface where users can interact with the application but can not make changes to the data. The main viewer interface which is the complete one, offers the possibility to add, modify or remove pin data.
A toolbar is available on the top of the main view. This toolbar has some functionalities that help with camera control in the 3D view and also allows to modify the application interface on the basis of your needs.
The available commands are as follow:
- Toggle visibility of sidebars
- Toggle visibility of time trend graph
- Default camera navigation
- Camera navigation pan
- Rotate camera horizontally
- Reset color changes and visibility of elements in the 3D view
- Display a help page with command shortcuts
The main sections in the left sidebar are as shown in the following image:
- Project name: Displays project title and ID
- Pin list: A list of pins that are available in the loaded project
- A: New pin, opens the right sidebar form in which we can enter pin data and save it into database;
- D: Pin element with its related functionality: to modify data of pin, hide or show it in the 3D view and delete pin from database;
- Project tree: A tree structure with all the elements that are part of the loaded BIM project
- B: Colored eye icon, the element in that row is visible in the 3D view
- C: Grayed eye icon, the element in that row is not visible in the 3D view
Note: The left sidebar has limited functionality in the simplified viewer page
In the right sidebar we can add new pins or modify the existing ones. We are presented with a form where we have to enter a title, a description and a service URI from Snap4City. The other form fields are disabled, the application fetches data related to the inserted service URI and fills the corresponding Nature, Subnature and Pin icon as soon as the focus is removed from the service URI field. To position the pin in the 3D world we have to click the Pick button and then select the location. To save the data into database click Submit, otherwise Cancel to hide the form from the view. The Reset fields button resets all the fields in the form.
Note: The right sidebar form is not available in the simplied viewer page.
- Pin title: enter pin title;
- Pin description: enter pin description;
- Service URI: enter service URI from Snap4City, click somewhere in the form to remove focus and the disabled fields will be filled automatically with the related data;
- Pick: click on Pick button then select a point in the 3D view, the coordinates will be lled automatically based on the selected object and it's position in the 3D world;
- Submit/Cancel/Reset fields: submit to save data into database, cancel to hide form from view and reset elds to empty form fields.
1.3 Time trand graph
By clicking a pin on the 3D view, the corresponding data are shown in a pop up window. In the case of real time data, the diffferent available values and trend can be also shown in the widgets available below the main 3D view, as shown in the following image. Different time trends can be shown, according to the different interval period selected on the pin pop up window. The data are shown as follow:
1. Last Value: displays the last value measured by a given sensor for a given quantity.
2. Time Trend Chart: displays the time trend of a measured quantity based on the interval selected in the pin popup window.
1.4 URL path variables
URL path variables help on conguring the user interface and camera position in the displayed 3D view when application loads a certain project.
// example url with parameters
http :// domain / public / view . html ? poid =131073& eye =%5B-25278.173828125%2 C -19709.78515625%2 C3873 .369384765625%5 D&target =%5B -7368.2890625%2 C -2567.59521484375%2 C-478.11090087890625%5 D&up =%5 B0 .12301164120435715%2 C0.11773882806301117%2 C0 .9701125025749207%5 D& fovy =45& type = persp &pins =%5 B165_197420 %2%5 D& timetrend = off & sidebar =on
// url parameters
// - poid =131073 // project id
// - eye =%5B -25278.173828125%2 C -19709.78515625%2 C3873.369384765625%5 D // eye = [x,y,z]
// - target =%5B -7368.2890625%2 C -2567.59521484375%2 C-478.11090087890625%5 D // target = [x,y,z]
// - up =%5 B0 .12301164120435715%2 C0 .11773882806301117%2 C0.9701125025749207%5 D // up = [x,y,z]
// - fovy =45 // camera angle expressed in degrees
// - type = persp // camera projection " persp " or " ortho "
// - pins =%5 B165_197420 %2%5 D // pins = [ pin_id1 , pin_id2 ...]
// - timetrend = off
// - sidebar =on
URL path variables you can use:
1. poid: in the simplied viewer, passing a project id as a parameter the application loads the project with that id. In the main viewer page this doesn't work because at every reload the application displays a list of projects to choose and the passed URL parameter is ignored.
2. eye, target, up, fovy, type: these parameters congure the 3D world view, based on values passed you can obtain a certain view of the 3D project.
3. timetrend: it can be on or off. If on the application starts with time trend chart visible otherwise it is hidden
4. sidebar: it can be on or off. If on the application starts with sidebars visible otherwise they are hidden.
5. pins: it can take an array of pin icon ids. When application starts, it hides the pins which ids are passed in the URL parameter.
2. How to?
2.1 Add new pin
To add a new pin, you should have access to the main interface. In the left sidebarfind the New pin button and click it, then a right sidebar containing a form will be displayed.
Insert title, description, service URI and pick a location in the 3D view for the pin to be positioned. Click Submit to save it.
2.2 Remove pin
To remove a pin, you should have access to the main interface. In the left sidebar you can find a list of existing pins. For each pin you can find a Remove button. Click Remove and confirm to remove the pin from the database.
2.3 Modify pin data
To modify pin data, you should have access to the main interface. In the left sidebar you can find a list of pins and for each pin a Modify button. Clicking on Modify button it will display in the right sidebar a prefilled form with the pin data. After finishing with changes, click Submit to save data into database.
2.4 Hide an element in the 3D view
To hide an element in the 3D view, select the object in the 3D view and pres the "h" key in the keyboard.
2.5 Use section plane
Press and hold Ctrl key from keyboard, position the cursor in the view pane where you want then click with the right mouse button and drag it in the opposite direction.
- BIMServer - https://github.com/opensourceBIM/BIMserver
- BIMSurfer - https://github.com/opensourceBIM/BIMsurfer