May 7, 2020

Faster configuration results

Many people using the Design Automation service (DA) are interested in ways to speed up the process of presenting some results to the user after starting a WorkItem. The following article will show 3 ways to do that.

I already wrote about ways to optimize your DA processes, but they do not address the delay caused by the SVF (the format used by the Viewer) generation. 
Some of the DA engines like Inventor support SVF generation directly on the server (so that you can more efficiently support Design Automation workflows that require your model to be displayed in the Forge Viewer at the end of the process) but even that might not be fast enough. 

Currently there is no direct network access from the AppBundle on the DA server and the options for pushing data to our server is fairly limited - e.g. OnProgress payload can only be text and the max size is 5120 bytes per call. Therefore, the below solutions will run additional WorkItems to get the extra resources (preview image, transform matrices of components) to our server:

Using multiple WorkItems

1) Generate preview image

Creating a preview image is much faster than generating the SVF, and so you could show something to the user while they are waiting for the 3d model. That's what e.g. Configurator 360 is doing as well.   

2) Cache results

Once the model for a given set of options has been created, you could generate a hash from the selected parameter values and use that to name the model. If the same configuration options are selected again (producing the same hash) then you could just load the existing model.

3) Assemble in the Viewer

This only works if the model to be configured only contains existing parts (like in my sample model) and the user can only customize how those parts are combined together. 
In this case, instead of generating the SVF model, we can simply extract the position of all the components in the configured assembly, and use that to assemble them in the Viewer - see picture on top.  
Note: If the number of configuration combinations for a given model is fairly limited, then it could be worth pre-generating all the models in advance.

The more resource efficient way would be to use a single WorkItem to do all the above. If/when internet access will be provided on Design Automation servers, the program could be modified to operate like this:

Using a single WorkItem

You can find more information on the Inventor model and iLogic code I used here:

Source code of this app is here:

The live version to play with is here:


Related Posts