Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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 single parts and surface within a part studio as seperate stl files
tanja_matzerath
Member Posts: 9 EDU
in General
Hey everyone,
I am using a python script to export a PartStudio as stl. For this I have created a function as described here (https://colab.research.google.com/github/PTC-Education/PTC-API-Playground/blob/main/Onshape_API_Snippets.ipynb#scrollTo=Ql6qSU3pzWEC ; 01.5 PartStudios -Export STL).
However, my PartStudio consists of individual parts and surfaces.
So my question is: How can I pass the information to the client which part or surface I want exported as stl? An alternative would of course be to store the individual parts in one sheet each, so that the element ID changes, but I don't like this solution very much.
Does anyone have an idea?
Thanks in advance
0
Comments
https://cad.onshape.com/api/partstudios/d/{}/w/{}/e/{}/translations
, you can send along parameters such as individual part IDs you want. You could use the parts endpoint to retrieve the part IDs and then grab the one you want. Then, for example, you could add to your POST request.Example:
https://colab.research.google.com/drive/100W3o_Fw_cXdPbWplirfsUOLfKms92bH?usp=sharing