How to apply 3D constraint with Assembly 4 workbench?

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
godblessfq
Posts: 110
Joined: Fri Jul 17, 2015 7:40 pm

How to apply 3D constraint with Assembly 4 workbench?

Post by godblessfq »

I have seen people using 2D master sketch to apply constraint with assembly 4, so the user do not need to calculate the precise angle between LCSes. But the sketch workbench is only 2D.

To make the asm4 a real competitor to asm3, it has to support 3D constraint in some form. How to I assemble 4 rods to form a tetrahedron without manual calculation of the angles between?

There are some other use cases:
https://forum.freecadweb.org/viewtopic. ... 1&p=116953
godblessfq
Posts: 110
Joined: Fri Jul 17, 2015 7:40 pm

Re: How to apply 3D constraint with Assembly 4 workbench?

Post by godblessfq »

There seems to be LCS constraint planned by the author of asm4.
Zolko wrote:
Later, it should be possible to define degrees of freedom in the LCS and develop constraints to solve them (for example you can leave the rotation around an axis free, or a translation...). The number of degrees of freedom would be limited to those expressly authorised, thus the solver much simpler than having to solve all 6 degrees of freedom for all parts. This can be implemented at a later stage to provide a full assembly functionality that wouldn't lag the leading CAD systems.
godblessfq
Posts: 110
Joined: Fri Jul 17, 2015 7:40 pm

Re: How to apply 3D constraint with Assembly 4 workbench?

Post by godblessfq »

Maybe move the discussion to the development repo of asm4. https://github.com/Zolko-123/FreeCAD_As ... issues/387
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: How to apply 3D constraint with Assembly 4 workbench?

Post by ppemawm »

godblessfq wrote: Thu Dec 15, 2022 2:05 am How to I assemble 4 rods to form a tetrahedron without manual calculation of the angles between?
Add an Assembly4 datum point to the assembly Model and align the Parent LCS's to this point as shown in the attached file and the image below:

aligning_rods.FCStd
(19.93 KiB) Downloaded 59 times

Create a master sketch of the tetrahedron base in Model.

Add a datum point attached to the Model Origin for the upper vertex of the the tetrahedron. Change its position in 3D space using the Attachment Offset properties.

Create Parent LCS's and attach them to the base sketch vertices using Translate Origin map mode. Choose the datum point as the second reference and attach with the Align O-Z-X map mode.

Assemble the rods to the Parent Assembly using its default LCS in the Assembly4 Body and each vertex LCS. The body could also be created in its own separate file but must be open when assembling.

The assembly is fully parametric. Try changing the datum point offsets, rod length or diameter, or the sketch for the base. LCS Attachment modes are powerful features for Assembly4 and must be mastered as early as possible when learning the workbench.

Screenshot 2022-12-15 194134.jpg
Screenshot 2022-12-15 194134.jpg (220.94 KiB) Viewed 1062 times
'
Please note that Assembly4 locks all of the body's six degrees of freedom when the LCS's are assembled (attached). Any degree of freedom for nearly any real world assembly constraint can be released using a master sketch, the Attachment Offset properties, and/or Expressions. This can also serve as an assembly solver for complex mechanism to verify extremes of motion. For example, in the above assembly you can animate the datum point with an Assembly4 Variable in an Expression(s) for the XYZ position properties and actually create an mp4 video using the Assembly4 Animate Assembly Save feature all in the same workbench.

Powerful Stuff.

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.30922 (Git)
Build type: Release
Branch: master
Hash: 8ec1279ea8ee32a36fae683b42b5cfc5821734b5
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4 0.12.4
  * fasteners 0.4.15
  * freecad.gears 1.0.0
  * QuickMeasure 2022.10.28
  * Render 2022.2.0
"It is a poor workman who blames his tools..." ;)
Post Reply