Assembly4 tutorial

A place to share learning material: written tutorials, videos, etc.
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: Assembly4 tutorial

Post by Zolko »

drmacro wrote: Thu Feb 13, 2020 4:04 pm - Does this mean any previously complete FreeCAD fcstd part needs to be moved into a Model container before use with an assembly?
an Assembly4 Model is a FreeCAD part (Std_Part of App::Part). You can use previously built parts with Assembly4 without modifications. But please be careful that this concerns App::Part or Std_Part objects, and only those.

- Is it required for every model and every possible constraint? Is it possible to just use the coordinate system of the part? (in the case when the parts coordinate system is sufficient).
You don't need an LCS in a part to use it with Assembly4, but if a part doesn't have an LCS Assembly4 will not be able to place it in the assembly and you'll have to move it manually (with the dragger tool for example: right-click > Transform. But I somehow feel that you're confusing the "Origin" object(s) and a datum coordinate systems. And there is currently only 1 type of constraint: matching of datum coordinate systems
try the Assembly4 workbench for FreCAD — tutorials here and here
drmacro
Veteran
Posts: 8983
Joined: Sun Mar 02, 2014 4:35 pm

Re: Assembly4 tutorial

Post by drmacro »

Zolko wrote: Sun Feb 16, 2020 1:17 pm
drmacro wrote: Thu Feb 13, 2020 4:04 pm - Does this mean any previously complete FreeCAD fcstd part needs to be moved into a Model container before use with an assembly?
an Assembly4 Model is a FreeCAD part (Std_Part of App::Part). You can use previously built parts with Assembly4 without modifications. But please be careful that this concerns App::Part or Std_Part objects, and only those.
I always get confused here and have to review this thread https://forum.freecadweb.org/viewtopic.php?f=8&t=40229 to wrap my head around it. ;)

So: (Std_Part of App::Part) which workbench puts geometry in which? :?:
Zolko wrote: Sun Feb 16, 2020 1:17 pm
drmacro wrote: Thu Feb 13, 2020 4:04 pm
- Is it required for every model and every possible constraint? Is it possible to just use the coordinate system of the part? (in the case when the parts coordinate system is sufficient).
You don't need an LCS in a part to use it with Assembly4, but if a part doesn't have an LCS Assembly4 will not be able to place it in the assembly and you'll have to move it manually (with the dragger tool for example: right-click > Transform. But I somehow feel that you're confusing the "Origin" object(s) and a datum coordinate systems. And there is currently only 1 type of constraint: matching of datum coordinate systems
So, the LCS is actually a datum defining where the part is to be attached to the assembly?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly4 tutorial

Post by Zolko »

drmacro wrote: Sun Feb 16, 2020 2:46 pm So, the LCS is actually a datum defining where the part is to be attached to the assembly?
an LCS is only that: a local coordinate system. It's purpose in Assembly4 is to define places where other parts can be attached to, and to define places at which the model can be attached to another model (at an LCS of its own). The way Assembly4 uses them you can consider LCS as attachment points between parts. There can be as many such attachment points in 1 part as you wish, and each can be used invariably to attach the part in the assembly, or that attach there a part from an assembly.
try the Assembly4 workbench for FreCAD — tutorials here and here
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assembly4 tutorial

Post by vocx »

I think you should update the first post of this thread in order to present the new repository of the tutorials.

https://github.com/Zolko-123/FreeCAD_Examples
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.
DanielLeeWenger
Posts: 53
Joined: Sun Feb 02, 2020 4:02 am
Location: Santa Cruz, California
Contact:

Re: Assembly4 notes/questions

Post by DanielLeeWenger »

I have been working with FreeCAD for about three months (my first plunge into 3d design) and find it fascinating and wonderful. I became frustrated when I attempted to combine objects into an assembly. I dabbled with A2Plus and looked at Assembly 3 and then found the most interesting discussion about the development of Assembly 4 and the philosophy behind it. The pairing of coordinate systems seems natural and elegant.

I have successfully done my first project using Assembly 4 and am very pleased with it. Along the way I made some notes to myself to remind me for future projects. They may be helpful to others.

1) Do all future design within the Model format, even if you do not contemplate a future assembly. This avoids the hassle of converting a Part or Part Design to the Model format if needed as an Assembly 4 Part.

