AlignIt

Ken Baggett

Jefferson Lab

May 2005

![](media/image1.wmf){width="4.038888888888889in"
height="4.038888888888889in"}

#  

[Introduction 3](#introduction)

[Computer Requirements 3](#computer-requirements)

[Installing 3](#installing)

[Input Files 3](#input-files)

[The User Interface 3](#the-user-interface)

[Start Screen 4](#start-screen)

[Main Menu 4](#main-menu)

[File 4](#file)

[Import ZXY File 4](#import-zxy-file)

[Exit 5](#exit)

[Align 5](#align)

[Align System 5](#align-system)

[Rotate 6](#rotate)

[Translate 6](#translate)

[Save Alignment 6](#save-alignment)

[Load Alignment 6](#load-alignment)

[Construct 7](#construct)

2D Line 7

[3D Line 8](#d-line-1)

[2D Circle 8](#d-circle)

[Component Yaw Angle 8](#component-yaw-angle)

[Plane 9](#plane)

[Sphere 9](#sphere)

[Point 9](#point)

[Dimensions 10](#dimensions)

[Angle 10](#angle)

[Distance 10](#distance)

[Options 11](#options)

[Save Grid Coordinates To File 11](#save-grid-coordinates-to-file)

[Look Up Component Yaw Angle 11](#look-up-component-yaw-angle)

[Clear Component Angles 11](#clear-component-angles)

[References 12](#references)

# Introduction

AlignIt is a coordinate manipulation program and shape-fitting program.
It allows the user to construct shapes from coordinates, as well as
rotate and translate coordinate systems. Part coordinate systems can
also be created so that coordinates can be oriented to a measured part
making alignment and specification checks easier to accomplish.

# 

# Computer Requirements

For AlignIt Ver 2, Windows 2K or higher is recommended.

# Installing

For a stand-alone application, the user can copy AlignIt.exe to any
directory. For an Acams compatible install, AlignIt.exe should be copied
to the Acams\\Bin folder (usually "c:\\Acams\\Bin"). An AlignIt
compatible Acams.ini file is required to run the application and should
be copied to the WINNT or WINDOWS directory.

# Input Files

AlignIt is designed to work with the \*.XYZ output file created by 3DCD
(a least squares bundle adjustment program created at SLAC). Optionally,
the user may elect to use a Label ZXY coordinate file as input.

Example Label ZXY File

# The User Interface

AlignIt provides a simple user interface to allow the user to enter,
view, and manipulate data.

# Start Screen

The Start Screen appears first at run time and is used as the central
hub of the program. From the Start Screen the user can view current
coordinate values, create shapes, and create custom alignments.

The screen is broken up into five sections:

The Main Menu

Coordinate

![](media/image2.jpeg){width="6.25in" height="4.754861111111111in"}

# Main Menu

## File

### Import ZXY File

Use the Import ZXY File option to enter 3D coordinates from an external
file. Because AlignIt is designed to work with the Acams software
package, it will, by default, open the \*.xyz file created by 3DCD in
the last Acams job. Import ZXY File allows the user an easy way to enter
and manipulate coordinates in AlignIt without the need for 3DCD.

### Exit

Ends the Application

## Align

The align menu is used to change the alignment of the current coordinate
system.

### Align System

The Align System menu item (or Button) is used to create a user defined
part alignment. In the current release (AlignIt Ver.2) two predefined
alignments are available.

**3-2-1:** The user picks a plane, a line, and a point to define the
alignment. The plane defines the plane specified in the Direction of
Plane drop down box. The line defines the roll of the system. The point
defines the origin.

**Cylinder 3-2-1:** This option was created for part alignment of
cylinders (like cryomodules). The user selects a line, line, and point.
The first line defines the vector normal to plane defined in the
Direction of Plane drop down box. The second line defines the roll of
the system. The point defines the origin. Typically, the first line is
created by fitting a line to two circle created on opposite ends of the
cylinder. Also, the user may wish to add additional circles along the
same axis in the creation of the first line. For example, the user may
wish to include circles all along the frame to form the first best-fit
line in a space-frame survey.

![](media/image3.jpeg){width="5.875694444444444in"
height="3.3506944444444446in"}

### Rotate

![](media/image4.jpeg){width="1.6826388888888888in" height="2.375in"}

Use the [Rotate]{.underline} menu item or start screen button to rotate
the coordinate system about a specified axis. Shapes will also be
updated based on the coordinate rotations. The **Undo Align** button can
be used to undo any changes made by the rotation and revert to the
previous coordinate system.

### 

### 

### 

### 

### ![](media/image5.jpeg){width="1.6611111111111112in" height="2.375in"}Translate

Use the [Translate]{.underline} menu item or start screen button to
translate the coordinate system along a specified axis. Shapes will also
be updated based on the coordinate translations. The Undo Align button
can be used to undo any changes made by the translation and revert to
the previous coordinate system.

### 

### 

### 

### Save Alignment

Save alignment is used to save the current system alignment before
exiting AlignIt. It also may be used to save different alignment
references from within the same job. Once saved, the Load Alignment menu
item can be used to recall a saved alignment during a job or when a job
is restarted.

Note: When a job is restarted, the original coordinates are loaded from
the reference file at the original alignment.

### Load Alignment

Use Load Alignment to apply a saved alignment to a reference coordinate
file.

Note: If the 3DCD file is run with new or altered points after an
alignment is saved, the \*.xyz file coordinates will change and any
saved alignments should be erased and recreated.

## Construct

Use [Construct]{.underline} to create least-squares best-fit shapes from
the input data coordinates. Algorithms to define the shape fits were
derived from the NPL Report "Least --Squares Best-Fit Geometric
Elements"\[1\]. The main construction screen lists the data points
available from which to create the shape and, optionally, sphere and
compensation point data from which the shape can be compensated if a
sphere (used with laser trackers) is used to collect the data points. In
theodolite surveys as well as working with nominal data, compensation is
normally not an issue and therefore compensation is an option that may
be bypassed by leaving the compensation pull down menu blank.

![](media/image6.jpeg){width="5.5in" height="4.101388888888889in"}

### 

### 

### 2D Line

Select two or more points to create a best-fit line. All points are
projected onto a reference plane defined by the user during the shape
creation. . The line coordinate is the midpoint of the line as projected
to the reference plane.

### 3D Line

Select two or more points to create a best-fit line. The line coordinate
is specified as the centroid (x,y,z) of the selected data points.

### 

### 2D Circle

Circles are constructed from a combination of three or more data points
and a plane. AlignIt will allow users to either construct a projection
plane or use a predefined plane vector in the circle construction. In
the later, the mean of the circle data points are used as the plane
(z,x,y) values. Additionally, a component vector lookup table can be
used to specify a predefined component yaw angle. In this case, AlignIt
breaks the yaw angle into its unit vector components to create the plane
IJK values associated with the simulated plane.
![](media/image7.jpeg){width="2.1458333333333335in"
height="1.5409722222222222in"}

![](media/image8.jpeg){width="2.1458333333333335in"
height="1.1694444444444445in"}

Select three or more points to form a best-fit circle. Select a plane
from the pull down menu. The pull down menu will list all created and
predefined planes (Figure 3).

### 

### Component Yaw Angle

The Use Component button (Figure 4) is used to open the yaw angle lookup
table (Figure 5). The table allows the user to navigate through areas,
to sectors, and ultimately to the desired component.

![](media/image9.jpeg){width="4.020833333333333in"
height="3.5006944444444446in"}

### 

### Plane

**Best Fit:** A best-fit plane is constructed by selecting 3 or more
points from the shape menu.

**Plane Offset:** A plane offset is constructed by selecting an existing
plane and them entering the planes offset value. A plane is then created
parallel to the reference plane at the offset distance along the normal
vector.

### Sphere 

Select four or more to construct a best-fit sphere.

### Point

#### Line-Plane Intersection

Use Line-Plane intersection to create a point a point based on a line
and a plane or two points and a plane. When the two points are used, a
line is effectively created between the two points, but the resulting
line is not added to the shape details list.

## ![](media/image10.jpeg){width="1.8694444444444445in" height="2.6979166666666665in"}

## 

## 

## 

## Dimensions

### Angle ![](media/image11.jpeg){width="2.020138888888889in" height="1.9326388888888888in"}

Use the Angle menu option to display the angle calculation window. The
two features are selected from the pull down menus and the resultant
angle is displayed

### 

### Distance![](media/image12.jpeg){width="2.0493055555555557in" height="2.095138888888889in"}

Use the Distance menu option to display the distance calculation window.
The two features are selected from the pull down menus and the resultant
distance is displayed.

## 

## 

## 

## 

## Options

### Save Grid Coordinates To File

Select this option to save a copy of the current grid coordinates to a
file. This is useful if a saved copy of the final coordinates is desired
after AlignIt manipulation. Additionally, the [Save
Alignment](#save-alignment) menu option should be used to save the
current state of the coordinate transformation so that it can be
recalled at a later time.

### Look Up Component Yaw Angle

Displays the [Component Yaw Angle lookup table](#section-12) form.

### Clear Component Angles

Clears the temporary list of component angles created by running the
[Component Yaw Angle lookup table](#section-12). A recent list of
component angles are added to the component pull down menu so that the
user won't have to run the lookup table on subsequent shape fits.

# References

**\[1\]** "Least-Squares Best-Fit Geometric Elements", Alistair B.
Forbes. NPL Report DITC 140/89. Revised February 1991.