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.
Animation (with/without) feature script in Part Studio
I've created a model of non trivial linkage (Walschaert motion in a steam locomotive). in a Part Studio.
I have a single variable (driven wheel rotation angle) that makes the linkage go through motions nicely.
I tried to do the same in Assembly but never got it to work. Perhaps the solver in assembly is not as capable as in the Part Studio, anyway I gave up, it was very painful to set up and never got it to work.
So my question is can I use a Feature Script with timer or something to animate it in Part Studio?
I realise it might kind of slow but for my purposes I could do a screen capture and edit the resulting video for the speed I want.
Comments
I have used a quick API script to change mate positions and grab screen shots to create complex animations before.
Thanks Matt, can you point me to an example if you have one?
Here is a script that grabs images using Python. I think it uses named views and the shadedviews endpoint. Other endpoints could be used to update assembly mates rather than using named views. And you could also just do a screen recording if you don't want to use the shadedviews endpoint. But I think this script could get you started.
https://github.com/PTC-Education/PTC-API-Playground/blob/main/Onshape_Animation_GIF_Generator.ipynb