Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wieszak17
Posts: 250
Joined: Fri Jan 10, 2014 7:59 pm

Re: Assembly 4 workbench

Post by wieszak17 »

I have one maybe trivial problem:

I created few files (each have model with part with body). Now I'm creating file which makes assembly of that parts. I have imported all parts, positioned them and it is ok. But now, i click save, FC ask me if i want also save referenced files, ok. Closing all files. So for so good. Now i'm opening this 'master' file, it shows assembly, then without editing anything i close it. FC shows then one of file with subpart and as edited one. i click close, fc ask if i want to save changes (what changes?) and so on with all files referenced in master file. Am I doing something wrong? Or it could be avoided somehow? Yes, i could save all files after each open, but what for?
Grawp
Posts: 45
Joined: Sat Mar 03, 2018 9:34 am

Re: Assembly 4 workbench

Post by Grawp »

vocx wrote: Sun Oct 20, 2019 5:07 pm
Grawp wrote: Sun Oct 20, 2019 9:48 am ...
I've looked through the wiki but haven't noticed any case where assembly is used for creation of further models (I mean anything other than just pure assemblies).
I think this is the wrong approach. An Assembly workbench should just assemble objects that were previously created. It shouldn't be used to do further modifications on the imported parts. If you want to do this, you should import the to bodies that you have into the same document, and then perform boolean transformations with them, and then import the resulting part into the bigger assembly.
Basic use case is doing cutouts in enclosures, molds etc..
https://github.com/realthunder/FreeCAD_ ... g-Assembly
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

wieszak17 wrote: Sun Oct 27, 2019 5:13 pm Now i'm opening this 'master' file, it shows assembly, then without editing anything i close it. FC shows then one of file with subpart and as edited one. i click close, fc ask if i want to save changes (what changes?) and so on with all files referenced in master file. Am I doing something wrong? Or it could be avoided somehow? Yes, i could save all files after each open, but what for?
yes, this is an App::Link "feature" : the documents for parts of the assembly do actually exist in memory, even if they're hidden, so when you close the master assembly document they pop-up from behind. There was a time when all documents pointing to all parts in an assembly where opened, so we made big progress. And when you say you didn't modify them, that doesn't mean FreeCAD didn't modify them, like with an update, recompute ...

App::Link's handling of documents is not completely resolved yet. There is a thread that deals with the App::Link merging, may-be you can describe your observations there.
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: Sun Oct 20, 2019 8:05 pm In conclusion, it seems that the Assembly4 workbench interfaces quite nicely with the process I am using for in-context modelling with all bodies in the same file. The only change I have to make is to add each body to a Part container as I model.
There is a new version of Assembly4, v0.6.4, with improved handling of assemblies in 1 file. Also various small fixes. Next update might be more important, hopefully with support for variants and configurations.
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 »

Zolko wrote: Sun Oct 27, 2019 6:15 pm ... There is a thread that deals with the App::Link merging,...
Please do not post in that thread Zolko. That thread was made by Werner to review the quality of the C++ code written by realthunder. It was okay up until the 5th page or so, when the discussion was centered only on the previously written code, encountered problems, and proposed solutions. It was not meant to discuss new features and improvements on App::Link.

For new material, the big Assembly3 thread was always used, or you could also use App::Link: the big merge, I guess. But better than that, create a new thread with your specific topic, that is better to avoid derailing a previous conversation.

See what ezzieyguywuf did
ezzieyguywuf wrote: Sun Sep 08, 2019 11:33 pm I've decided that this conversation warrants it's own thread. If you'd like to continue the discussion, please view the link I posted. Sorry for the ridiculous length....I guess you could say I'm passionate about the topic :-P
He stopped hijacking the thread, and decided to move his conversation to a separate thread. This is the proper way of doing things.
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 »

Zolko wrote: Tue Oct 29, 2019 8:13 am There is a new version of Assembly4, v0.6.4, with improved handling of assemblies in 1 file.
Thank you for that.

I was wondering how Assembly4 might interface with master sketches controlling an articulated assembly in one file so came up with this example. Drawings are available here: http://www.inventorwizard.nl/blueprints/index.html.

The master sketch is constrained to control all of the major components placement by changing a length constraint highlighted in the following image. I learned the hard way some time ago that it is important to first exercise the master sketch over its full range to insure that there are no ambiguous constraints that may cause the sketch solver to fail. All of the bodies were then created in context from modified carboncopies of the master sketch in their proper place in the assembly.

Picture1.png
Picture1.png (192.58 KiB) Viewed 2385 times
By changing the length constraint in the master sketch the model can be shown to represent any opening of the clamp. Screws from the Fasteners workbench were attached to edges so that they travel with the components as they move. However, there was no way to attach a downloaded STEP model of a circlip retainer.

Picture2.png
Picture2.png (231.11 KiB) Viewed 2385 times

Linking the retainers to their proper place in the assembly was remarkably easy to do with Assembly4. Each retainer was given an LCS at its global origin then an LCS in the Part Model was mapped concentric to to an edge of the retainer groove in each component and then linked. The Constraint Attachment Offset was used to adjust each retainer in its groove.