2) The necessary steps are: (all done in Assembly 4 WB)

Create a Model (this produces a folder for Parts)

Create a Part
Create a Body
Create a Sketch

In Part Design:
Make the Body active via Control Key (on MacOS) (confirm Body is on or off via Python console)

Highlight the Sketch for the Body and then select Pad or Rotation.

Repeat 2) for more Parts

Important: Rename all items to help keep track of the various items.

Assemble if desired. (More notes needed here)

3) Once the Parts are assembled some additional orientation may be necessary, the coordinate systems are connected but not necessarily aligned properly. This is done in Assembly 4.
Select the Body of the Part and then select the usual FreeCAD placement displays. No need to select "Apply incremental changes" as the moves are automatically displayed incrementally.

4) It is possible to Convert (via Part WB) each Part into a Solid
After this conversion, the various Parts(Solid) may be combined via Part WB Union to produce a Fusion. The Fusion can then be Exported to STL.

These notes are not complete but have proven helpful to me so far.


Now my question for Zolco, or someone who has the answer.

A) Is it possible to do Fillets or Chamfers on a Part of the assembly and on two Parts of the assembly (across an Edge formed from two Parts? My attempts on various items in the Model produce Parts that are rotated to previous positions of the Part. My attempts on the Fusion produce a blank screen.

B) Is it possible to introduce an LC that is not only at some location, for example a face, but also rotated with respect to some feature of the face, such as an edge or vertex? Hopefully this would relieve one of doing post attachment rotations in order to get the new Part lined up correctly.

Thank you Zolco for your beautiful effort and to everyone who has helped to make FreeCAD such an interesting tool.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly4 notes/questions

Post by Zolko »

DanielLeeWenger wrote: Fri Apr 03, 2020 3:50 am 1) Do all future design within the Model format, even if you do not contemplate a future assembly. This avoids the hassle of converting a Part or Part Design to the Model format if needed as an Assembly 4 Part.
good remark, that's also what I do.

Create a Model (this produces a folder for Parts)

Create a Part
Create a Body
Create a Sketch
a Model is also a Part, so why create an additional Part ? You can add a Body directly into a Model. The Part folder is only useful if you want to make an assembly in 1 file: then you create all the parts in the Parts folder, and make the assembly in the Model. But if you only use the Model as a regular Part then you can make all your design in the Model directly. The advantage being that it gives you the Variables place-holder.

Now my question for Zol*k*o, or someone who has the answer.

A) Is it possible to do Fillets or Chamfers on a Part of the assembly and on two Parts of the assembly (across an Edge formed from two Parts? My attempts on various items in the Model produce Parts that are rotated to previous positions of the Part. My attempts on the Fusion produce a blank screen.

B) Is it possible to introduce an LC that is not only at some location, for example a face, but also rotated with respect to some feature of the face, such as an edge or vertex? Hopefully this would relieve one of doing post attachment rotations in order to get the new Part lined up correctly.
A) no (it's only an assembly, you must modify your parts and designs in their respective workbenches) and B) yes, in the Attachment Editor of the LCS (MapMode), see the tutorials
try the Assembly4 workbench for FreCAD — tutorials here and here
DanielLeeWenger
Posts: 53
Joined: Sun Feb 02, 2020 4:02 am
Location: Santa Cruz, California
Contact:

Re: Assembly4 tutorial

Post by DanielLeeWenger »

OS: macOS Mojave (10.14)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20900 (Git)
Build type: Release
Branch: master
Hash: 3ad15343ebab78cd76b7e9a06a0f8d794f5075be
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)

and with Assemby 4 version .9.

Thank you Zolko for your replies. I have not been diligent in checking for responses to my posts.

I have gone further with Assembly 4 and find it quite powerful and elegant. From some of your recent posts I have learned of Variables and that has added to the pleasure of using your software.

I have used FreeCAD and Assembly 4 for the first time to help in the design of furniture, which is what I have done over the years, but never with drawings, only mental visualization. I work with square steel bent and welded together, a natural for Sketcher and Assembly 4.

I came across a problem that I was having in making a final adjustment of a piece involving two rotations of Part B which is attached to Part A. I attempted to use the Edit Datum dialog but soon realized that the two rotations were being executed in just the opposite oder that I wanted.

