Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Exporting Assemblies to Collada via the REST API?

Doug_StephenDoug_Stephen Member Posts: 7 PRO
edited February 2019 in General
As the title says, I'm curious if this is possible. I've been playing with the REST API Explorer for a few days now, and I can't seem to find what I'm looking for but as the documentation is a little sparse I'm just not sure if it's something I've missed.

Our use-case is that we are using OnShape to develop models for robots, which would then have their physical properties and graphical meshes exported out so that we can use these models in dynamics simulations like Gazebo or our own in-house simulation software.

I've found where it's possible to export .STL files from Part Studios, but this falls a little short. STL loses some of the material properties that we care about and Part Studios are too granular; some of our meshes are assemblies that don't necessarily have articulation but are built up from several separate parts.

Is this something that's possible or at the least on the road map?

Thanks for taking a look at this!

Best Answer


  • LazyEngineerToBeLazyEngineerToBe Member Posts: 1
    edited February 2019
    An easy export to Gazebo would be awesome for us as well.
  • Doug_StephenDoug_Stephen Member Posts: 7 PRO
    edited February 2019
    Hey @mthiesmeyer thanks for the help! I was able to use the REST API to trigger creation of a translation for a subassembly on a document, which is awesome! However I'm not able to make the Download External Data call work; I'm using the Java library and I get this exception:

    <div>Exception in thread "main" com.onshape.api.exceptions.OnshapeException: Unable to convert media-type application/octet-stream;charset=utf-8 to type class com.onshape.api.responses.DocumentsDownloadExternalDataResponse
    	at com.onshape.api.base.BaseClient.call(BaseClient.java:294)
    	at com.onshape.api.requests.DocumentsDownloadExternalDataRequest$Builder.call(DocumentsDownloadExternalDataRequest.java:72)
    	at us.ihmc.robotics.robotDescription.cad.onShape.OnShapeModelDownloadExample.main(OnShapeModelDownloadExample.java:39)</div>

    Not sure if this is me doing something wrong or if there's a hiccup with the Java bindings but I'll keep playing with it and I'll update this post as I learn more.

    Quick edit, I *am* able to get to the Collada file if I use the API Explorer from the web app, using the same DID and FID that I'm trying to use from the Java library. So it seems like this may be a bug in the Java library.
  • mthiesmeyermthiesmeyer Onshape Employees Posts: 113
    Hi @Doug_Stephen,

    Sorry about that. I have taken the liberty of filing an issue with the java-client library for you, you can find it here. Please feel free to add any additional information!


  • Doug_StephenDoug_Stephen Member Posts: 7 PRO
    @mthiesmeyer Thanks for the help, I'll move the discussion to GitHub!
  • Doug_StephenDoug_Stephen Member Posts: 7 PRO
    @mthiesmeyer actually I have one last question tangential but still REST API related. I see in the API explorer where I can extract mass properties for Parts, is there an API call to do this for an entire assembly? Or do we have to process that part by part?
Sign In or Register to comment.