Aligning parts using rotation scripts
2021-12-16, 8:24 (This post was last modified: 2021-12-16, 9:18 by David Manley.)
2021-12-16, 8:24 (This post was last modified: 2021-12-16, 9:18 by David Manley.)
1. Background
A few months ago, I wrote a Lua script for LDCad to animate the rotation of a 4 (or 3) bar linkage, posting the script to the LDraw forum. Writing that script got me thinking about writing a script which would determine the joining point for two parts, each being rotated about their own designated rotation point.
I’ve now written a version of the script. This post describes how to use the script and provides details about downloading and installing the script.
2. Expectations
The aim of the script is to provide a point-and-click mechanism to rotate parts within LDCad. Conceptually, the parts serve different purposes; some are identified as a rotation origin, some are identified as being aligned to another part and some parts are those which are being rotated. Although this post tends to use the term part, the script can also be used with sub-files.
The script provides solutions for two different scenarios
Images from an incomplete model of set 9748-1 (a current work-in-progress) illustrate the script's capabilities.
A few months ago, I wrote a Lua script for LDCad to animate the rotation of a 4 (or 3) bar linkage, posting the script to the LDraw forum. Writing that script got me thinking about writing a script which would determine the joining point for two parts, each being rotated about their own designated rotation point.
I’ve now written a version of the script. This post describes how to use the script and provides details about downloading and installing the script.
2. Expectations
The aim of the script is to provide a point-and-click mechanism to rotate parts within LDCad. Conceptually, the parts serve different purposes; some are identified as a rotation origin, some are identified as being aligned to another part and some parts are those which are being rotated. Although this post tends to use the term part, the script can also be used with sub-files.
The script provides solutions for two different scenarios
- rotating a single part to a designated alignment point
- rotating two parts to a join point common to both parts
Images from an incomplete model of set 9748-1 (a current work-in-progress) illustrate the script's capabilities.