This led me to do some searches of the Forum to find a solution, in doing so I came across https://forum.freecadweb.org/viewtopic.php?f=3&t=42185, an absorbing discussion that indirectly dealt with my problem.

It has never been clear to me how the Placement Dialog and the Edit Datum tools worked with regard to rotations until I gleaned that there is a built in order of execution of the x, y, z rotations, namely the order is the z then y then x rotation is executed in that order. I have never seen this explicitly mentioned in FreeCAD information.

To me, unfamiliar with 3D software but very familiar with rotations in 3D, this seemed to be a limitation of FreeCAD. The discussion in the above Forum entry does discuss an improvement where the various orders of execution of rotations is selectable, 24 of them (if one is limited to three rotations of x, y and z). My thought was a simple numbered ordering of the three rotations would give an increased value to the software and be easily accomplished by assigning numbers 1, 2, 3 to the three axises x, y, z.

Getting back to the Assembly 4 issue that I still needed to solve I realized that by making one of the rotations on the LCS of Part A and the second on the LCS of Part B I could solve by problem.

Because I am tickled with the result of my efforts using Assembly 4 I show here an image of my result.
Recliner1.jpg
Recliner1.jpg (100.92 KiB) Viewed 3988 times

Kudos for bringing such a powerful tool to FreeCAD.

For those who might be interested in how multiple sequences of rotations, more than three and not in a z, y, x sequence proved to be useful to me, see https://wengerdesigns.com/WDRes/SpherTrigOp.pdf
DanielLeeWenger
Posts: 53
Joined: Sun Feb 02, 2020 4:02 am
Location: Santa Cruz, California
Contact:

Re: Assembly4 tutorial

Post by DanielLeeWenger »

OS: macOS Mojave (10.14)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20900 (Git)
Build type: Release
Branch: master
Hash: 3ad15343ebab78cd76b7e9a06a0f8d794f5075be
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)

with Assembly 4 version .9

I am unsure if I should be posting a question on this forum or if I should start a new thread on Open Discussion. It seems that I am not able to post to Assembly 4 forum directly. Anyway, here goes.

I am using Assembly 4 and have come upon an issure. I have added two LCSs to two adjacent vertices of an object. The LCS-Right behaves as I it should. I have rotated it 30 deg. without problem. When I attempt to do the same on LCS-Left I cannot get "Edit Datum" dialog to function as I want. The x,y,z translations are responsive but the rotations are not. I cannot get a 30 deg. rotation on the LCS.

Any help would be appreciated.

:PS. I note that the Recompute has not been done in the photo, but even after that the issue persists.
Attachments
LampLeg.FCStd
(201.37 KiB) Downloaded 85 times
Assembly4Question.png
Assembly4Question.png (731.23 KiB) Viewed 3935 times
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Assembly4 tutorial

Post by kisolre »

Had you tried "Edit Datum"on the right one? You will note that it will also not work when in fact it works as designed. Since the mapping mode of both LCS is Translate only translation part of the mapping is transferred to the object. To manipulate the angles you need to modify the angular components of the PLACEMENT property. You will note that it is not locked but only rotation properties persist after recompute. Translation is taken from attachment.
DanielLeeWenger
Posts: 53
Joined: Sun Feb 02, 2020 4:02 am
Location: Santa Cruz, California
Contact:

Re: Assembly4 tutorial

Post by DanielLeeWenger »

kisolre wrote: Fri May 08, 2020 6:15 am Since the mapping mode of both LCS is Translate only translation part of the mapping is transferred to the object.
Thank you for the reply. I did refer to "Edit Datum" when I should have said "Placement Dialog".

I was not aware that the mapping "Translate origin" only allowed translations and not rotations via the Edit Datum dialog.

The issue is that the Placement dialog worked on the Right LCS but not on the Left LCS. The two LCSs were mapped in the same way using "Translate origin" to a vertex.
++++++

After another stab at the problem I find that I can create an LCS and attach it to the center of the face of the object using the Inertial CS mode and then using Edit Datum I can move it to the vertex of the Left LCS and at the same time rotate it 30 deg as I wanted.

It still leaves unsolved the issue of not being able to attach two LCSs at two vertices along the edge and have identical behavior. This seems as if it still may be a bug of some sort.
Attachments
Success.jpg
Success.jpg (56.11 KiB) Viewed 3850 times
Post Reply