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
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

RDA wrote: Mon Oct 19, 2020 9:12 am What is the corect method on adjusting the relations? Should I edit the parts LCS so that they are offsetted for parts to mate or should I offset stuff in assembly?
hum .... not an easy question. The most reliable is to place the LCS where it belongs, with the correct angle, and attach a part directly to the LCS. Offsetting in translation is also quite reliable, but sometimes it's not easy to know which way do X and Y and Z axis. Rotation should only be done by steps of 90° because it corresponds to different XYZ orientations in the part and in the assembly.
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 »

RDA wrote: Mon Oct 19, 2020 9:12 am Should I edit the parts LCS so that they are offsetted for parts to mate or should I offset stuff in assembly?
I usually try to set the LCS in the exact position where I want the bodies to mate as Zolko suggests. I use the body link attachment offset after assembly for minor adjustment such as adding clearances or making space for gaskets or such.

A cursory review of your file seems to show several discrepancies at least as far as the intended Assembly4 workflow.

A few brief comments:

1. After you first try Assembly4 (Asm4) a few times it may be useful to go back to the documentation and reread it to better understand the intended work flow. It sure helped me to do that several times.

2. Consider using a top level skeleton or master sketch for locating LCS's. The sketch can be used as an assembly solver. For example, you can set the diagonal tube angle by using the map mode such that the LCS points to the opposite vertex that it should connect to. That way you do not have to know the angle and it will update properly if the tube dimensions are changed on the master sketch. You do not have to use a master sketch with Asm4, but it can help you to slow down and plan the design before diving in.

3. Use the Asm4 workbench (rather than PartDesign) when creating a new body since it will provide you with a default LCS which can be used as the primary assembly interface for that body. When you double click the Asm4 body it will take you to PartDesign for creating the features. Add secondary LCS's for all the other bodies that interface with this body. The LCS should only be mapped to the sketches used to create the mating features for a more robust model.

4. Consider using the Asm4 Variables table rather than a spreadsheet unless your spreadsheet is quite complex. The variables in each of the linked files will be exposed in the Asm4 file with the linked body if the linked file includes an Asm4 Model.

Asm4 is more than a bottom-up assembly tool. It provides an infrastructure for top-down, in-context assembly design with an integrated interface with the PartDesign workbench. Numerous real-life examples and brief comments on the work process are shown here which I hope are helpful:
https://forum.freecadweb.org/viewtopic.php?f=24&t=48473
"It is a poor workman who blames his tools..." ;)
RDA
Posts: 34
Joined: Tue Oct 06, 2020 6:55 am

Re: Assembly 4 workbench

Post by RDA »

Zolko wrote: Mon Oct 19, 2020 2:35 pm
RDA wrote: Mon Oct 19, 2020 9:12 am What is the corect method on adjusting the relations? Should I edit the parts LCS so that they are offsetted for parts to mate or should I offset stuff in assembly?
hum .... not an easy question. The most reliable is to place the LCS where it belongs, with the correct angle, and attach a part directly to the LCS. Offsetting in translation is also quite reliable, but sometimes it's not easy to know which way do X and Y and Z axis. Rotation should only be done by steps of 90° because it corresponds to different XYZ orientations in the part and in the assembly.
Playing around and I think the LCS at the attachment makes more sense.
ppemawm wrote: Mon Oct 19, 2020 4:47 pm
RDA wrote: Mon Oct 19, 2020 9:12 am Should I edit the parts LCS so that they are offsetted for parts to mate or should I offset stuff in assembly?
I usually try to set the LCS in the exact position where I want the bodies to mate as Zolko suggests. I use the body link attachment offset after assembly for minor adjustment such as adding clearances or making space for gaskets or such.

A cursory review of your file seems to show several discrepancies at least as far as the intended Assembly4 workflow.

A few brief comments:

1. After you first try Assembly4 (Asm4) a few times it may be useful to go back to the documentation and reread it to better understand the intended work flow. It sure helped me to do that several times.

