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.

REST API - Exporting to STEP works, but exporting to OBJ does not

guillauem_dguillauem_d Member Posts: 17 ✭
edited October 8 in Community Support

Hello there ! πŸ˜‰

I'm trying to export my sheet metal part using the REST API, exporting it to a STEP file works fine using the following method :

β€’ Initiate the exporting procedure using /api/v6/assemblies/d/{}/w/{}/e/{}/translations
and payload = { "allowFaultyParts": True, "angularTolerance": 0.001, "formatName": "STEP", "storeInDocument": True, }
β€’ Wait for the /api/v8/translations/{requestId} requestState to be DONE
β€’ Download the STEP using /api/v8/translations/{requestId}


It works great, but now changing β€˜β€™formatName’’ to β€˜β€™OBJ’’ gives me the following error "Invalid resolution parameters were specified"

What changes to the payload should I make to make it work with OBJ ?

Thank you in advance !

Best Answer

  • Caden_ArmstrongCaden_Armstrong Member Posts: 199 PRO
    Answer βœ“

    Each file format requires different inputs. Same as the user interface shows different options.
    For OBJ Files you need to include resolution="fine". other values are "coarse","medium", and then I think you can do custom with some other additional properties such as distanceTolerance, maximumChordLength, angular tolerance.

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications

Answers

  • Caden_ArmstrongCaden_Armstrong Member Posts: 199 PRO
    Answer βœ“

    Each file format requires different inputs. Same as the user interface shows different options.
    For OBJ Files you need to include resolution="fine". other values are "coarse","medium", and then I think you can do custom with some other additional properties such as distanceTolerance, maximumChordLength, angular tolerance.

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
  • guillauem_dguillauem_d Member Posts: 17 ✭

    Indeed, after adding the resolution paramater, it works perfectly, thank you so much ! 😁

Sign In or Register to comment.