onshape-public / onshape-clients

All Onshape clients for interacting with the Onshape API.
MIT License
32 stars 26 forks source link

[Python] PartApi: Export STL missing #51

Open francesco-romano opened 4 years ago

francesco-romano commented 4 years ago

I was trying to export the STL of a single part (as identified by an element_id and part_id) but while the call exists in API Explorer, it does not exist in the Python parts_api counterpart.

There exist a corresponding API in PartStudios, but unfortunately it returns the STL for the whole element, while I need the single components. Is it possible to add this function to the exported APIs?

(The endpoint I am looking for is /parts/d/:did/[wvm]/:wvm/e/:eid/partid/:partid/stl)

capfish commented 2 years ago

In case you never solved this, you're able to select parts to export from the part studios API via the part_ids kwarg. See: https://github.com/onshape-public/onshape-clients/blob/20843a00c628e516e7219e17a23ec4ef2bf9f16f/python/onshape_client/oas/api/part_studios_api.py#L900