2. Consider using a top level skeleton or master sketch for locating LCS's. The sketch can be used as an assembly solver. For example, you can set the diagonal tube angle by using the map mode such that the LCS points to the opposite vertex that it should connect to. That way you do not have to know the angle and it will update properly if the tube dimensions are changed on the master sketch. You do not have to use a master sketch with Asm4, but it can help you to slow down and plan the design before diving in.

3. Use the Asm4 workbench (rather than PartDesign) when creating a new body since it will provide you with a default LCS which can be used as the primary assembly interface for that body. When you double click the Asm4 body it will take you to PartDesign for creating the features. Add secondary LCS's for all the other bodies that interface with this body. The LCS should only be mapped to the sketches used to create the mating features for a more robust model.

4. Consider using the Asm4 Variables table rather than a spreadsheet unless your spreadsheet is quite complex. The variables in each of the linked files will be exposed in the Asm4 file with the linked body if the linked file includes an Asm4 Model.

Asm4 is more than a bottom-up assembly tool. It provides an infrastructure for top-down, in-context assembly design with an integrated interface with the PartDesign workbench. Numerous real-life examples and brief comments on the work process are shown here which I hope are helpful:
https://forum.freecadweb.org/viewtopic.php?f=24&t=48473
Thanks for the very helpful reply:

1. For sure, Im trying to get a general feel for things before doing anything too complex.

2. I will look into this. The tube angles I was pulling from a spreadsheet and later on added also the LCS angles to come from those.

3. I already had the tubes done before rtying ASM4 so I was just trying put stuff together without much "refinement". But for sure in the future will work this way.

4. Thanks will try it out.

Thanks again for all the helpful information.
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 Oct 15, 2020 1:07 pm ...ping
I have a complex assembly that I would like to animate https://forum.freecadweb.org/viewtopic. ... 50#p439330. As you can see it is easily animated when all moving parts are in the same file.

OK so you convinced me that it is better to put some parts in sub-assemblies when the model tree gets too long. I have now broken up that assembly file into several sub-assemblies as you have suggested and certainly agree that the assembly model tree is better organized and easier to work with. I can animate the sub-assemblies in the separate files, but this does not seem possible at the top assembly file. Or, at least I do not know how.

Is there any way this capability could be accommodated in the top assembly file in Assembly4?

(see also comments by aapo in this thread)
https://forum.freecadweb.org/viewtopic. ... 20#p417293 .
aapo wrote: Sat Jul 18, 2020 10:41 pm ping...
"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 20, 2020 3:31 pm I have a complex assembly that I would like to animate https://forum.freecadweb.org/viewtopic. ... 50#p439330. As you can see it is easily animated when all moving parts are in the same file [...] I have now broken up that assembly file into several sub-assemblies as you have suggested and certainly agree that the assembly model tree is better organized and easier to work with. I can animate the sub-assemblies in the separate files, but this does not seem possible at the top assembly file.
I had seen that model, very nice and impressive, as usual. Although .... a Sterling motor is better suited for a submarine rather than a helicopter.

Would you be willing to share the Model tree here so we can have a look at how you organised sub-assemblies ? The ASCII output macro should be able to handle assemblies I think.

If I had to do that design, I'd leave the animation master sketch and LCS in the top level assembly, and model all the sub-assemblies (rotor, tail-rotor, piston ...) as separate entities, but such that each sub-assembly is static. Then, I'd import all sub-assemblies into the top-level assembly and attach them to the previously defines (and tested !) LCS with master sketch. Actually, the behaviour would be very similar to an assembly in 1 file, except that some "Part"s would be "Model"s

What did you try ?
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 20, 2020 9:33 pm Would you be willing to share the Model tree here so we can have a look at how you organised sub-assemblies ?
Please see attached file.
Model_Top-Level-Assy_Tree.pdf
(360.38 KiB) Downloaded 45 times
Zolko wrote: Tue Oct 20, 2020 9:33 pm What did you try ?
I placed (copy/paste with all dependencies from original file) all of the moving parts in subassembly files: rotating sub-assembly and reciprocating sub-assembly. Then these parts were assembled in their respective Model. I was able to animate each file separately.

