Assembly3, A2plus, Assembly4? Get united!

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3, A2plus, Assembly4? Get united!

Post by Zolko »

drmacro wrote: Thu Feb 27, 2020 3:35 pm Or is there a process in Assembvly4 that will manage this?
yes, indeed, I'm working on a button that says "Wrap any design that any user has ever made into a nice assembly. Oh, and also correct their mistakes". So no need to do anything, you can comfortably lay back and wait. And it's useless to read the instructions, they're a pure waist of time.
try the Assembly4 workbench for FreCAD — tutorials here and here
drmacro
Veteran
Posts: 8984
Joined: Sun Mar 02, 2014 4:35 pm

Re: Assembly3, A2plus, Assembly4? Get united!

Post by drmacro »

Zolko wrote: Fri Feb 28, 2020 7:17 am
drmacro wrote: Thu Feb 27, 2020 3:35 pm Or is there a process in Assembvly4 that will manage this?
yes, indeed, I'm working on a button that says "Wrap any design that any user has ever made into a nice assembly. Oh, and also correct their mistakes". So no need to do anything, you can comfortably lay back and wait. And it's useless to read the instructions, they're a pure waist of time.
Your sarcasm noted...and basically ignored. ;)

But, your implication that I've not read the docs, or watched the videos, or worked through the examples is conjecture on your part. I have and still had/have questions. Your assumptions that those docs, etc. are the way to enlightenment on all details...well, maybe for some. But, it takes me a while to connect the dots, I'm sorry my slow witted-ness offends you. :( (But, I get this a lot, because I'm not a "read it, learnt it" person and have to do it several times before I go back and re-read it and have the "oh, that's what that meant" moment. :idea: )

That said, I was not suggesting that you create a magic button; I was asking if I'd missed something that detailed how to use an existing library of parts. Is it assumed that Assembly4 should only be used for new designs? (obviously not, since the first tutorial uses STEP models of the bearing)

I am actively trying to understand how A4 works in a work flow (that being, my work flow, and how do I adapt my work flow to best take advantage of the functionality).

And speaking of docs...
A good example, from the docs:
Please Note: objects in the same document as the linked part but outside the App::Part container will not be inserted. The PartDesign workbench doesn't produce Parts, it produces Bodies. It is entirely possible to use Parts made with the Part workbench with Assembly4, but if you want to use Bodies made with the PartDesign WB you need first to create a Part and move the Body into that Part.
For an end user, who has no knowledge of the underlying structure of the FreeCAD object models this might as well have been written in Aramaic. ;) This paragraph alone could spawn a tutorial of it's own...or, a research project for the user to grok things they probably don't want to know. And, I get it, it's a difficult to convey this in a couple sentences. This example may be obvious developer types or long time users, but not so much for newcomers. (IMO)

I have a 40 year background in CAD software development and I've been digging into FreeCAD for 6 years; I had to read it several times and I'm still not sure I can use it as actionable knowledge.

All that said, I did an exercise with A4 yesterday, of my own design, that helped me solidify, in my mind, how it works. And, yes, I had to refer to the docs and the videos a couple times along the way. And as I progress, will no doubt spawn more questions that will offend you. For that I'll apologize now. :oops:
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Assembly3, A2plus, Assembly4? Get united!

Post by ppemawm »

drmacro wrote: Thu Feb 27, 2020 3:35 pm So, if I have a bunch of "things" designed in Part Design WB, do I need to go to each one and add a model container and move the body into the model for each part before use in Assembly4?
Part container.

The following threads may answer some of your questions:
https://forum.freecadweb.org/viewtopic. ... wm#p341631
https://forum.freecadweb.org/viewtopic. ... 20#p342185
"It is a poor workman who blames his tools..." ;)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3, A2plus, Assembly4? Get united!

Post by Zolko »

ppemawm wrote: Fri Feb 28, 2020 3:14 pm
drmacro wrote: Thu Feb 27, 2020 3:35 pm So, if I have a bunch of "things" designed in Part Design WB, do I need to go to each one and add a model container and move the body into the model for each part before use in Assembly4?
Part container.
yes, you'll have to wrap each and every body into a Part container. Not necessarlily an Assembly 4 Model (which is a Part container), any FreeCAD Part (Std_Part, App::Part) will do. The easiest is to create such a Part in the same document as your current design is (you can use the magic Assembly4 button "Create Part") and then drag (in the tree) your existing design to the Part container you just created. Exactly as the STEP example in the first tutorial.

Now that you mention this ... would a FAQ section in the README help ?

