-
Notifications
You must be signed in to change notification settings - Fork 0
BeeInventor Forge Extension Documentation
To use this extension, you will need Autodesk Developer credentials and API’s. Visit Autodesk Forge Portal, sign up and create an app.
Then, use http://localhost:3000/api/forge/callback/oauth
as the Callback URL, although it is not used on a 2-legged flow. When making an app on forge, check the API’s you want to use. For this minimal viewer, please check the Model Derivative API
and Data Management API
. Finally take a note of the Client ID and Client Secret.
This step is to create a viewer in your application. Visit BeeInventor repository to create a minimal viewer or follow how to build a viewer from Autodesk Forge Official. One thing that needs to be considered in the setup viewer is the option when loading the model. Go to public/js/ForgeViewer.js. Use the following settings to keep the scale of the scene in meters.
const beeOption = {
applyScaling: { to: "meters" },
globalOffset: { x: 0, y: 0, z: 0 },
keepCurrentModels: true,
};
viewer.loadDocumentNode(doc, viewables, beeOption).then((i) => {
});
Create .env
file with the following variables :
PORT=3000
FORGE_CLIENT_ID="Your Forge Client Id"
FORGE_CLIENT_SECRET="Your Forge Client Secret"
FORGE_CALLBACK_URL=http://localhost:3000/api/forge/callback/oauth
To run the program locally, use the following command:
Install dependencies with:
npm install
Run locally :
npm start
Please upload the model that you will use with this extension. Here there are several APIs used, namely the Data Management API and the Model Derivative API.
How to upload models:
-
Create a bucket
Buckets are spaces that are created by applications and are used to store objects for later retrieval. A bucket is owned by the application that creates it.
-
When naming a bucket, make sure to give it a unique name that doesn't contain capital letters
-
Upload the model
Right click on the bucket that you created and select the model you want to view in Forge. You could upload various kind of 3D model format in bucket. -
Translation Model
The Model Derivative API lets you translate a model into several types of output file formats simultaneously. Do a translation of the model to SVF format so that the model can be viewed in the browser.
When the viewer is ready, now open the index.html file. There are several things that need to be setup.
- Load Custom Font for 3D Text
<script src="https://lib.cdn.dasiot.site/forge/assets/font3d/Monaco_Regular.js"></script>
- Load CSS
<script src="https://lib.cdn.dasiot.site/forge/v0.1.5/extension.min.js"></script>
- Load BeeInventor Extension
<script src="https://lib.cdn.dasiot.site/forge/v0.1.5/extension.min.js"></script>
- Below shows the expected structure :
| |-> assets/fonts/Monaco_Regular.js |-> extension/main.css |-> extension/beeinventor-extension.js
- After the extension module is imported, go to the public/js/ForgeViewer.js folder and register the extension by:
viewer = new Autodesk.Viewing.GuiViewer3D(
document.getElementById("forgeViewer"),
{ extensions: ["BeeInventor"] }
);
In your 3D Software Design eg. Revit, SketchUp, Blender, etc. Please make sure the Up direction of the building is on the Z-axis.
![]() |
Object Info.
Represent tools that can provide information by clicking on 3D
objects in the scene.
The information includes: |
![]() |
Info Card.
To display the infocard or label on a specific object clicked by the cursor. |
![]() |
Transform Control.
A tool that is used to adjust the position of a model by dragging the transform in the direction (x, y, z). |
![]() |
Dark Mode.
To switch to the night mode. |
![]() |
Rotate Camera.
Tool to be able to do a 360-degree view of the building model automatically. |
![]() |
Building Setup.
Doing setup on the building when the building is not in the center or expected location. |
![]() |
Restricted Area Setup.
Perform manual setup for restricted area such as setting location or height of the area. |
Email : hello@beeinventor
https://www.beeinventor.com/en/