REST API - Exporting to STEP works, but exporting to OBJ does not
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
-
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 ---Β RenaissanceΒ --- KestrelΒ -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications1
Answers
-
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 ---Β RenaissanceΒ --- KestrelΒ -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications1 -
Indeed, after adding the resolution paramater, it works perfectly, thank you so much ! π
0
Categories
- All Categories
- 10.2K Community Support
- 4.6K General
- 194 Account and subscriptions
- 353 Data management
- 1.6K Product Feedback
- 215 New in Onshape
- 14 Onshape Labs
- 75 CAM Studio
- 35 PCB Studio
- 107 Simulation
- 209 Onshape Mobile
- 315 App Store & Partners Apps
- 8.2K Using Onshape
- 1.8K Drawings
- 2.3K FeatureScript
- 324 Learning Center
- 253 Education Community
