Assembly 3 - loco coupled wheels motion (solved)

Discussion about the development of the Assembly workbench.
User avatar
jpg87
Posts: 499
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby jpg87 » Thu Apr 08, 2021 6:34 pm

bambuko wrote:
Thu Apr 08, 2021 4:10 pm
However, whatever I did when trying to do all four wheels was fine until I tried to add coupling rods
Unless I am mistaken, when you constrain the 2nd connecting rod, the constraints become superabundant ... and the system hangs!
It would be necessary to remove the left coupled wheel (eg) from its kinematic equivalence class and then put it alone in a sub-assembly. This would then have to be constrained with the shaft of the “coupled wheels” sub-assembly by a “PlaneCoincident” constraint which would allow it to rotate.

bambuko wrote:
Thu Apr 08, 2021 4:10 pm
I tried testing it by changing the angle of one constraint...
and nothing happens (yes, I have changed "Lock Angle" setting).
I guess I have overconstrained it? (dof remaining: 0)
This is correct. Rotation was the only remaining DOF, so when you lock the angle to drive it, then DOF = 0.
If I remember correctly, every time you change the value of the angle; it is necessary to recalculate to obtain the displacement. Be careful, the angular displacement must be done in small steps (around 5 °, sometimes a little more also works).


Edit : I just tested. Just press Enter.
My website : http://help-freecad-jpg87.fr updated 2021/04/15
User avatar
bambuko
Posts: 390
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby bambuko » Thu Apr 08, 2021 6:50 pm

jpg87 wrote:
Thu Apr 08, 2021 6:34 pm
...It would be necessary to remove the left coupled wheel (eg) from its kinematic equivalence class and then put it alone in a sub-assembly. This would then have to be constrained with the shaft of the “coupled wheels” sub-assembly by a “PlaneCoincident” constraint which would allow it to rotate...
another thing to try - thank you :P

bambuko wrote:
Thu Apr 08, 2021 4:10 pm
...Be careful, the angular displacement must be done in small steps (around 5 °, sometimes a little more also works).
You are absolutely right - small increments are the order of the day.
I guess it works fine in animation because you do very small increments and short intervals so that solver doesn't get confused :ugeek:

One thing that still puzzles me (perhaps you know the answer?) is how do I define and fix start=0deg point?

I have made even more progress and it now works with the spreadsheet as well (hurrah :ugeek: )
Two constaraints (one for each wheel) control rotation of both wheels at the same time.
Now, just coupling rod left and than tying it up with opposite/RH side (which is 90 deg ahead of LH side)
test_spreadsheet.jpg
test_spreadsheet.jpg (1.21 MiB) Viewed 242 times
User avatar
bambuko
Posts: 390
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby bambuko » Fri Apr 09, 2021 7:50 pm

jpg87 wrote: ...
Well... it is now more than 5 days since I started ;)
I have learned a lot along the way (mostly thanks to your help - thank you!)

I can now constrain any assembly of two wheels (or two wheels and a coupling rod on the same side)
and I can rotate that assembly using expression from the spreadsheet.

But any attempts to animate four wheels connected with two coupling rods (to model real stuff) have failed.

I am giving up :cry:
Unless someone much cleverer than myself comes with the way to do it,
I will have to limit myself to just one side of the loco being assembled and animated...

Apart from that, the main question remaining un-resolved is how do define baseline where the crank is at 0deg.
Solver don't seem to understand that concept :lol: and is just happy to solve it in relation to the previous position (whatever it was).

Once again, thank you for your help and your excellent tutorials.
User avatar
jpg87
Posts: 499
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby jpg87 » Sat Apr 10, 2021 11:43 am

bambuko wrote:
Fri Apr 09, 2021 7:50 pm
...
I started all over again from the following components alone :
axlebox_driving ; driving_axle ; driving_wheel ; coupled_wheel ; driving_crankpin ; coupled_crankpin.

Even if it is not strictly necessary, I created for each of these components an assembly container (As _...) allowing to predefine the assembly elements that we will need later (if we forget some, it is always possible to add more at any time).

I created the kinematic equivalence classes (named sub-as _...).

I created the global assembly (Ass_complete). I haven't quite finished.

I have to be absent for other activities, but in the evening I will try to upload the file and answer (if possible) your other questions. ... and maybe add an animation file.
My website : http://help-freecad-jpg87.fr updated 2021/04/15
User avatar
bambuko
Posts: 390
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby bambuko » Sat Apr 10, 2021 12:27 pm

jpg87 wrote:
Sat Apr 10, 2021 11:43 am
I started all over again from the following components alone :
axlebox_driving ; driving_axle ; driving_wheel ; coupled_wheel ; driving_crankpin ; coupled_crankpin....
...I created the global assembly (Ass_complete). I haven't quite finished...
I have done all these steps as well (and many other variants),
I have also taken on board your other suggestions.
so it will be interesting to see what you will do differently and the results you will achieve.
Thank you for taking time and making effort to help me!

