Geometric Object Control Points
Among the geometric types supported by the solver (see Item Supported Geometry Types), a point plays a special role. First of all, a point is the most elementary geometric object. Secondly, all other geometry types can be expressed using points that are called control points. For example, a circle is expressed by the <C,R> structure, where C is the center point, and R is a scalar that determines the numeric radius value. Thirdly, control points can independently take part in constraints as their arguments. For example, they permit to define constraints both for a circle and for each its separate point, for example, the distance from the circle center to the line (see Fig. 1).
Fig. 1
С is the center control point,
T is the tangency of the circle and the line,
D is the distance between the center and the line. In order to work with control point as an independent point, you need to request its descriptor from the geometric object using
geom_item GCE_PointOf(GCE_system gSys, geom_item g, point_type pnt).
The function returns a descriptor of the control point of the geometric object g that belongs to the gSys constraint system. The pnt parameter determines what control point of the object is requested and it takes one of the following values:
GCE_FIRST_END is the starting point of the curve (the first end);
GCE_SECOND_END is the end point of the curve (the second end);
GCE_CENTRE is the center of circle, ellipse, or its arc (bounded curve);
GCE_Q1 is an ellipse quadrantal point (3 hours);
GCE_Q2 is an ellipse quadrantal point (12 hours);
GCE_Q3 is an ellipse quadrantal point (6 hours);
GCE_Q4 is an ellipse quadrantal point (9 hours).
Control points of spline curve can be requested using
geom_item GCE_SplinePoint(GCE_system gSys, geom_item spl, size_t pntIdx).
The function returns a descriptor of the spl spline control point with the pntIdx number, that takes values from 0 to N–1, where N is the number of the spline control points. Fig. 2 shows a spline that has N = 7 control points (red circles) numbered starting from 0.
Fig. 2