drmacro wrote: Fri Feb 28, 2020 1:41 pm For an end user, who has no knowledge of the underlying structure of the FreeCAD object models this might as well have been written in Aramaic. ;) This paragraph alone could spawn a tutorial of it's own...or, a research project for the user to grok things they probably don't want to know. And, I get it, it's a difficult to convey this in a couple sentences. This example may be obvious developer types or long time users, but not so much for newcomers.
this is actually a fair point, and shows that writing documentation is not easy. People tend to put emphasis on what is difficult for them, and that goes also for developers. It took months of trial and error (with great help from realthunder and all the testers) to get to the current setup, so I thought it important to write it down. This should probably belong to the technical manual.
try the Assembly4 workbench for FreCAD — tutorials here and here
drmacro
Veteran
Posts: 8984
Joined: Sun Mar 02, 2014 4:35 pm

Re: Assembly3, A2plus, Assembly4? Get united!

Post by drmacro »

Zolko wrote: Fri Feb 28, 2020 4:53 pm
ppemawm wrote: Fri Feb 28, 2020 3:14 pm
drmacro wrote: Thu Feb 27, 2020 3:35 pm So, if I have a bunch of "things" designed in Part Design WB, do I need to go to each one and add a model container and move the body into the model for each part before use in Assembly4?
Part container.
yes, you'll have to wrap each and every body into a Part container. Not necessarlily an Assembly 4 Model (which is a Part container), any FreeCAD Part (Std_Part, App::Part) will do. The easiest is to create such a Part in the same document as your current design is (you can use the magic Assembly4 button "Create Part") and then drag (in the tree) your existing design to the Part container you just created. Exactly as the STEP example in the first tutorial.

Now that you mention this ... would a FAQ section in the README help ?
After re-reading the treatise by vocx here: https://forum.freecadweb.org/viewtopic.php?f=8&t=40229
and, staring at this diagram for a while: https://www.freecadweb.org/wiki/File:Fr ... bjects.svg

Light is beginning to break over marblehead...

I don't see the Std_Part object though...

A little fuzzy on why a PartDesign::Body (which I think is inherited from a Part::Feature??) can't be used directly, but a Part::Feature>3D object can.
(I'm sure this my general fuzziness...and the whole nomenclature that has been discussed elsewhere at great length.)

But it appears that Assembly Parts is where the Part::Feature or PartDesign::Body objects go in the Assembly4 Model?
Zolko wrote: Fri Feb 28, 2020 4:53 pm
drmacro wrote: Fri Feb 28, 2020 1:41 pm For an end user, who has no knowledge of the underlying structure of the FreeCAD object models this might as well have been written in Aramaic. ;) This paragraph alone could spawn a tutorial of it's own...or, a research project for the user to grok things they probably don't want to know. And, I get it, it's a difficult to convey this in a couple sentences. This example may be obvious developer types or long time users, but not so much for newcomers.
this is actually a fair point, and shows that writing documentation is not easy. People tend to put emphasis on what is difficult for them, and that goes also for developers. It took months of trial and error (with great help from realthunder and all the testers) to get to the current setup, so I thought it important to write it down. This should probably belong to the technical manual.
Hmm...yes, it probably needs to go somewhere, there is good. But, this leads me to a thing that I've discussed many times over the years. IMO, there is a difference between documentation (details of how the software works, routines get called, explanations of arguments, theory of operation, etc.), and end user documentation. That's not to say there isn't overlap, indeed as the user doc moves to more advanced topics, the more overlap. As you note, documentation is hard. Breaking it down into digestible parts for padawans is even tougher. Here I'm thinking how to explain this stuff without using "geek speak" like "inherited objects", etc. Examples go a long way in the hand holding...but I don't have a ready answer.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assembly3, A2plus, Assembly4? Get united!

Post by vocx »

drmacro wrote: Fri Feb 28, 2020 7:45 pm I don't see the Std_Part object though...
Std_Part is a graphical command (GuiCommand) that produces the "App::Part" (App_Part) object.

Here in the forum I tend to refer to it as a "Std_Part object" but technically this is only the name of the command. The object that is created is called "App::Part" (App_Part). Since the user is presented with the Std_Part button, I placed the documentation about the "App::Part" object in the Std_Part page. The App_Part page basically just points back to the Std_Part page.

