Home >> Programming Projects >>Rotate to Altitude and Azimuth Plugin for Sketchup

Rotate to Altitude and Azimuth Plugin for Sketchup

This Sketchup plugin will rotate either an object or a face to match the user's selected altitude and azimuth. It works by first turning the altitude and azimuth into a vector and then doing a rotation transformation on the selected face so that the normal of the face matches the vector.

This can be useful for astronomy, archaeoastronomy, and solar energy designing.

A big thanks to Construsol for helping with this plugin's development.

Click the link to download the "Rotate to Altitude and Azimuth Plugin for Sketchup (Rotate_to_Alt_and_Az.rb)".

Miscellaneous Tips for Success

1. You must select a single face only when using this plugin.

2. If the face is inside a group, you must double click that group to access the face.

3. When using an altitude of either 90 or -90, you may find that the azimuth does not change when you try to rotate the face. Rest assured though that this orientation is still correct since the azimuth is irrelevant at this angle. 

4. When rotating an object, the face you select determines that object's final orientation. The behavior of the rotation can be unpredictable if you do multiple rotations on an object while selecting a different face for each rotation. Select the same face for each rotation if you want predictable results.

Example 1: Rotating Everything

For this example we will create a simple box and select one of its faces. Here I chose the yellow one on top. Next go to "Plugins" on the menu bar, then "Rotate to Altitude and Azimuth", and, finally, click "Rotate Everything".

The window below should open next. Here, type in an altitude and azimuth and select "South" as the direction for where the azimuth angle = 0. When tracking the locations of celestial objects in the sky, astronomers sometimes like to use south as 0 while other times they use north. This is why the plugin has an option to switch.

Sketchup's default setting uses the dashed green line as south and the solid green line as north. In case you were wondering, the plugin will adapt if you change these defaults.

After clicking OK, the face will rotate to match the selected altitude and azimuth, as will everything attached.

 

Example 2: Rotating the Face Only

For this example, we will rotate just a single face instead of the whole object. To do this, select a face, go to "Plugins" on the menu bar,  then "Rotate to Altitude and Azimuth", and finally click "Rotate Face".

The same window described earlier will pop up.

Here is the object after the rotation. Notice how the face rotated while everything else stayed in place.

This works with single faces also.

 

The End

Have Fun!

 

Home >> Programming Projects >>Rotate to Altitude and Azimuth Plugin for Sketchup