## Representation of geometric objects GCM three-dimensional geometric solver uses a certain representation of data of geometric objects which is illustrated in Table 1. All objects are expressed in coordinates of points, vectors and numbers (scalars) written in a form specific for each type. ::::{only} html Table 1 – Representation of Geometric Objects :::{list-table} :header-rows: 1 :widths: 25 40 35 * - **Geometry Type** - **Image** - **Tuple and Its Values** * - Point - - \ – Cartesian coordinates of the point * - Line - :::{figure} /SOLVER/THREE-DIMENSIONAL_GEOMETRIC_SOLVER/pictures/S.6.8.1_Line.png :width: 5cm :align: center ::: - \ O – point on the line; Z – direction vector of the line. * - Plane - :::{figure} /SOLVER/THREE-DIMENSIONAL_GEOMETRIC_SOLVER/pictures/S.6.8.1_Plane.png :width: 5cm :align: center ::: - \ O – point on the plane; Z – normal vector of the plane. * - Cylinder - :::{figure} /SOLVER/THREE-DIMENSIONAL_GEOMETRIC_SOLVER/pictures/S.6.8.1_Cylinder.png :width: 5cm :align: center ::: - \ O – point on the cone axis; Z – direction vector of the axis; R – cylinder radius. * - Cone - :::{figure} /SOLVER/THREE-DIMENSIONAL_GEOMETRIC_SOLVER/pictures/S.6.8.1_Cone.png :width: 5cm :align: center ::: - \ O – center of the lower cone section; Z – direction vector of the axis; R{sub}`A`, R{sub}`B` – radii of the lower and upper sections of the cone whose height is assumed to be 1. * - Sphere - :::{figure} /SOLVER/THREE-DIMENSIONAL_GEOMETRIC_SOLVER/pictures/S.6.8.1_Sphere.png :width: 5cm :align: center ::: - \ O – sphere center; R – sphere radius. * - Torus - :::{figure} /SOLVER/THREE-DIMENSIONAL_GEOMETRIC_SOLVER/pictures/S.6.8.1_Torus.png :width: 5cm :align: center ::: - \ * - Circle - :::{figure} /SOLVER/THREE-DIMENSIONAL_GEOMETRIC_SOLVER/pictures/S.6.8.1_Circle.png :width: 5cm :align: center ::: - \ O – circle center; Z – direction of the circle axis; R – circle radius. * - Local Coordinate System - :::{figure} /SOLVER/THREE-DIMENSIONAL_GEOMETRIC_SOLVER/pictures/S.6.8.1_LSK.png :width: 5cm :align: center ::: - \ O – point of the LCS origin; Z X Y – triplet of LCS unit vectors. ::: :::: Records of all these geometric objects can be unified in the form of the tuple of values: \<$O Z X Y R_A R_B$\> where four values O Z X Y define the object location in space, namely, its LCS determined by CS start point and three axes Z, X, Y, while two scalar values $R_A$, $R_B$ define the parameters of radial objects, such as circle, cylinder, cone, toroid, and sphere. A geometric object of any type has its associated local system of coordinates. Even a point or sphere can be redundantly represented in LCS for which the directions of Z, X, Y axes do not matter, but coordinates of the origin point O are important. Similarly, a plane has its own LCS, the origin point of which is defined by the plane position, while the Z axis defines the plane normal. Here, the values of axes X, Y for the plane are ignored. In the software interface of the 3D solver, the unified form of recording \<$O Z X Y R_A R_B$\> is used in the GCM_g\_record structure, whose data fields can be found in Table 2: Table 2 - Description of data fields of the GCM_g\_record structure. | **Data type** | **Data field** | **Interpretation** (geometrical meaning is specified in table 32.8.1.) | |:--------------|:---------------|:-----------------------------------------------------------------------------------------------------------------------| | GCM_g\_type | type | Geometry type. | | GCM_POINT | origin | Point of the geometric object positioning (origin of LCS, center of a circle or sphere, etc.). | | GCM_vec3d | axisZ | Z axis of the local coordinate system (for example, axisZ is a directing vector for a straight line). | | | axisX | X axis of the local coordinate system. | | | axisY | Y axis of the local coordinate system. | | double | radiusA | Sets the radius of a circle, sphere or cylinder; sets the base radius for a cone, and the greater radius for a toroid. | | | radiusB | Sets the lesser radius for a toroid or cone. | GCM_g\_record summarizes any geometry record. Therefore, some GCM_g\_record data fields may remain unused, depending on the geometry type. For instance, axisX, axisY fields are required only when type = GCM_LCS, while they are irrelevant for such objects as plane, cylinder and toroid. The axisZ field is not used for points and spheres. In other cases, however, it sets the orientation of an object in space. The GCM solver's API supports the auxiliary functions GCM_Point, GCM_Line, GCM_Plane, GCM_Cone, GCM_Cylinder, GCM_Circle, GCM_Torus, GCM_Sphere, GCM_SolidLCS, making it possible to fill the GCM_g\_record structure correctly. Details of these functions are given in section [Adding and deleting geometric objects](./Adding_and_deleting_geometric_objects.md).