Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assembly 4 workbench

Post by vocx »

Zolko wrote: Wed Dec 04, 2019 10:00 am ...
Any suggestions ?
Honestly, you are the first developer that I see that prefers the wiki rather than GitHub for documentation. If you ask around most people feel that the wiki is old fashioned, old technology, so to speak; even cryptic, some people would say. Most people prefer the markdown syntax that GitHub offers, so there has even been talk of migrating the entire documentation to GitHub.

However, since nothing concrete about that has happened, I still think that the wiki is good enough, and not that hard to use.

Thus, my personal recommendation would be to write the documentation in the wiki following the style of the Draft Workbench. I do not like the A2plus Workbench page. It's a single, huge page, with a lot of information. I much prefer the structure that the core workbenches have, which is a central page, and then a page for each of the graphical commands, including instructions to use, example images, and even scripting information.

Take a look at the EM Workbench. It is one of the external workbenches. Its author wrote the documentation in the same style as Draft, PartDesign, TechDraw, etc., so it fits very well with the rest of the documentation.

I would suggest having the documentation only in one place, that is, the wiki, or your GitHub repo. In this way, the chances of having two different versions with diverging content are minimized. I like the wiki because anybody can edit, add information, correct errors, write tutorials, translate, etc. Obviously, you, as the author, should write the most important parts, and then power users who are experienced can add more details. alonso_jamm seems like he would like to work on the Assembly4 pages on the wiki, and I can provide help to make sure it is consistent with the rest of the wiki.

If you decide that the wiki is the "official" documentation, then in your GitHub repo you should provide only a quick example and then guide the reader to the wiki. But if you prefer to keep the documentation on GitHub, that is also valid as well.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 workbench

Post by Kunda1 »

Note: We're segwaying but it's still relevant to this thread (JIC we forget)

@vocx make very good points above.

Though if you're asking me, I prefer github or git-based documentation. Note: I want to make sure not to discourage the immense work that others have done (I've done some wiki work as well). Just expressing my personal opinion here about my experience/preference.

