Assembly 4 workbench

Discussion about the development of the Assembly workbench.
User avatar
ppemawm
Posts: 746
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: Assembly 4 workbench

Postby ppemawm » Mon Nov 16, 2020 3:27 pm

topyra wrote:
Thu Nov 12, 2020 10:51 pm
I would like to create an axis that would go from one part in model to another part...there is an Axis_1 that I intended to go from Tube001.Edge5 (far end of bottom arm) to Tube002.Edge5 (top mount).
But unfortunately I am not able to do this - axle do not go thru end of bottom arm (Link001).
Looks like your post has been inadvertently missed, but hopefully you are still checking for an answer.

There are numerous problems with your model from my perspective. Assembly4 is primarily intended for modeling with PartDesign workbench although you should be able to assemble legitimate objects in a part container. After this first attempt you should probably go back and review the Assembly4 documentation and tutorials. It is my recommendation that you create each part in an Assembly4 body which automatically creates a default LCS and takes you into PartDesign. I rarely use the Part workbench so cannot offer any advice if you prefer to use that approach.

I could not sort out why you are not able to attach the reference axis. It is not recommended to attach LCS or datum to feature edges, vertices, or faces if you want a stable parametric model. If you make changes to any of the features these references may be lost and then the assembly will blow up.

I suggest the following Assembly4 proven approach:

Capture_shock.JPG
Create a master sketch in Model that represents the skeleton of the mechanism you are modelling. You can use this master sketch as the assembly solver. You can also use it for carbon copies that can serve as the basis for creating the features of all of the parts.

The master sketch should be created at an arbitrary value of the variable angle. The lengths that vary with position angle should be constrained with a "fix a length of line..." rather than horizontal or vertical dimensions.

Note that the two centerlines of the cylinders are connected with a Sketcher > "Fix a point onto an object..." which provides a slider constraint. The anchor ends of the cylinder centerlines are constrained with a "coincident..." constraint which provides a pin joint which is free to rotate in the sketch plane.

Verify that the sketch functions as expected by changing the variable angle over its full range of motion before using it for any reference to insure that it is stable.

Attach two LCS's in Model to the (EDIT): centerline edges of the sketch with an attachment mode of tangent or normal to edge. These will be the references you can use to assemble the two cylinders.
Capture_shock.JPG (258.92 KiB) Viewed 707 times
link_mastersketch.FCStd
(46.66 KiB) Downloaded 10 times
.
phpBB [video]


OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22894 (Git)
Build type: Release
Branch: master
Hash: 9eb080488d970d313c538473e7272117ea0a7cd1
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
"It is a poor workman who blames his tools..." ;)
topyra
Posts: 8
Joined: Thu Nov 12, 2020 8:55 pm

Re: Assembly 4 workbench

Postby topyra » Tue Nov 17, 2020 1:24 am

ppemawm wrote:
Mon Nov 16, 2020 3:27 pm
hopefully you are still checking for an answer
Sure I am checking - both for answer and new posts.

