Assembly3 preview

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 preview

Post by Zolko »

wsteffe wrote: Fri Jan 04, 2019 7:19 am Nothing wrong, also in Catia assembly ...
What's wrong is to take Catia as an example of a good assembly to follow. Catia v5 is a 20 year old CAD system, and especially the assembly module is showing its age. It's inefficient, very easy to abuse and confuse, and unforgiving if you do it wrong, which leads to frozen assemblies because the underlying constraints/geometries have disappeared without warning. NX or SolidWorks — not to mention T-Flex — are much better systems to take inspiration from.
try the Assembly4 workbench for FreCAD — tutorials here and here
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Post by wsteffe »

Zolko wrote: Fri Jan 04, 2019 10:44 am Catia v5 is a 20 year old CAD system, and especially the assembly module is showing its age.
Ok I may agree on that. But here the point is the mixing of history based modeling (which make use of sketches and related 2D constraints) with the 3D constrains of assembly module. In NX you may use 3D constraints to align a couple of faces. Then you may stretch the geometry containing the first face and by doing that you are stretching also an other geometry because the two faces must stay aligned.
But, before doing that, I you have to switch to the non ordered mode which deactivates the history tree.

Anyway I think that probably in FC the 3D constraints may coexist with the history tree because they can be used only the define relative positions of different bodies and not to deform the geometry as in NX.
user1234
Veteran
Posts: 3335
Joined: Mon Jul 11, 2016 5:08 pm

Re: Assembly3 preview

Post by user1234 »

Hello!

My two cents:
Zolko wrote: Fri Jan 04, 2019 10:44 am What's wrong is to take Catia as an example of a good assembly to follow.
I know some CAD programs, some of them are high end, but CATIA have one of the best assemlby modul. Easy to learn, intuitive (at least for me) and very powerful.

Greetings
user

edit: missing words added
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Assembly3 preview

Post by saso »

I also don't think that the debate over Catia or NX assembly style is important at this point, from their basic concepts they are not that different to me. The key difference to understand between the A3 and the Part containers is IMO that A3 is working in a single world (global) coordinate system where on the other side the Part containers are a sort of a multi world coordinate system concept. We could sort of say that each Part container is a world on its own. With other words, every time you add an assembly (Part container in our current case for FC) to an assembly it becomes its subassembly and the definition of the world coordinate system moves to the top assembly. And this difference is shown in the dependency graph. It is why IMO the Part/Assembly container (component) structure is the correct way and key to all of this. If there are constraints used in this or not, or if things are linked from external files or not, even if parts are positioned with lcs or not, and all the other things, are all secondary to this.

In the below picture are two "assemblies" that are from the tree structure the same but in the dependency graph we can see that they have two very different hierarchical structures.
Attachments
asm.png
asm.png (322.99 KiB) Viewed 2319 times
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3 preview

Post by Zolko »

saso wrote: Fri Jan 04, 2019 3:06 pm I also don't think that the debate over Catia or NX assembly style is important at this point, from their basic concepts they are not that different to me.
In Catia assemblies and parts are different files, one cannot be transformed into another, while in NX there is only 1 type which can be a part, an assembly and any combination of them. It's much more flexible and yet it guides you to a more structured architecture. I agree that both allow you to do the same things, but in NX everything is so much more elegant. If FreeCAD should take example, I'd rather it be NX than Catia.

Actually, Catia's 3D solver is so powerful that you can throw anything at it and it will cope with it, except that with time the assembly will evolve, other people will contribute, and you have a big tendency to break some constraints. What's more, Catia will not warn you about that, it simply copies the parts where they were last time so you will not notice that something went wrong for some time, instead of throwing an alarm so you can manage right when things got wrong. Which means that a powerful solver is as much a blessing as a curse. With time, for each Assembly I created a Part — called always skeleton — that I included first, and this skeleton held datum objects on which I could attach other Parts. Exactly what NX allows you to do right-away in the Part/Assembly, without the need for an extra skeleton.

The key difference to understand between the A3 and the Part containers is IMO that A3 is working in a single world (global) coordinate system where on the other side the Part containers are a sort of a multi world coordinate system concept. We could sort of say that each Part container is a world on its own.
I'm not sure to understand, but I very much think that each Part/Assembly should be a world of its own. And that there is no real reason to make any difference between the 2: if you have a Part, and you include another Part into it, it becomes an Assembly. Again, NX is the way to go.

From what I can see, in A3, when you create an Assembly, you can create a Body inside it — in the Parts section — so I feel that you can do both. You'll have a File which contains an Assembly which has Parts which contain a Body ... I think the workflow can be streamlined a bit.
try the Assembly4 workbench for FreCAD — tutorials here and here
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