I also created sub assembly files for the block and the frame. Then assembled each sub-assembly into the top-level file. This is where I realized (too late) that I could not animate the moving parts in the top-level file because the sub-assembly variables are not exposed to the animator.

Picture1.jpg
Picture1.jpg (80.77 KiB) Viewed 3299 times
Zolko wrote: Tue Oct 20, 2020 9:33 pm If I had to do that design, I'd leave the animation master sketch and LCS in the top level assembly, and model all the sub-assemblies (rotor, tail-rotor, piston ...) as separate entities, but such that each sub-assembly is static. Then, I'd import all sub-assemblies into the top-level assembly and attach them to the previously defines (and tested !) LCS with master sketch.
Right now I am not understanding how you would do this so will have to think about it.

I am not using a master sketch to animate the rotating parts but only to locate the LCS's for the various shafts. Then I assign the rotation angle variable to each LCS in this sketch. The shafts are assembled using these LCS's and all the other rotating parts are attached to the shafts. I did use, however, a sketch as a solver for the reciprocating parts.
"It is a poor workman who blames his tools..." ;)
mgeismann
Posts: 8
Joined: Wed Oct 21, 2020 5:07 am

Re: Assembly 4 workbench

Post by mgeismann »

Hi all!

Is there a way to update the master sketch with, e.g., additional points?

Whenever I leave the first editing session of a sketch the sketch seems to lock
the objects accessible to the "create new coordinate system in part"/"edit
datum" selection dialogue: If I edit the sketch again and add a new vertex or an
edge and then want to attach a coordinate system to it (for instance by entering
'master:Vertex7' in the attached file) I get the error "PositionBySupport:
AttachEngine3D: subshape not found".

I attached a file to demonstrate the issue: master:Vertex7 and master:Vertex8 do
exist (verified via Selection View) but I cannot chose them while attaching an LCS.
Attachments
non-accesible-vertices.FCStd
(8.69 KiB) Downloaded 47 times
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly 4 workbench

Post by project4 »

ppemawm wrote: Wed Oct 21, 2020 12:22 am
Zolko wrote: Tue Oct 20, 2020 9:33 pm If I had to do that design, I'd leave the animation master sketch and LCS in the top level assembly, and model all the sub-assemblies (rotor, tail-rotor, piston ...) as separate entities, but such that each sub-assembly is static. Then, I'd import all sub-assemblies into the top-level assembly and attach them to the previously defines (and tested !) LCS with master sketch.
Right now I am not understanding how you would do this so will have to think about it.
There are cases where there is no master sketch at all, so exposing sub-sub-assemblies variables for animation is required to have full-model animations.
In my case, I have lots of STEPs for existing parts, so all I do is assembly them together, actually every part is a sub-assembly by itself.
I'm trying to keep everything as modular as possible, so there are several sub-assembled smaller models, which have its own animations.
But after assembling everything together there is no way to use it.

There is no python trick to access the sub-sub-assembly variables at all?
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

mgeismann wrote: Wed Oct 21, 2020 5:20 am I attached a file to demonstrate the issue: master:Vertex7 and master:Vertex8 do exist (verified via Selection View) but I cannot chose them while attaching an LCS.
the sketch "master" has only 4 vertices, Vertex7 doesn't exist, not anymore than Vertex8. The reason that LCS_7 doesn't report an error is that its MapMode is Deactivated.

Code: Select all

>>> len(master.Shape.Vertexes)
4
>>> 
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: Wed Oct 21, 2020 12:22 am Please see attached file.
Model_Top-Level-Assy_Tree.pdf

Right now I am not understanding how you would do this so will have to think about it.
Thank-you. I wouldn't have splitted the sub-assemblies like that. I'd put in a sub-assembly only rigid structures, that don't deform/move. So, the rotor would be one such sub-assembly, and not all rotating parts.

Except ... for the pistons, I'd try to model them in 1 file, so that you can check that the design of sub-parts is compatible, but then, include the parts into the assembly separately.

Does that make sense ?
try the Assembly4 workbench for FreCAD — tutorials here and here
Post Reply