tl;dr IMHO keep the wiki to a pretty basic overview of Assembly4 with links to Github for more details and tutorials.
  • The wiki agitates my Attention Deficit Disorder due to the way the text flows (very long sentences) AND the formatting stylesheet we currently use (headers, font size, lack of graphical box templates that are easy to use, code formatting etc...).
  • Git based documentation also ensures that the info provided has a higher degree of precision/quality (because the maintainer has tighter control) of course PRs are still not 100% user friendly and therefore a barrier for entry to those who would like to volunteer their efforts.
  • Also git-based documentation is more secure (see previous reason)
  • Wiki as it is currently is not mobile friendly (header boxes don't show up correctly, bullet points transform in to periods etc..etc..)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

vocx wrote: Fri Dec 06, 2019 4:49 am I would suggest having the documentation only in one place, that is, the wiki, or your GitHub repo.
...
If you decide that the wiki is the "official" documentation, then in your GitHub repo you should provide only a quick example and then guide the reader to the wiki. But if you prefer to keep the documentation on GitHub, that is also valid as well.
I don't have a definitive opinion about this, only some comments:
  • yes, there should be 1 full documentation, and the other (wiki or github) pointing to the other
  • my opinion about the wiki was not about the formatting, but about the place
  • having documentation in the github repo means that each time the documentation is updated the user sees a new version of the WB to update, even if the code itself didn't change.
  • I've been involved in this Assembly4 / App::Link / Assembly Without Solver things for so long now that I probably miss what is really important for the user: I'll emphasize things that were difficult to code and not those that are difficult to use.
Kunda1 wrote: Thu Dec 05, 2019 8:10 pm as this WB gets more popular do you mind considering a documentation step/check for devs modifying (adding new/changing existing) functionality as you review PRs ? This way when the API or whatever changes that there is a check mark for updating the docs in both github and wiki and perhaps doxygen (or whatever other model you want to use to document the API)?
funnily, I've written my first post here 1 year ago, and I've never thought it would go this far. I've reached my level of incompetence a long time ago, so if FreeCAD user begin to use this workbench in significant numbers I think it would be really useful to have other maintainers on board. To be honest, I don't understand half of the words you're writing. I've tried to make an assembly WB that suits my needs, I'm more than happy about how far I've been able to bring this, but may-be time has come to talk about passing — or at least sharing — maintainership. There are important things that should be added/improved (better fasteners, arrays, variant links, assembly configurations, BOM, integrate other solvers, scalable UI...) and I don't know how to code those.
try the Assembly4 workbench for FreCAD — tutorials here and here
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assembly 4 workbench

Post by vocx »

Kunda1 wrote: Fri Dec 06, 2019 7:44 am ...
The wiki agitates my Attention Deficit Disorder due to the way the text flows (very long sentences) AND the formatting stylesheet we currently use (headers, font size, lack of graphical box templates that are easy to use, code formatting etc...).
This is just a matter of styling the wiki. It's HTML, it just needs proper stylesheets. Unfortunately, the admins of the wiki haven't really done much about this, and they have left it in the most basic state. What we need is somebody with web developing skills who actually can go inside and thinker with the wiki to fix these issues. Yorik at some point tried improving the appearance of the wiki but probably something didn't work right, so now the default Wikimedia style is used. He doesn't have time to do all!
[*]Git based documentation also ensures that the info provided has a higher degree of precision/quality (because the maintainer has tighter control) of course PRs are still not 100% user friendly and therefore a barrier for entry to those who would like to volunteer their efforts. ...
The problem is developers suck at documentation. Developers develop, they don't care too much about documentation. You should know, as you struggle to install the icon sets of triplus or the pyflow node editor of microelly2. Developers don't want to explain things, they want the "user" to figure things out because when they think of "users" they think of "power users" or other developers like themselves. This is the same thing Zolko says, "I probably miss what is really important for the user".
Wiki as it is currently is not mobile friendly (header boxes don't show up correctly, bullet points transform in to periods etc..etc..)
I don't understand why people would be looking at forums and the wiki on their mobile phones. FreeCAD is a desktop application. We should focus on the desktop experience above all. And by the way, my Firefox in my cellphone shows bullets without problem!
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assembly 4 workbench

Post by vocx »

Zolko wrote: Fri Dec 06, 2019 8:29 am ...
... To be honest, I don't understand half of the words you're writing.
Kunda just means that if you make an update, that you make a note to update the documentation as well (whether on the wiki or on GitHub).
... I've tried to make an assembly WB that suits my needs, I'm more than happy about how far I've been able to bring this, but may-be time has come to talk about passing — or at least sharing — maintainership. There are important things that should be added/improved (better fasteners, arrays, variant links, assembly configurations, BOM, integrate other solvers, scalable UI...) and I don't know how to code those.
Feel free to discuss in this thread or in a separate thread. Make a call for additional maintainers and developers. Pick the ones you trust the most. By reading these threads it sounds like there would be a quite a few people willing to join Assembly4 as maintainers and co-developers.

I briefly took a look at the codebase in GitHub and I think it could use a refactoring to improve the coding style to comply with Python standards.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Assembly 4 workbench

Post by ppemawm »

This is another example to demonstrate the simplicity and power of Assembly4 workbench for top-down design and in context modelling. This example can be compared to the work process shown in the Assembly3 tutorial found at: https://github.com/realthunder/FreeCAD_ ... ton-Sketch.

The Assembly4 work process I am using starts and ends in the Assembly4 workbench:

1. Create Model and the master sketch. Attach master sketch to the ObjectXZ of LCS0. Create LCS's and attach to master sketch vertex's for each Part as necessary.
2. For each component, create a Part and Body. Note that Parts are located in the Part folder and an LCS is included in each Part. Attach the Part LCS to its proper location vertex in the master sketch as was done with the Model LCS's.
3. Double click Body to activate and select Model>master sketch to create PartDesign>Shapebinder which can then be referenced in each sketch by using External Reference. Repeat for each component (Part). Body>Placement properties can be used to offset the body normal to the sketch plane as necessary.
4. Switch to Assembly4 workbench>Insert a link... for each Part following Zolko's excellent tutorial https://github.com/Zolko-123/FreeCAD_As ... TORIAL1.md
5. Once the assembly is completed it can be manipulated by changing the value in the Model>Variable list or with the Animator. The file is attached for reference.

This is a mechanism that simulates walking motion designed by Theo Jansen.<br /><br />All of the individual components were created in a single file as Assembly4 Part&gt;Body's.  The advantage of using the Assembly4 workbench is that the Part LCS's are created automatically.  These are then used to assemble all of the Parts in the Assembly4&gt;Model by defining and attaching assembly LCS's to the master sketch.<br /><br />Double clicking the Body in a Assembly4&gt;Part conveniently switches the workbench to PartDesign.  Each Body is then created from PartDesign&gt;Sketches by using appropriate Sketcher&gt;External Reference(s) to a Shapebinder of the master sketch.
This is a mechanism that simulates walking motion designed by Theo Jansen.

All of the individual components were created in a single file as Assembly4 Part>Body's. The advantage of using the Assembly4 workbench is that the Part LCS's are created automatically. These are then used to assemble all of the Parts in the Assembly4>Model by defining and attaching assembly LCS's to the master sketch.

Double clicking the Body in a Assembly4>Part conveniently switches the workbench to PartDesign. Each Body is then created from PartDesign>Sketches by using appropriate Sketcher>External Reference(s) to a Shapebinder of the master sketch.
Picture1.png (155.7 KiB) Viewed 2043 times
In top-down design a master sketch placed in the Model is used to control dimensions, design intent constraints, and position of all of the related components.<br /><br />The angle of the motor drive link is the single variable that controls all of the mechanism positions.  This variable is defined in the Assembly4&gt;Model&gt;Add Variable &gt;Motor which is then used in the master sketch angular constraint Expression as shown in the above dialog boxes.
In top-down design a master sketch placed in the Model is used to control dimensions, design intent constraints, and position of all of the related components.

The angle of the motor drive link is the single variable that controls all of the mechanism positions. This variable is defined in the Assembly4>Model>Add Variable >Motor which is then used in the master sketch angular constraint Expression as shown in the above dialog boxes.
Picture2.png (221.69 KiB) Viewed 2043 times
Assembly4&gt;Model LCS's are attached to the proper vertex's of the master sketch to locate each Part.  Note that Model LCS's can be used for multiple parts.
Assembly4>Model LCS's are attached to the proper vertex's of the master sketch to locate each Part. Note that Model LCS's can be used for multiple parts.
Picture3.png (123.13 KiB) Viewed 2043 times
This GIF is from individual images at every 45 deg.  In the attached file, the Assembly4&gt;Animator can be used to demonstrate motion.  The increment or step size should be no greater than about 20 deg or the master sketch may break likely due to some ambiguous constraints used in the master sketch.
This GIF is from individual images at every 45 deg. In the attached file, the Assembly4>Animator can be used to demonstrate motion. The increment or step size should be no greater than about 20 deg or the master sketch may break likely due to some ambiguous constraints used in the master sketch.
3it1p0.gif (266.09 KiB) Viewed 2043 times
.
Although all of the Parts are located in one file, note that each can be saved in a separate file using the Link tool briefly discussed in
https://forum.freecadweb.org/viewtopic.php?f=3&t=41431.

Questions or comments are welcome.
.
Theo_Jansen_Walker_Linkage.FCStd
(304.55 KiB) Downloaded 78 times
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18822 (Git)
Build type: Release
Branch: master
Hash: 0935aa9f5c446ef493e45abb3eba5ffc1af9f57d
Python version: 3.7.3
Qt version: 5.12.5
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..." ;)
gunasekaramani
Posts: 7
Joined: Thu Dec 05, 2019 5:41 am

Re: Assembly 4 workbench

Post by gunasekaramani »

How to add a part in assembly 4 workbench?
Is any video tutorial there?
If it is available means, kindly sent the link for it.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

gunasekaramani wrote: Wed Dec 11, 2019 6:05 am How to add a part in assembly 4 workbench?
Is any video tutorial there?
If it is available means, kindly sent the link for it.
There is no video, but there is a step-by-step explanation
Menu Assembly > Link External Part or click this icon in the toolbar: Image
Last edited by Zolko on Wed Dec 11, 2019 4:48 pm, edited 2 times in total.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

ppemawm wrote: Mon Dec 09, 2019 5:20 pm This example can be compared to the work process shown in the Assembly3 tutorial found at: https://github.com/realthunder/FreeCAD_ ... ton-Sketch.
...
Questions or comments are welcome.
Nice, really nice. I have 2 comments/questions :

1) how in the bloody hell did anyone come up with such a mechanism ? How did they think about this ? It's crazy. Wonderful, but crazy.

2) the update is much faster than in your previous models, but still, the master sketch alone (without any parts) updates in real-time, takes less than 0.1s to recalculate. I tried to play with that, moving and copying this master sketch, but I was not able to improve on your solution.

