xyzman wrote: ↑Sat Dec 14, 2019 12:23 pm
1. to get a part to slide on a rod?
2. a rod / shaft to turn in a bearing ,bush etc.
3. and the combination of the two, a rod turning and sliding in a slot .
Until we get another of Zolko's excellent tutorials perhaps the attached file will help with the basics.
I would not use a master sketch for the animation of your examples. Rather, one method is to animate the LCS's for each of the parts.
Assuming that you know how to create an Assembly4 file and assemble the parts, the next steps are as follows (see attached file):
Slide Part On a Rod (Hide Shaft and Nut in Model)
1. Create Assembly4 > Variable to define the position of the LCS's, e.g. bush_distance. The value is the default position.
2. Create an LCS that will be animated, e.g. LCS_1_bush_distance. Map it to LCS_0 > Object's XYZ.
3. Use Expressions to define its MapMode > AttachmentOffset Z > Variables.bush_distance as shown in the image below
4. Attach the Part_bush001 LCS_1001 to the Parent Assembly LCS_1_bush_distance using Assembly4>Move/Attach a Part
5. Select Animator, Variable > bush_distance and input begin/end positions and step value. Run for animation.
- Picture1.png (130.77 KiB) Viewed 2255 times
Turn shaft in Bushing (Hide rod001,bush001, and nut in Model. Unhide shaft.)
1. Create Variable to define angle of shaft rotation
2. Create LCS_2_shaft_rotate that will be rotated and Map to LCS_0
3. Expand AttachmentOffset and use Expressions to define Angle > Variables.shaft_rotation as shown in image. Axis Z=1.
4. Attach Part_shaft to the Parent Assembly LCS_2_shaft_rotate
5. Select Animator, Variable > shaft_rotation and input begin/end and step values (these will be in degrees). Run for animation.
- Picture2.png (101.2 KiB) Viewed 2255 times
Combination ( Unhide nut)
1. There can be only one independent variable.
2. Create Variable to define position of nut as a function of the shaft rotation, e.g. one shaft turn (360 deg) displaces nut 90 mm as shown below
3. Create LCS_2_nut_position and map to LCS_0
4. Use Expressions to define the MapMode > AttachmentOffset Z > Variables.nut_position
5. Attach Part_nut to the Parent Assembly LCS_2_nut_position
6. Select Animator, Variable > shaft_rotation and input begin/end and step values as above. Run for animation.
- Picture3.png (107.1 KiB) Viewed 2255 times
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18848 (Git)
Build type: Release
Branch: master
Hash: 50f4c012b4d45a4d34055f0be1a48de6e293c9a8
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)