Thank you for your answer.
I like an idea of defining moving parts in sketch, like in Mads' tutorial with hexapod https://www.youtube.com/watch?v=i9uY9dXGJA8
But I think it is possible only when all part are moving within same plane, or two sketches move independently (like in both pods in Mads' example).

But how to simulate assembly where links with fixed length are moving in different planes?
So fully 3D parametric model.

Like in multi-link car suspension (source: https://en.wikipedia.org/wiki/Multi-link_suspension)
Where are 5 links (with fixed length) that defines relative position between car body and wheel knuckle.

Rear:Image
Top:Image

Is this possible to simulate it in Assembly 4? Or maybe other FreeCAD tools are better to do something like this?

So far I was calculating such things in Octave (something like Matlab) or in C++, using numeric simulation to (hopefully) get stable solution for set of equations for each link.
But FreeCAD looks way more convinient because 3D modelling, Assembly tools, presentation etc. (that is why I started to learn FreeCAD).

Guessing I still can just port my Octave code to Python and embed it in FreeCad to do all calculations, but before I start developing own tool, maybe there are already done (and better) tools and methods already available?
User avatar
Zolko
Posts: 1103
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Postby Zolko » Tue Nov 17, 2020 10:15 am

topyra wrote:
Tue Nov 17, 2020 1:24 am
Is this possible to simulate it in Assembly 4 ? Or maybe other FreeCAD tools are better to do something like this?
This is not possible with Assembly4 today. May-be A2+ or Assembly3.

There is (was ?) a development to include a solver for Assembly4 but it is not finished. It worked the last time I checked, but it didn't do much, it was more a proof-of-concept than a real solver. The principle is to solve for 3D objects in the assembly file, much like a master-sketch but in 3D. Then, it was possible to attach external parts to the calculated LCS.

I very much like the idea and principle, it fits quite nicely with the Assembly4 way of doing, but I don't have the time to test and improve.

Guessing I still can just port my Octave code to Python and embed it in FreeCad to do all calculations, but before I start developing own tool, maybe there are already done (and better) tools and methods already available?
To my knowledge there is nothing finished and available in FreeCAD. A2+ uses a custom solver coded in Python by kbwbe, and Assembly3 uses the external SolveSpace solver.

If you have ideas, it would be really cool to share and discuss them. May-be in a dedicated thread ?
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
User avatar
mfasano
Posts: 102
Joined: Wed Apr 11, 2018 12:31 pm

Re: Assembly 4 workbench

Postby mfasano » Wed Nov 18, 2020 2:08 pm

topyra wrote:
Tue Nov 17, 2020 1:24 am
ppemawm wrote:
Mon Nov 16, 2020 3:27 pm
hopefully you are still checking for an answer
Sure I am checking - both for answer and new posts.

Thank you for your answer.
I like an idea of defining moving parts in sketch, like in Mads' tutorial with hexapod https://www.youtube.com/watch?v=i9uY9dXGJA8
But I think it is possible only when all part are moving within same plane, or two sketches move independently (like in both pods in Mads' example).

But how to simulate assembly where links with fixed length are moving in different planes?
So fully 3D parametric model.
I am working on an multibody dynamics workbench that should do what you want eventually. It is only in the beginning stages. I hope soon you can simulate something as complex as a car suspension system.

The discussion of the work bench is here.
https://forum.freecadweb.org/viewtopic. ... &start=110

You can get the workbench here.
https://github.com/mfasano727/MBDynFCwb

I have written a couple of tutorials for this workbench. It uses Assembly 4 so the tutorials show how to model simple mechanisms with assembly 4. They can be found in the wiki of the workbench repository. I do not use a master sketch, and place some LCSs using the parts geometry. I guess that is a no-no, but it is easy.
topyra
Posts: 8
Joined: Thu Nov 12, 2020 8:55 pm

Re: Assembly 4 workbench

Postby topyra » Wed Nov 18, 2020 9:53 pm

Zolko wrote:
Tue Nov 17, 2020 10:15 am
If you have ideas, it would be really cool to share and discuss them. May-be in a dedicated thread ?
I am really rookie in CAD at all - my experience is rather around graphics and physics engines programming.
So first thing first - I'll look around what is possible right now, and get some experience using FreeCAD and workbenches.
Then maybe I'll find some useful ideas and we can discuss it.
mfasano wrote:
Wed Nov 18, 2020 2:08 pm
I am working on an multibody dynamics workbench that should do what you want eventually.
Thanks, I'll check it.
EskiBrew
Posts: 67
Joined: Fri Apr 24, 2015 10:21 am

Re: Assembly 4 workbench

Postby EskiBrew » Fri Nov 20, 2020 7:35 pm

Can anyone give me some pointers for trying to assemble a chain (made of multiple links) around differing sized sprockets?
I've drawn a master sketch which shows the path of the chain but I can't figure out how to attach appropriate LCS to that...
User avatar
Zolko
Posts: 1103
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Postby Zolko » Sat Nov 21, 2020 5:39 pm

EskiBrew wrote:
Fri Nov 20, 2020 7:35 pm
Can anyone give me some pointers for trying to assemble a chain (made of multiple links) around differing sized sprockets?
I've drawn a master sketch which shows the path of the chain but I can't figure out how to attach appropriate LCS to that...
Did you try Draft_PathArray ?
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
EskiBrew
Posts: 67
Joined: Fri Apr 24, 2015 10:21 am

Re: Assembly 4 workbench

Postby EskiBrew » Sat Nov 21, 2020 8:46 pm

Zolko wrote:
Sat Nov 21, 2020 5:39 pm
Did you try Draft_PathArray ?
Thank you, no, I had not tried that - it seems to work 8-)
User avatar
bambuko
Posts: 222
Joined: Thu Oct 24, 2019 12:53 pm

Re: Assembly 4 workbench

Postby bambuko » Tue Nov 24, 2020 7:58 pm

I am beginning my first tutorials in Assy4 and I am somewhat puzzled by the icons in the tree view.
That's what they look like to me:
assy4a.png
assy4a.png (23.14 KiB) Viewed 122 times
I don't understand why is the icon for "Part" the same as for the "Model"?
Why doesn't it look like this:
assy4b.png
assy4b.png (23.06 KiB) Viewed 122 times
I hesitated before asking, because it seems like a stupid question ;)
but hopefully someone will be patient enough with the newb, to explain to me what am I missing?

and one more question, please:
how do you modify variable?
Reading instructions:
Modifying a variable is done in the Properties window of the Variables object.
how do you rename the variable (short of deleting existing one and creating new one?)
Tutorial I am following uses both "Dist_pivot" and "Disk_pivot"
so having created "Disk_pivot" in the first place I thought I'd easily correct it to "Dist_pivot", but... don't seem to be able to do it?

BTW if all these questions are too stupid or to simple or inappropriate in this thread - let me know please and I will start separate thread seeking assistance with my difficulties :ugeek:

Code: Select all

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23058 (Git)
Build type: Release
Branch: master
Hash: 6e60870ebcb2df018adb7a1281c00dde87750f11
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
User avatar
Zolko
Posts: 1103
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Postby Zolko » Wed Nov 25, 2020 2:20 pm

bambuko wrote:
Tue Nov 24, 2020 7:58 pm
I don't understand why is the icon for "Part" the same as for the "Model"?
because a "Model" is a "Part" called "Model".

how do you rename the variable (short of deleting existing one and creating new one?)
you can't.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here