Cloudy times… part 3


The third API we investigated is the Viewer. It allows you to display 2D and 3D models within your web browser in a very simple way. In order to show the CAD data, you need to convert your file into a compatible format (SVF), which can be done via the Model Derivative API. The Model Derivative API is quite simple and allows you to translate a long list of different file types in different formats. A complete overview can be found here.

While the conversation into a viewable format has a cost, viewing the translated model has no costs. The translated model usually resides on the Autodesk cloud, in a so called bucket and you can define how long the file shall stay there (24 hours, 30 days, or forever). For details about the retention period, check this link. However, the SVF file does not necessary have to stay on the Autodesk cloud. You could also have it on your own location, such as Amazon S3, DropBox, etc. or even locally and make it available through your firewall.

Technically the viewer could also be used on a local intranet, but an internet access on each client is mandatory, as all the components are loaded from the web and also the viewing file must be accessible to the viewer engine.

In order to embed the viewer and get your file visible, the steps are very simple. There are excellent tutorials that brings you step by step through the process.

While getting your file viewed is very simple, creating more advanced viewing features requires more effort. There are standard menus, functions and dialogs that can be quickly activated, such as for exploding the model, getting the component structure, properties and the like. That works well and quick. After that, it’s up to you. The viewer API provides a ton of functions and events, so you can really create very cool stuff.

We had not the time to go down the whole rabbit hole, so what we post here is surely just a subset of what the viewer can do for you. It is possible to change color, highlight, set transparency of components programmatically. Or to select components in the viewing space or the component tree. You also get events on the selected object and so you can react on user actions, by emphasizing components or adding additional capabilities.

One thing we noticed is that for Inventor files, you get access to all the file properties and also the display name of the browser, like Screw:1. This way, it’s possible to understand which component or instance is meant and for instance use the Design Automation API for executing custom code, as soon also Inventor will be supported.

All the functions like zoom, rotate, pan, etc. are accessible via the API, so it’s possible to think on scenarios where the showed model can be positioned programmatically, elements can be highlighted, hidden, colored, etc. in order to create a very custom experience. There are examples for creating virtual reality scenarios with google cardboard and much more.

Our impression is that the possibilities are endless, as the core API provide access to all relevant data and so it’s just about you creating the web page with according java script for doing the cool stuff.

In the short time, we could just find one limitation. We wanted to access the features of a component. Let’s say you have an Inventor part and want to figure out if there are holes in it. This information is not there in the viewer, as during the conversion into SVF, the geometry is translated into mashes and loses the underlying intelligence. It is possible to access the edges and so identify circular edges and the like, but with curved surfaces this becomes a mess. We don’t have yet a real customer scenario where this limitation might become an issue, so at the moment it’s just a note.

Our take away is that the API feels mature, very capable, very powerful, with lots of functions. There are many examples so that probably there is already a piece of code for the thing you like to do. We can see many opportunities where the viewer can be used in order to create an interactive experience for customers for better understanding the product, provide feedback, fix problems, and more.

This entry was posted in Forge. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s