This is a follow on to a previous post which addressed a beta test of the new
B-spline point on object constraint using a segment of a roller chain as an example.
https://forum.freecadweb.org/viewtopic. ... 49#p655749
This new post presents a complete assembly via the Assembly4 workbench of the same roller chain components and solves a problematic LCS flipping problem during animation with the help of jolbas. The following images document the work process:
- The simplified pin and chain link bodies are created with PartDesign and saved in the Asembly4 Parts folder. These are used in Model for assembly.
The assembly design starts with a periodic b-spline sketch in Model. This sketch serves as an assembly solver for the Parent Assembly.
Line segments are added to the sketch with the new point on object constraint to represent the chain links. All the line segments have an equality constraint and a line length chosen that will allow the last vertex to coincide with the first vertex at 0 deg. Now all the chain link line segments are locked to each other and the b-spline path. The b-spline can be constrained with a block constraint.
A radial line is added with a Variable 'angle' and constrained to the first line segment vertex at angle=0 (360) deg for use in the Assembly4 animator. As this angle changes all of the line segments will be dragged around the B-spline to create the animation as shown in the video below. - Screenshot 2023-01-28 143301.jpg (270.38 KiB) Viewed 2326 times
- The next step is to add LCS 'connectors' to the sketch at each vertex where the roller pins will be located. Now, the tricky part. The LCS is attached with Align OZY by selecting the vertex first, then the line segment and THEN the center of rotation vertex as shown in the Attachment panel. This will force the Y axis of the LCS to always be inboard of the spline path.
This attachment logic suggested by Jolbas fully constrains the LCS's to each line segment.
At this point it is a good idea to use the animator and check that all of the LCS's stay put from 0-360 deg of rotation. Make small (few degrees) of incremental changes since the sketch is somewhat sensitive and may freeze-up for too large of angle changes.
The LCS's are saved in a Model folder to tidy up the tree. - Screenshot 2023-01-28 143430.jpg (247.8 KiB) Viewed 2326 times
- The rollers can then be assembled to the Parent Assembly sketch using their default Body LCS and the sketch LCS's. No attachment offset is required.
They are all saved in the Pin folder. - Screenshot 2023-01-28 143612.jpg (262.07 KiB) Viewed 2326 times
- Each chain link is assembled to its appropriate roller LCS using its default body LCS which is purposely located at one of holes at the end of the link.
Change the Link element count to two(2) and offset each with their respective placement Y property. Do not forget to zero out the default X position. These are shown above as children of the assembled chain link. - Screenshot 2023-01-28 144336.jpg (281.08 KiB) Viewed 2326 times
.
The following mp4 video was created with the Assembly4 animator Save function:
https://www.youtube.com/watch?v=GP2fzBMd4oQ
See also for further design guidance:
Assembly4 options:
https://forum.freecadweb.org/viewtopic. ... 32#p595632
Design spreadsheet to determine center distance:
https://forum.freecadweb.org/viewtopic. ... 04#p143004
The complete file is attached for reference. Any question or comments are welcome. Thanks again to JNXD for his valuable b-spline contributions!
Code: Select all
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.0.31641 (Git)
Build type: Release
Branch: master
Hash: d28d63b87b60161419c6c0c532fbbfaed96926b8
Python 3.10.8, Qt 5.15.6, 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