jpg87 wrote: ...in the evening I will try to upload the file and answer (if possible) your other questions. ... and maybe add an animation file.
I haven't had the time (yet) to learn the animation macro thing, otherwise I would have shared my results as well (so far I have put all the time and effort into Assembly 3).
I will patiently wait for your reply - take your time ;)
LHC
Posts: 149
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canada

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby LHC » Sat Apr 10, 2021 4:07 pm

We're traveling on parallel roads it seems....

I need to go back and follow your efforts and frustrations here in this thread as I am sure it will help me as well. However, that being said, I have just implemented the python/macro approach to animate an assembly I am working on and I must say it worked very well with the exception that the thing runs too slow for my liking. Shortening the time delay in the code does nothing as I am sure I am at the limit of the poor python interpreter and the rendering going on under the hood. However, I can pass along the following - if you are looking to animate something when you get to it, and you want to speed it up for demonstration purposes - what I did was to record it with a screen recorder, then found a website to upload the video and speed it up by 2x, 3x, 4x etc. It's sort of cheating I guess but it worked a treat !

With my small macro/python test being a success, I proceeded to slip down the rabbit hole and am now reading about Python and coding etc. in the FreeCad documentation. I may not get back to modeling for quite a while as a result. :lol:
User avatar
bambuko
Posts: 390
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby bambuko » Sat Apr 10, 2021 6:34 pm

LHC wrote:
Sat Apr 10, 2021 4:07 pm
We're traveling on parallel roads it seems....
There seem to be only few of us...

LHC wrote:
Sat Apr 10, 2021 4:07 pm
...I need to go back and follow your efforts and frustrations here in this thread as I am sure it will help me as well...
Happy to share experiences and frustrations ;)

LHC wrote:
Sat Apr 10, 2021 4:07 pm
...However, that being said, I have just implemented the python/macro approach to animate an assembly I am working on...
Animation is nice for presentation, but I cannot see how it helps with the actual design process.
I would prefer to stop, start, move to a specific place, stop again and then back to the starting point, all in a precisely controlled manner

LHC wrote:
Sat Apr 10, 2021 4:07 pm
...With my small macro/python test being a success...
Too many things to learn at the same time.
Python would be nice addition, but so would be finishing my design to the point, where I can go to the workshop and start cutting metal :mrgreen:

bat.jpg
bat.jpg (335.08 KiB) Viewed 90 times
User avatar
jpg87
Posts: 499
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby jpg87 » Sat Apr 10, 2021 7:13 pm

bambuko wrote:
Sat Apr 10, 2021 6:34 pm
but so would be finishing my design to the point, where I can go to the workshop and start cutting metal
Wonderful work. Congratulations. Beautiful machining work in perspective.

Here is my assembly file. I will continue tomorrow.
https://www.dropbox.com/s/0n6go3vpjvdi9 ... im.7z?dl=0
My website : http://help-freecad-jpg87.fr updated 2021/04/15
LHC
Posts: 149
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canada

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby LHC » Sat Apr 10, 2021 7:40 pm

Oh I'm no stranger to spending all my time designing and not actually building. Since last fall when Autodesk did the dirty with fusion 360 I've been struggling with Freecad and hoping (praying) I could get as good as I was with F360 after using it for 4 years. I've made progress albeit less than I would have liked.

The assembly and motion aspects are great but somewhat confusing for a noob due in part to multiple assembly workbenches with pros and cons. None are as smooth as the Fusion360 one but I'll take what I can get cause I'm never going back to Autodesk. I had over 600 models- all hobby stuff - that I offloaded from F360 last fall. The pain and rage while doing that will never be forgotten and it seems I'm not alone in this regard.

My latest quest is to try and come up with a workplan for fasteners. They are always a bit of a torment and the last items to be added to my models. At the moment I have been taking the following approach and if there is a better way or more efficient I'd like to hear about it.

1 - I place all my unique bodies in one file
2 - I create the assembly 3 container in that same file
3 - I make links to the bodies and then move the links into the assembly container
4 - If multiple bodies are needed in the assembly, I create more links and move them in as needed
5 - Fasteners - at the moment I am using the same technique as above. I am using the fastener workbench and each unique fastener has one original outside the assembly container with multiple links inside the assembly container as needed.

The joining of the fasteners to the assembly parts inside the assembly container is a bit tedious and made worse by the fact t that I am using a fixed attachment to save burden on the solver. But this often means I have to flip the element of the fastener on the x or y plane before making the attachment as it otherwise attaches itself upside down or with it's head buried in the part I am attaching it to.

One benefit of the above approach is that by altering the original fastener that is outside the assembly, it's possible to update all the fasteners in the assembly if you're playing around with a few different sizes for appearance. The holes themselves would have to be altered separately of course.

Cheers,
Lewis
User avatar
bambuko
Posts: 390
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly 3 - making progress (loco coupled wheels motion)

Postby bambuko » Sat Apr 10, 2021 7:43 pm

jpg87 wrote:
Sat Apr 10, 2021 7:13 pm
...Wonderful work...
...I will continue tomorrow...
Thank you for your kind words and all the work that you are doing (hopefully you are enjoying it as much as I do :) )
I have downloaded your file and will study it tomorrow.

Look forward to continuation and better understanding,