wsteffe wrote: Fri Jan 04, 2019 7:19 am But I think that in a history based CAD as it is FC, this solver hierarchy should be driven by the feature position in the history. The feature last entered in the history should be on the root of the solver hierarchy.
This is indeed the case in A3. The assembly container is a document object just like sketch. And if a sketch is moved inside an assembly container, that makes the assembly depends on the sketch, or in other word, the sketch is before the assembly in the history. Therefore, with FC's recomputation logic, the sketch is computed the first, i.e. its solver is invoked first, and then the assembly's.

There is a substantial difference between the sketch constraints and assembly constraints. The first live in a given sketch which occupies a given position in the history tree. The assembly constraints (as least the assembly constraints of Catia v5 which I know better) are not related with history. There is no difference if a given assembly constraint is entered before or after an other assembly constraint because they are solved at the same time.
No, there is not that much difference once you get to know the internals. The sketch constraints are not exposed as document object, so they do not appear in the history. They are entirely managed by its owner sketch object. A3 choose to expose the constraints as normal objects, they are included inside the assembly as child objects, and hence put them before the assembly in the history. The important things to know is that, those constraint objects does not invoke the solver in any way. They only provide various information to the solver. And the solver is indeed invoked to solve all the constraints at the same time when the assembly is recomputed. In this sense, yes, the order of constraint does not affect the solution, assuming all constraints are all well formed. In case of over constraint or conflict constraints, then the order may affect the solution, but that's a different story.

Anyway I think that probably in FC the 3D constraints may coexist with the history tree because they can be used only the define relative positions of different bodies and not to deform the geometry as in NX.
The constraint can affect geometry, with my SubShapeBinder to bind shapes across hierarchy. You can check out the tutorial here. The PartDesign approach is the recommended way to go. But it is still considered as advanced usage. A better guiding system is required.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

saso wrote: Fri Jan 04, 2019 3:06 pm The key difference to understand between the A3 and the Part containers is IMO that A3 is working in a single world (global) coordinate system where on the other side the Part containers are a sort of a multi world coordinate system concept.
Why would you think of that? Is it just because of the dependency graph? The graph generation code has special treatment for App::Part, it deviates to the normal representation of other object dependency. I can easily add code to let A3 assembly container get similar treatment.

There is no single world coordinate system in A3, every container defines its own coordinate just like App:Part. The key difference of them is that App::Part has this requirement that one object is allow to be contained in one and only one App::Part, so given an object you can unambiguously find its parent App::Part. Since each App::Part defines a coordinate system, you can also say that an object can only appear in one coordinate system. The problem with this requirement is that the user may want to add multiple instances (Link) of the same sub assembly. The child parts of this sub assembly will then appear in multiple coordinates system. Given an object, you can no longer tell which instance of the object the user is referring to. This is the fundamental problem my Link branch is trying to solve.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Assembly3 preview

Post by saso »

realthunder wrote: Sat Jan 05, 2019 8:47 am Why would you think of that? Is it just because of the dependency graph? The graph generation code has special treatment for App::Part, it deviates to the normal representation of other object dependency. I can easily add code to let A3 assembly container get similar treatment.
Ok, ok, I am sorry, it was not because of the graph. I was fooled because there are by default no origins shown in asm3 containers like in Part containers and because it is not possible to use the transform gizmo to move them as the Part containers. I have done all this now manually and see that they do behave as I would expect :oops: I was also looking at it more as a strict assembly container (because of its name) and did not like it as such, but If I look at it as a Part container then it is different, have to play and test a bit more...
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3 preview

Post by Zolko »

saso wrote: Sat Jan 05, 2019 9:33 am I was also looking at it more as a strict assembly container (because of its name) and did not like it as such, but If I look at it as a Part container then it is different, have to play and test a bit more...
I think that the name for the container is badly chosen: an "Assembly" in A3 can be an assembly but also other things, much broader. How about changing the name to avoid confusion ? For example "Model" ?

Also: why is there a need for a group — or whatever it is — called "Parts" to hold the included parts ? Could those not be included directly at the root of the container ? That would simplify the workflow and avoid further confusion.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Assembly3 preview

Post by saso »

realthunder wrote: Sat Jan 05, 2019 8:47 am ...
Would you be willing to make some "visual" changes to asm3, because I find it extremely confusing, I have to hit myself with a hammer all the time to remind that things have different names but probably work the same. I feel like driving on the left side when I have been driving on the right all my life :)

For example:
- Change the name of your container from Assembly to Part
- Add the origin by default to it
- Change the icon to one that is more similar to the Part icon (maybe just a bit different color)
- Are you able to program it so that if it is a single container it would have one icon (the Part icon), but if you put another container in it the icon of the top container would automatically change (I would prefer this one https://github.com/FreeCAD/FreeCAD/blob ... y_Demo.svg), it would still be the same container but it would just show in the tree that it is used as an assembly ?
- Are you able to hide the Constraints and Elements groups by default and when there are no constraints and elements used / set, so that they would show only when there would actually be some constraints added ?

... maybe there would be some more things, but this would already make a huge difference... please :)
Last edited by saso on Sat Jan 05, 2019 2:22 pm, edited 5 times in total.
Post Reply