If you're really into the kinematics modelisation, there is one that is extremely funky: the main landing gear of the F-16. Contrary to most other movements, that one is not 2D but 3D, I believe that it needs some combinations of 2D Sketches. It was my goal to be able to model it with FreeCAD/Assembly4, and if it's possible to do that we can safely declare that we can model even very complex 3D mechanisms. Though I'm not sure it's possible.

Here are videos of the mechanism in action:

https://youtu.be/duwL60qYNR8?t=20
https://www.youtube.com/watch?v=QKxc9MUo5mY
https://youtu.be/AVzk5wx_qMk

Note that there is a final rotation of the wheel before closing the door. Detail of the wheel's rotation :
https://www.youtube.com/watch?v=Sozn06xV2LA

It's probably only this rotation that is tricky, the rest should be easier. I'd begin with that one.

https://www.youtube.com/watch?v=038vv04bDuo
https://www.youtube.com/watch?v=PlyIrL_PEmM
https://www.youtube.com/watch?v=hfYP2J0-ohs
https://www.youtube.com/watch?v=hJy9lW7OVew
https://www.youtube.com/watch?v=XODoZbavs6g
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
OficineRobotica
Posts: 433
Joined: Thu Feb 21, 2019 8:17 am
Contact:

Re: Assembly 4 workbench

Post by OficineRobotica »

Unfortunatly I'm not at the pc atm so that I can report the exact versions of software but this morning, after updating the module from the add-on manager all I get in A4 is 2 crossed icons. Even the Assembly menu voice has only 2 voices. It worked correctly before today's update(I mean me updating from the manager) .
Recent Freecad git app image on kde neon.
Any news on that?
Regards
Check out my Youtube channel at: https://www.youtube.com/@OficineRobotica
Post Reply