Picture3.png
Picture3.png (208.44 KiB) Viewed 2385 times

Though convenient, one downside to this approach is that the fasteners and retainers attached to edges will likely fail from the dreaded topological problems if the related body features are changed.

Any comments and questions are welcome.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18615 (Git)
Build type: Release
Branch: master
Hash: a801ff5a236d9275c2dc184db5a457589b3eabc4
Python version: 3.6.7
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..." ;)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

ppemawm wrote: Tue Oct 29, 2019 8:32 pm All of the bodies were then created in context from modified carboncopies of the master sketch in their proper place in the assembly.
OK, now I understand how you do it. Intuitively, I thought that you make your design in a fixed position, in that context, and then you linked those parts into the assembly — in the same file — based on a master sketch representing the kinematics, and you hide the original parts, leaving visible only the links.

ppemawm wrote: Tue Oct 29, 2019 8:32 pm However, there was no way to attach a downloaded STEP model of a circlip retainer.
no, you need to first wrap (move) it into an App::Part. That was part of the tutorial, remember ? And in the App::Part you can then map many LCS to particular geometrical features of the STEP part, and place the STEP part into the assembly attached by those LCS, thus at those particular geometrical features.

ppemawm wrote: Tue Oct 29, 2019 8:32 pm Though convenient, one downside to this approach is that the fasteners and retainers attached to edges will likely fail from the dreaded topological problems if the related body features are changed.
yes, that's why I prefer to attach the LCS to a master sketch directly, because sketches are easier to build in a toponaming-safe way. And/or, whenever possible, place the LCS in its location as early as possible in the design process, thus it won't be affected if later you add new features.

ppemawm wrote: Tue Oct 29, 2019 8:32 pm Any comments and questions are welcome.
It certainly is impressive what you're doing. I just recently discovered the fastener workbench: how do you use it ? How did you place the screws relative to the holes ?
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 »

Hello shai,

I've recently discovered the Fasteners workbench, and I'm positively impressed. I've toyed with it, making simple assemblies, and it works surprisingly well with Assembly4.

Now, I'd like to integrate it better with the Assembly4 workflow, and I was wondering whether you're still maintaining the Fasteners workbench, and if you were willing to give some advice on how to use it best in another context. To begin I have 2 questions:

  • it doesn't seem possible to stack a fastener on top of another fastener, like placing a washer on a hole, and a nut on the washer. Did I miss something ?
  • the python command to generate a fastener returns a shape object, not a dynamic fastener that can be modified. Is there an option ?

Code: Select all

import ScrewMaker
sm = ScrewMaker.Instance()
screwObj = sm.createFastener('ISO4762', 'M6', '16', 'simple')
shaise wrote: Thu Jun 11, 2015 8:34 am As per the ReadMe: make sure to ping user 'shaise'
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: Tue Oct 29, 2019 10:14 pm no, you need to first wrap (move) it into an App::Part. That was part of the tutorial, remember ? And in the App::Part you can then map many LCS to particular geometrical features of the STEP part, and place the STEP part into the assembly attached by those LCS, thus at those particular geometrical features.
If you study the model tree in the third picture you will see that is what I did in order to use Assembly4 for the retainers and then grouped them in a folder.
Zolko wrote: Tue Oct 29, 2019 10:14 pm yes, that's why I prefer to attach the LCS to a master sketch directly, because sketches are easier to build in a toponaming-safe way.
I do too, but in this instance, the vertices were getting renamed in the master sketch for certain positions of the clamp opening with the way I first constrained the sketch. I later found a way to constrain the sketch so this would not happen, but it was too late since any change in the constraints usually blows up the carboncopies. Which is to say that you must be damn sure about the master before creating any bodies related to it.
Zolko wrote: Tue Oct 29, 2019 10:14 pm how do you use it ? How did you place the screws relative to the holes ?
For this example, I simply selected the hole edge at the fastener interface in the model and select the fastener. Then, I usually group these in a folder to organize the tree. It is a very useful workbench as long as the fasteners are standard metric.

In the project I am currently working on (a folding step ladder, from scratch, no drawings), I will see if they can be attached to the mastersketch somehow and then offset to their proper location:

Picture1.png
Picture1.png (111.85 KiB) Viewed 2212 times
Zolko wrote: Wed Oct 30, 2019 12:08 pm it doesn't seem possible to stack a fastener on top of another fastener, like placing a washer on a hole, and a nut on the washer. Did I miss something ?
Works OK for me by selecting hole edge to place the washer, select the washer hole edge to place the screw. They both will follow the body they are attached to.
"It is a poor workman who blames his tools..." ;)
im7thson
Posts: 9
Joined: Mon Oct 28, 2019 5:48 am

Re: Assembly 4 workbench

Post by im7thson »

Is it possible to use labels and spreadsheets with mathematical expressions to control an assembly? When experimenting with assembly I noticed that labels from one model do not appear in other model.
Post Reply