Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


Goal of this tutorial

The goal of this tutorial is to initiate you to the Spinalcom viewer and how to install it.

Installation

To follow this tutorial  install the viewer you first need to install the Spinalcom Drive.

Before installing the Spinal Viewer, you need to install the Spinalcom Drive. 

You can follow this tutorial if you don't know how to.


Once this is done you can install the viewer in the folder you installed the drive.

$ npm install https://github.com/spinalcom/spinal-browser-viewer
Configuration

To use the viewer you're going to need an Autodesk Forge account. Create or log in:

https://developer.autodesk.com/


Create an App with at least the Data Management API and Model Derivative API. The other labels don't matter.

https://forge.autodesk.com/myapps/create

After you created the app you will be given a client ID and a client secret in the app's information.

Put these information in .config.json in the environment of spinal-organ-forge.

.config.json

{
  "spinal-core-hub": {
    "env": {
      "SPINALHUB_PORT": 7777,
      "SPINALHUB_IP": "127.0.0.1"
    },
    "env_test": {
      "SPINALHUB_PORT": 7777,
      "SPINALHUB_IP": "127.0.0.1"
    },
    "env_production": {
      "SPINALHUB_PORT": 7777,
      "SPINALHUB_IP": "127.0.0.1"
    }
  },
  "spinal-organ-forge": {
    "env": {
      "INTERVAL": 2000,
      "CLIENT_ID": "REPLACE HERE",
      "CLIENT_SECRET": "REPLACE HERE",
      "SPINAL_USER_ID": "168",
      "SPINAL_PASSWORD": "JHGgcz45JKilmzknzelf65ddDadggftIO98P"
    },
    "env_test": {
      "INTERVAL": 2000,
      "CLIENT_ID": "REPLACE HERE",
      "CLIENT_SECRET": "REPLACE HERE",
      "SPINAL_USER_ID": "168",
      "SPINAL_PASSWORD": "JHGgcz45JKilmzknzelf65ddDadggftIO98P"
    },
    "env_production": {
      "INTERVAL": 2000,
      "CLIENT_ID": "REPLACE HERE",
      "CLIENT_SECRET": "REPLACE HERE",
      "SPINAL_USER_ID": "168",
      "SPINAL_PASSWORD": "JHGgcz45JKilmzknzelf65ddDadggftIO98P"
    }
  }
}
Launch your application

If you see a previously launched spinal-hub-7777 or spinal-hub-forge-7777 you need to delete them.

$ pm2 delete spinal-hub-7777
$ pm2 delete spinal-organ-forge-7777

You can now restart your application with:

$ pm2 restart launch.config.js
Basic usage

The drive, the admin and the viewer are browser applications. To use them you need to access them via a browser (you may change the host/port corresponding to your .config.json file):

http://127.0.0.1:7777/html/drive

To create your digital twin you're going to need a rvt file. You can get one here:

http://www.autodesk.com/revit-rac-basic-sample-project-2016-enu?_ga=2.104361024.1367483780.1526027060-750616995.1518426196

Once you have downloaded it, use your file manager to drag and drop it on the drive.

Then right click on the .rvt and select the application "Create Digital Twin".

This will take a few minutes. Once this is done right click on the digital twin that was created and select Open with Op. Center Viewer.

It will open a new tab with the viewer and load the 3D model of a house.


  • No labels