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.
Animating a train around a track
sarah_jacques
Member Posts: 5 EDU
I am trying to get a train to move around a train track and I am having trouble constraining the train to the track. I have been able to get the train to rotate around a pivot point while the wheels turn but the train is just floating in mid air. I have done this in Inventor, but not having some of the same constraints such as the mate, flush and angle constraint is really throwing me off. Any help would be greatly appreciated. Here is a link to the file: https://cad.onshape.com/documents/54227ea1cae17752668aaf85/w/1b9805dae8028477adc30e47/e/6c7edcc322101c9aaba99398
0
Comments
You need some sort of controlling parts. I have a few hidden to help drive the car around the tracks. It seems to stop short of one revolution so I'm am trying to debug that now.
Twitter: @bradleysauln
Here in another old example with dual tracks
Edit: Just realized you asked about animating. not just mating.
Clever use of the revolute/slider mate bradley. For a more constant speed though, a lot more work will need to be done.
If you need it to zig/zag like we are showing, You will likely need a couple of relations that reference an X and Y axis, then plot the path specifically for the track.
Fortunately for you Sarah, you only have a circular track. So Bradley's method will be perfect for that configuration.
It seems to be stopping because the track goes a little bit back on itself in relation to the rotation
IR for AS/NZS 1100
Twitter: @bradleysauln
It also seems to be happening slightly on another bit (highlighted in the image below). It only stops it working when I set steps to a large value, like 3000.
IR for AS/NZS 1100
So what constraints should I actually do to get the train onto the track? I can't seem to get the train to stay on the track, I have tried the tangent contraint, planar constraint, and some of the other constraints.
Twitter: @bradleysauln
I am sorry to keep asking questions, it's been really hard trouble shooting this without another set of eyes. I have spent quite awhile looking at what you have and then trying to do something similar with mine. I tried to do the planar mate, but then it's not letting me do the tangent mate with my wheels. I have tried changing the shape of the wheel, changing dimensions of the track, making the track all one part instead of circular patterning and I am still not getting anywhere. I can get the train to revolve around, but can't seem to get it to stay on the track. I really have been spinning my wheels. Any help would be so appreciated. Thanks!
P. S. No need to apologize, that's why we visit the forum, to answer questions.
I don’t know if this will help or not. But for what it’s worth ...
In the document below, there’s a swingarm that always has some kind of forward progress along the track as that arm revolves. SEE THE POST BELOW
https://cad.onshape.com/documents/ad6c0e6162ce8afa575e0b1e/w/f79066c5115e583468e0b5ca/e/9e63f1c1ffdaa1a0b63d9bd2
When laying out the track, It looks like when the swingarm became tangent to the track, or crossed a point tangent or parallel to the track, that no forward progress was being made along the revolve at that time, and it caused the no forward movement of the swing arm to conflict with the engine trying to revolve that swing arm. So at that point, the animation would either hang or make the car jump along the track
So the track is designed to not have any sections where swing arm becomes tangent or parallel to the track
This is more like the round track you have