Attaching Parts along single axis

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Vagulus
Posts: 850
Joined: Tue Jul 14, 2020 7:55 am
Location: Perth, Western Australia

Attaching Parts along single axis

Post by Vagulus »

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/New Zealand (en_NZ)
Installed mods: 
  * Assembly4 0.12.5
  * BOLTSFC
  * Curves 0.5.1
  * dodo
  * fasteners 0.3.46
  * parts_library
Using Assembly 4

I want to assemble these two parts so that the Palliasse fits into the Wardrobe along the Y-Axis as shown:
230326 Foldaway Assembly.png
230326 Foldaway Assembly.png (3.88 KiB) Viewed 444 times
Trick is, for demonstration purposes I want to incline the Palliasse at, say, 30° from the horizontal. It would be nice if I could vary the angle pretty much at will to show the hinge characteristic.

I haven't yet found a way to do this in FC. Would someone please show me how?

Thanks
Attachments
Foldaway.FCStd
(31.44 KiB) Downloaded 24 times
"It is much harder to simplify than to complicate."
Joseph Kimble
User avatar
Jolbas
Posts: 327
Joined: Sat Mar 26, 2022 7:48 am
Location: Sweden

Re: Attaching Parts along single axis

Post by Jolbas »

Make it an Assembly ("New Model" tool) and add the Wardrobe part. Then add the Palliasse part connected by each Pivot LCS.
Use the Add Variable tool and create a variable named e.g. HingeAngle.
Edit the Angle of AttachmentOffset of the Assembled 'Palliasse001' link in the Assembly.
Set its expression to Variables.HingeAngle
Activate the Animate Assembly tool and choose to animate the HingeAngle variable

Attached a prepared document to try the animation tool on. The Wardrobe part has an added LCS to be able to attach it to a wall and the Pivot LCSs are adjusted to have their Z axis along rotation axis.
Attachments
Foldaway_Jolbas.FCStd
(37.06 KiB) Downloaded 29 times
User avatar
Vagulus
Posts: 850
Joined: Tue Jul 14, 2020 7:55 am
Location: Perth, Western Australia

Re: Attaching Parts along single axis

Post by Vagulus »

Thanks. You can see the advantage. It shows the interference at the top when the Palliasse enters the wardrobe.
"It is much harder to simplify than to complicate."
Joseph Kimble
Post Reply