I haven't seen much confusion about this, which is why I keep referring to Std_Parts when discussing assemblies.
A little fuzzy on why a PartDesign::Body (which I think is inherited from a Part::Feature??) can't be used directly, but a Part::Feature>3D object can.
(I'm sure this my general fuzziness...and the whole nomenclature that has been discussed elsewhere at great length.)
I don't know. Maybe PartDesign Body has something special that doesn't allow it to be used directly by Assembly4.
But it appears that Assembly Parts is where the Part::Feature or PartDesign::Body objects go in the Assembly4 Model?
As Zolko said, an Assembly4 model is the same as a Std_Part (App_Part). It is simply called "Model" instead of "Part". Parts can be nested inside other parts. Or in this case, Parts can be nested inside the Model.

https://github.com/Zolko-123/FreeCAD_As ... Cmd.py#L52

Code: Select all

            model = self.activeDoc.addObject('App::Part','Model')
In the image I called it "Assembly parts" because since "App::Parts" were created back in 0.17 they were intended to be used as the building blocks for creating assemblies. Of course, at that time there was no Assembly3 nor Assembly4, so it wasn't possible to test many of these ideas until realthunder started developing his code.

Another workbench could still emerge using Std_Part (App_Part) to build assemblies, so this object has the general idea of being useful in an assembly.
... Here I'm thinking how to explain this stuff without using "geek speak" like "inherited objects", etc...
Be sure to contribute. Producing this documentation has taken a long time, and is not easy.

Just a note, the image is meant to describe the general relationships of the objects in the code from a programmer's point of view. But it doesn't explain how to use those objects from a user's perspective. For example, an App_Part is not derived from Part_Feature, but obviously it can contain any other object, like a Part_Feature, a Part_Part2DObject, a Mesh_Feature, etc.
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
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3, A2plus, Assembly4? Get united!

Post by Zolko »

vocx wrote: Mon Mar 02, 2020 7:10 pm
A little fuzzy on why a PartDesign::Body (which I think is inherited from a Part::Feature??) can't be used directly, but a Part::Feature>3D object can.
I don't know. Maybe PartDesign Body has something special that doesn't allow it to be used directly by Assembly4.
...
As Zolko said, an Assembly4 model is the same as a Std_Part (App_Part). It is simply called "Model" instead of "Part".
I'm not sure to understand the question. It's not that PartDesign::Body cannot be used for Assembly4, but it was decided by higher authorities that only App::Part objects linked by App::Link interfaces using datum objects for placement will be used. Clear interfaces are what make a stable assembly.

Actually, fasteners from the Fasteners workbench, of type Part::FeaturePython can also be used, but it's only because they already existed and I didn't manage to wrap them inside an App::Part. And if they break it's not a big deal because they can't serve as basis to assemble other elements: they're always the last leaf of a branch.
try the Assembly4 workbench for FreCAD — tutorials here and here
amartino
Posts: 8
Joined: Sat Feb 24, 2018 2:14 pm

Re: Assembly3, A2plus, Assembly4? Get united!

Post by amartino »

I've just installed the app image for freecad 0.19.
And it seems like Assembly3 comes installed by default.

For some reason (reading the wiki and the forums) I got an impression of the following:
* A2plus is the "stable but unofficial thing people use". It has it's quirks, the biggest being having to create a file for each part
* Assembly4 is the new assembly which will be "the assembly" for freecad, it solves the A2plus issues by relying on the "link" feature of Freecad 0.19

Now just after installing Freecad 0.19 and playing a bit with assembly 4 I noticed the assembly3.
(Yes, I've missed it initially even though it's just before Assembly4 in the workbench selection :p))

Assembly3 seems to require the "link" feature which is what Assebbly4 also depends on.
I understand why A2plus exists but what is the difference for Assembly3 and Assembly4?
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: Assembly3, A2plus, Assembly4? Get united!

Post by adrianinsaval »

Assembly 3 uses constraints in a similar fashion to a2+, assembly 4 uses expressions and LCSs instead, it also requires that your models be inside Part Containers, I guess it requires more thinking to assign the proper relationships although I haven't really tried it out yet.
amartino wrote: Tue Mar 31, 2020 4:09 pm which will be "the assembly" for freecad
None of them are, all are unofficial external workbenchs and AFAIK no decision has been made yet to integrate one. Assembly 4 has the advantage that it doesn't use any solver and only uses FreeCAD's internal expression and placement systems so in theory the files should work all the same with future versions of FreeCAD even if the workbench is not mantained anymore.

As for using different files for each part, that's the standard approach for assemblies I think, and Links are actually a way to facilitate the use of parts in separate files. Assembly 4 solves a2+'s problems by relaying on the Part Container and LCSs instead of the simple copy a2+ uses and the Link feature is used to import external Part Containers, funny enough assembly 4 also required that external files be used some versions ago. You can mix parts from the same document with linked one's in both assembly 3 and 4 if I understood correctly.

Anyone who knows better please correct me if I'm wrong :)
amartino
Posts: 8
Joined: Sat Feb 24, 2018 2:14 pm

Re: Assembly3, A2plus, Assembly4? Get united!

Post by amartino »

Thanks :)
adrianinsaval wrote: Wed Apr 01, 2020 3:05 amAs for using different files for each part, that's the standard approach for assemblies I think
I don't know in general. I'm trying to use it for woodworking and the ability to have parts in the same project file in Assembly4 was really convenient. There isn't much complicated parts to work with in that case and having to have splits into files would be an overhead.

adrianinsaval wrote: Wed Apr 01, 2020 3:05 amNone of them are, all are unofficial external workbenchs
Assembly3 seems to be bundled with the app image from the releases, at least for Linux.
https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
Post Reply