Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
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 »

Thank you for updating the tutorial.

I followed your tutorial step-by-step and successfully created and animated the model.
A couple of additional comments:
  • When creating the disk "....set nipple along the X axis at the distance Disk_pivot from the origin" should be R_disk.
  • When creating the LCS_pivot I would generally recommend that it be attached to the master sketch rather than arm edge to have a model more tolerant to any changes in features
Zolko wrote: Thu Jan 09, 2020 9:08 am what do you mean ? For me, adding variables also works when nothing is selected.
I only note that Variables is greyed out if Parts or Part or Body is selected in the tree until the 3D view is clicked.
"It is a poor workman who blames his tools..." ;)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

ppemawm wrote: Thu Jan 09, 2020 4:01 pm
  • When creating the disk "....set nipple along the X axis at the distance Disk_pivot from the origin" should be R_disk.
yes, of course, fixed.

ppemawm wrote: Thu Jan 09, 2020 4:01 pm
  • When creating the LCS_pivot I would generally recommend that it be attached to the master sketch rather than arm edge to have a model more tolerant to any changes in features
I understand. That's probably the small difference between your method and mine. I don't have a definitive opinion on that.

Does the short description of master-sketch / top-down design correspond to what you had in mind ? Is it understandable for a moderately experienced designer ?
Last edited by Zolko on Fri Jan 10, 2020 11:11 am, edited 1 time in total.
try the Assembly4 workbench for FreCAD — tutorials here and here
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 »

Zolko wrote: Thu Jan 09, 2020 4:10 pm Does the short description of master-sketch / top-down design correspond to what you had in mind ? Is it understandable for a moderately experienced designer ?
I do think that it should be adequate for an experienced designer. In any event, it can be easily googled for more information about how other CAD designers handle it.
There is not much discussion on the Forum regarding top-down or in-context assembly modelling so this may be somewhat of a new approach to many users although there is more discussion about master sketches and animation.
"It is a poor workman who blames his tools..." ;)
toralf
Posts: 48
Joined: Fri May 03, 2019 3:54 am

Re: Assembly 4 workbench

Post by toralf »

Thank you for the excellent tutorial.
There are still a few typos but that didn’t caused any trouble.
Could you please explain In the Tutorial why the body has to be created With the asm4 wb and not with the part design wb.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

