## Alignment of Points This type of constraint is mostly used to horizontally or vertically align point pairs. In general, this constraint would align points on an imaginary line with a given direction. Note that it does not guarantee that the order of aligned points along a given direction will be preserved. Alignment of points with a constant alignment direction is set up by calling the method ```cpp constraint_item GCE_AddAlignPoints(GCE_system gSys, geom_item p[2], double ang) ``` The function returns a descriptor of a new constraint registered in the **gSys** system. **p\[0\]** and **p\[1\]** pair parameters set the descriptors of the aligned points, and the **ang** parameter is set in radians and it determines the direction, along this direction the points would be aligned. For example, the $ang = 0$ angular direction would correspond to horizontal alignment of points, and if $ang = \pi/2$, then the points would be aligned vertically. Alignment of points with a variable alignment direction is set by the method ```cpp constraint_item GCE_AddAlignPoints(GCE_system gSys, geom_item p[2], geom_item dir) ``` Similar to the constant alignment direction method, this implementation takes a constraint system **gSys** and a pair of points **p\[2\]**. The **dir** parameter is any object registered in the solver for which the call **GCE_GetVectorValue**(gSys, dir, GCE_DIRECTION) is valid. Alignment will occur along the direction vector (**GCE_DIRECTION**) of the linear object or the major axis of the ellipse. This constraint can be used in conjunction with GCE_AddLinearDimension to set a linear dimension as an alternative to the GCE_AddDistance method. This method is preferable as it allows the help points of the dimension to be better customized to suit user expectations.