LDCad Aligning parts using rotation scripts


Aligning parts using rotation scripts
#2
3. Single Part Rotation

Note that the functionality described in this section can be achieved using equivalent capabilities which already exist within LDCad, albeit with a slightly different approach. This functionality was added to provide a slightly simpler point-and-click approach.

Description
Four parts are required for this action, as illustrated in Figure 1:

  1. a part to rotate around,
  2. an alignment part for the part to be rotated,
  3. a fixed part to be rotated to and
  4. the part to be rotated

[Image: 01_single_label.png]
Figure 1 – Single Part Rotation Reference


Existing LDCad Approach

Until recently, the approach I used in LDCad is to temporarily add three extra parts, at positions which correspond to 1, 2 and 3, and then select all three parts in sequence. Via the right mouse click on the first part, I then choose the Selection Info/Show Info menu option as illustrated in Figure 2 (albeit with all other parts / sub-files hidden for the sake of clarity) …

[Image: 02_single_current_01.png]
Figure 2 – Initial part selection

… to toggle the menu item “Show info” from “No” to “Yes” (Figure 3). Once angles are being displayed, the significant angle (highlighted by the red box) can be copied to the clipboard just be clicking on the angle.

[Image: 03_single_current_02.png]
Figure 3 – Displaying angles

The next step is to apply the rotation angle to the appropriate part/sub-file. In this case (illustrated in Figure 4), the first part and the fourth part/sub-file are selected and the Manual rotation dialog invoked via its shortcut key (usually CTRL+r). Selecting the first part as well as the fourth part helps to ensure the fourth part is rotated according to the origin of the first part rather than the origin of the fourth part.

[Image: 04_single_current_03.png]
Figure 4 – Manual Rotation of part

Now for the whoops moment. I often forget which way the positive and negative value for the rotation angle cause an anti-clockwise or clockwise rotation of parts within LDCad. In this case, entering a value of 19.58 caused the part to rotate in the wrong direction so a quick undo (CTRL-z) followed by CTRL+r and making the angle a negative value (i.e. -19.58) results in the desired alignment (Figure 5).

[Image: 05_single_current_04.png]
Figure 5 – Desired part alignment
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Aligning parts using rotation scripts - by David Manley - 2021-12-16, 8:31

Forum Jump:


Users browsing this thread: 5 Guest(s)