toralf wrote: Thu Jan 09, 2020 7:51 pm Could you please explain In the Tutorial why the body has to be created With the asm4 wb and not with the part design wb.
yes, I added a line for it (it's because if you add a PartDesign::Body through the Assembly4 workbench, it will be added automatically to the App::Part that is selected. If you add it via PD the Body is put at the root of the document)

Also, I merged the tutorial into the master branch.

Thank-you all for your comments and improvements
try the Assembly4 workbench for FreCAD — tutorials here and here
toralf
Posts: 48
Joined: Fri May 03, 2019 3:54 am

Re: Assembly 4 workbench

Post by toralf »

I posted a PullRequest on GitHub to fix some typos i found.
Yngman
Posts: 1
Joined: Sun Jan 12, 2020 9:27 am

Re: Assembly 4 workbench

Post by Yngman »

Hi! I'm relatively new to FreeCAD and stumbled upon the original thread when trying to figure out how to acquire the transformation matrix of the linear transform between the (6D) spaces. However, that was just to properly center imported meshes and SVG files once to reduce visual annoyance when modelling...

Now in need of functional LCS coincidence (i.e. Attachment), this WB proved simple yet exactly what was needed. Awesome (and impressively quick) work!
However, there's one more feature I'd like: Independent parametrization of App::Link's (linking the same file/Model). In the properties I find:

Code: Select all

[Parameters]
Configuration: Default
Is this what I'm looking for (if so, how do we use it)? I've parametrized the linked file with Variables, but I don't manage to "override" my "file defaults" (per linked copy) as I had hoped for. I'd like the Model linked to use lengths defined in the assembly document, unique for each App::Link. It would of course not be difficult to just copy the linked document and change them, but I don't sleep well knowing I've introduced such digital redundancy...

I'm impressed by how quickly Python was picked up! Being a serious hobby of mine (and my favourite language), I'm sorry for the unsolicited advice below...
I recommend getting the codebase architecturally sane (i.e. "Pythonic" and thought out) and PEP styled, before it grows to large. If you're new to developing and prone to "just getting it done", be wary of the horrors of an unmaintainable codebase down the line! It might seem ridiculous to fix non-semantic "style issues", but there's good reason for that too: Clean, "de-personalized" coding highly reduces overhead/noise for contributions from experienced Python developers. Just a tip!
User avatar
adrianinsaval
Veteran
Posts: 5548
Joined: Thu Apr 05, 2018 5:15 pm

Re: Assembly 4 workbench

Post by adrianinsaval »

Yngman wrote: Sun Jan 12, 2020 10:15 am However, there's one more feature I'd like: Independent parametrization of App::Link's (linking the same file/Model).
That's actually one of Zolko's request, saldy it seems its not trivial. However, if I understood correctly you can kinda do that with subshapebinders, you bind the part with a certain configuration and then change it's bind mode to frozen, then repeat as necessary with each configuration you need.

This should be made easier if/when Realthunder's pull request is merged.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assembly 4 workbench

Post by vocx »

Yngman wrote: Sun Jan 12, 2020 10:15 am ...
I recommend getting the codebase architecturally sane (i.e. "Pythonic" and thought out) and PEP styled, before it grows to large. ...
Zolko wrote: Thu Dec 19, 2019 8:54 am ...
The longer answer is: as you could see, I don't know how to do all the things that you're saying (or I'd have done it before), so If you have proposals please feel free to do so.
vocx wrote: Thu Dec 19, 2019 6:24 pm The basic PEP8 document that you will hear about a lot is this one: PEP 8 -- Style Guide for Python Code. Take your time to read it.

Also important is PEP 257 -- Docstring Conventions.
...
You are welcome to contribute with improvements to the Python style.
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
OficineRobotica
Posts: 433
Joined: Thu Feb 21, 2019 8:17 am
Contact:

Re: Assembly 4 workbench

Post by OficineRobotica »

Small note on Zolko's tutorial Tutorial2

I don't know if this is system or configuration dependent but using Freecad appimage:

Code: Select all

OS: KDE neon User Edition 5.17 (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19056 (Git) AppImage
Build type: Release
Branch: master
Hash: 7dbc309015606fca1aa1f1561ae166ef719b2234
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
At this point of the tutorial where the arm part is ultimated :

Create a new coordinate system, call it LCS_pivot

this LCS_pivot must be at the root of the part arm and not in the Body

Attach LCS_pivot to the original LCS of the part arm (called LCS_1002 in our design, this might be different for your model) with the Object's X Y Z mode

set the ExpressionEngine of the X value in the AttachmentOffset to Disk_pivot

Click OK
I encountered the following difficulties:

-when attaching LCS_pivot to LCS_1002 , if the selection is made in the 3d view , the attachment will be " LCS_1002:Z " . That is: the attachment is mapped to a single axis of LCS_1002 . The axis that one happens to click when trying to select LCS_1002 in the 3d view. The attachment must be edited manually to get the desired mapping. Although this might seem nitpicking, it should be pointed out in the tutorial only because , for a beginner, mapping of LCS's and mapping modes can get confusing FAST. Even after a while using them I still struggle at times with the mapping modes trying to get them to do what I really want them to do.

-on my system, the Fx button inside the attachment dialog is replaced with a green, unclickeble button, and that prevents setting up the attachment offset.
I can however set up the offset afterwords in the data panel
tutorial2.png
tutorial2.png (285.12 KiB) Viewed 2149 times
Thank you for a great tutorial. Cheers
Check out my Youtube channel at: https://www.youtube.com/@OficineRobotica
Post Reply