C3D Kernel
104598

Classes  
struct  GCM_vec3d 
Coordinates of 3Dvector. More...  
struct  GCM_point 
Сoordinates of point in threedimensional space. More...  
struct  GCM_g_record 
Structure of data fields representing a geometric object. More...  
struct  GCM_extra_param 
Additional parameter for functions of type #GCM_dependent_func. More...  
struct  GCM_diagnostic_pars 
Diagnostic characteristics of constraint system. More...  
Typedefs  
typedef MtGeomSolver *  GCM_system 
System of geometric constraints.  
typedef MtObjectId  GCM_object 
Descriptor of geometrical object registered in the solver context.  
typedef GCM_object  GCM_geom 
Descriptor of geometrical object registered in the solver context.  
typedef GCM_object  GCM_constraint 
Descriptor of a constraint registered in the solver.  
typedef GCM_object  GCM_pattern 
Descriptor of a pattern registered in the solver.  
typedef bool(*  GCM_dependent_func )(MbPlacement3D gPlaces[], size_t gPlacesSize, GCM_extra_param exPar) 
typedef GCM_dependent_func  GCM_dependent_geom_func 
Alternative typename of #GCM_dependent_func.  
Enumerations  
enum  GCM_g_type { GCM_NULL_GTYPE = 0, GCM_POINT, GCM_LINE, GCM_PLANE, GCM_CYLINDER, GCM_CONE, GCM_SPHERE, GCM_TORUS, GCM_CIRCLE, GCM_LCS, GCM_MARKER, GCM_SPLINE, GCM_VECTOR, GCM_UNKNOWN_GTYPE, GCM_LAST_GTYPE } 
Dictionary of geometric primitives types. More...  
enum  GCM_c_type { GCM_UNKNOWN = 1, GCM_COINCIDENT = 0, GCM_PARALLEL = 1, GCM_PERPENDICULAR = 2, GCM_TANGENT = 3, GCM_CONCENTRIC = 4, GCM_DISTANCE = 5, GCM_ANGLE = 6, GCM_IN_PLACE = 7, GCM_TRANSMITTION = 9, GCM_CAM_MECHANISM = 10, GCM_SYMMETRIC = 11, GCM_DEPENDENT = 14, GCM_PATTERNED = 15, GCM_LINEAR_PATTERN = 16, GCM_ANGULAR_PATTERN = 17, GCM_RADIUS = 18, GCM_LAST_CTYPE } 
Dictionary of constraint types. More...  
enum  GCM_alignment { GCM_MIN_ALIGNMENT = 1, GCM_OPPOSITE = 1, GCM_CLOSEST = 0, GCM_COORIENTED = 1, GCM_ALIGNED = 1, GCM_NO_ALIGNMENT = 2, GCM_ALIGNED_0 = 1, GCM_ALIGNED_1 = 3, GCM_ALIGNED_2 = 4, GCM_ALIGNED_3 = 5, GCM_REVERSE_0 = 1, GCM_REVERSE_1 = 6, GCM_REVERSE_2 = 7, GCM_REVERSE_3 = 8, GCM_ROTATED = 9, GCM_ALIGN_WITH_AXIAL_GEOM = 10, GCM_MAX_ALIGNMENT } 
Variants of alignment. More...  
enum  GCM_angle_type { GCM_NONE_ANGLE = 0, GCM_2D_ANGLE = 1, GCM_3D_ANGLE = 2, GCM_PLANAR_ANGLE = GCM_2D_ANGLE } 
Variant of angular dimension. More...  
enum  GCM_tan_choice { GCM_TAN_NONE = 0x00, GCM_TAN_POINT = 0x01, GCM_TAN_LINE = 0x02, GCM_TAN_CIRCLE = 0x04 } 
Variants of tangency of surfaces or curves. More...  
enum  GCM_result { GCM_RESULT_None = 0, GCM_RESULT_Ok = 1, GCM_RESULT_Satisfied = GCM_RESULT_Ok, GCM_RESULT_Overconstrained = 2, GCM_RESULT_MatedFixation = 3, GCM_RESULT_DraggingFailed = 4, GCM_RESULT_Not_Satisfied = 5, GCM_RESULT_Unsolvable = 6, GCM_RESULT_DependentConstraintUnsolved = 7, GCM_RESULT_Error = 8, GCM_RESULT_InappropriateAlignment = 9, GCM_RESULT_InappropriateArgument = 10, GCM_RESULT_IncompatibleArguments = 3001, GCM_RESULT_InconsistentAngleType, GCM_RESULT_InconsistentAlignment, GCM_RESULT_Duplicated, GCM_RESULT_CyclicDependence, GCM_RESULT_MultiDependedGeom, GCM_RESULT_OverconstrainingDependedGeoms, mtResCode_InvalidDependenceForFixGeom, GCM_RESULT_InvalidArguments, mtResCode_UnsupportedTangencyChoice, mtResCode_IsNoPossibleForCircTanChoice, mtResCode_CoaxialMtGearTransmissionIsNotAvalable, mtResCode_NoSeparatedSolutionForCamGear, mtResCode_CyclicDependenceForTwoOrMoreCamGears, mtResCode_InconsistentFollowerAxis, GCM_RESULT_InconsistentPlanarAngle, GCM_RESULT_ItsNotDrivingDimension, GCM_RESULT_Unregistered, GCM_RESULT_InternalError, GCM_RESULT_Aborted, GCM_RESULT_Last_ } 
Diagnostic codes of 3Dsolver. More...  
enum  GCM_dependency { GCM_NO_DEPENDENCY = 0, GCM_1ST_DEPENDENT = 2, GCM_2ND_DEPENDENT = 1 } 
Dependency character of solid pair (geoms) More...  
enum  GCM_scale { GCM_NO_SCALE = 0, GCM_RIGID = 1, GCM_LINEAR_SCALE = 2 } 
The type of relationship between elements in the pattern. More...  
Functions  
GCM_system  GCM_CreateSystem () 
Create a simple constraint system.  
void  GCM_ClearSystem (GCM_system gSys) 
Make the constraint system empty.  
void  GCM_RemoveSystem (GCM_system gSys) 
Delete system of constraints.  
bool  GCM_ReadSystem (GCM_system gSys, reader &in) 
Read constraint system from stream.  
bool  GCM_WriteSystem (GCM_system gSys, writer &out) 
Write constraint system to stream.  
GCM_g_record  GCM_NullGeom () 
Give the record of empty geometric object.  
GCM_g_record  GCM_Point (const MbCartPoint3D &) 
Get a record of point from the type MbCartPoint3D to the type GCM_g_record.  
GCM_g_record  GCM_Line (const MbCartPoint3D &org, const MbVector3D &axisZ) 
Record of line specified by the point and direction vector.  
GCM_g_record  GCM_Plane (const MbCartPoint3D &org, const MbVector3D &axisZ) 
Record of plane specified by the point and normal vector.  
GCM_g_record  GCM_Cone (const MbCartPoint3D ¢re, const MbVector3D &axis, double radiusA, double radiusB) 
Get data record of cone for the given set of parameters.  
GCM_g_record  GCM_Cylinder (const MbCartPoint3D ¢re, const MbVector3D &axis, double radius) 
Get data record of cylinder for the given set of parameters.  
GCM_g_record  GCM_Circle (const MbCartPoint3D ¢re, const MbVector3D &axis, double radius) 
Get record of circle specified by the set of parameters.  
GCM_g_record  GCM_Torus (const MbCartPoint3D ¢re, const MbVector3D &axis, double majorR, double minorR) 
Get data record of torus for the given set of parameters.  
GCM_g_record  GCM_Sphere (const MbCartPoint3D ¢re, double radius) 
Get data record of sphere specified by center and radius.  
GCM_g_record  GCM_SolidLCS (const MbCartPoint3D &org, const MbVector3D &axisZ=MbVector3D::zAxis, const MbVector3D &axisX=MbVector3D::xAxis) 
Get a data record of solid specified by its origin of coordinates, Zaxis and Xaxis.  
GCM_g_record  GCM_SolidLCS (const MbPlacement3D &) 
Get a data record of the solid coordinate system by its placement.  
GCM_geom  GCM_AddPoint (GCM_system gSys, const MbCartPoint3D &pVal) 
Add point to the constraint system.  
GCM_geom  GCM_AddGeom (GCM_system gSys, const GCM_g_record &gRec) 
Add geometric object to the constraint system.  
GCM_geom  GCM_AddGeom (GCM_system gSys, GCM_g_type gType, const MbMatrix3D &gMat, double radiusA, double radiusB) 
Add geometric object to the constraint system.  
GCM_geom  GCM_SubGeom (GCM_system gSys, GCM_geom sol, const GCM_g_record &gRec) 
Include a geometric subobject to the subsystem of a solid (rigid cluster).  
GCM_geom  GCM_Parent (GCM_system gSys, GCM_geom subGeom) 
Give a cluster (solid) in which a geometric object is included.  
GCM_g_type  GCM_GeomType (GCM_system gSys, GCM_geom g) 
A type of geometric object.  
void  GCM_RemoveGeom (GCM_system gSys, GCM_geom g) 
Delete a geometric object from the constraint system.  
GCM_constraint  GCM_AddBinConstraint (GCM_system gSys, GCM_c_type cType, GCM_geom g1, GCM_geom g2, GCM_alignment aVal=GCM_CLOSEST, GCM_tan_choice tVar=GCM_TAN_POINT) 
Set a binary constraint for two geometric objects.  
GCM_constraint  GCM_AddDistance (GCM_system gSys, GCM_geom g1, GCM_geom g2, double dVal, GCM_alignment aVal=GCM_CLOSEST) 
Set a constraint which specifies distance between a pair of geometric objects.  
GCM_constraint  GCM_AddAngle (GCM_system gSys, GCM_geom g1, GCM_geom g2, GCM_geom axis, double dVal) 
Set a constraint which specifies angle between a pair of geometric objects.  
GCM_constraint  GCM_AddAngle (GCM_system gSys, GCM_geom g1, GCM_geom g2, double dVal) 
GCM_constraint  GCM_FixRadius (GCM_system gSys, GCM_geom g1) 
To create a constraint which specifies a radius of geometric objects.  
GCM_constraint  GCM_AddPlanarAngle (GCM_system gSys, GCM_geom g1, GCM_geom g2, GCM_geom axis, double dVal) 
Set a driving planar angle between a pair of geometric objects.  
GCM_constraint  GCM_AddSymmeric (GCM_system gSys, GCM_geom g1, GCM_geom g2, GCM_geom plane, GCM_alignment aVal=GCM_NO_ALIGNMENT) 
GCM_pattern  GCM_AddLinearPattern (GCM_system gSys, GCM_geom g1, GCM_geom g2, GCM_alignment align=GCM_NO_ALIGNMENT) 
Create a linear pattern constraint.  
GCM_pattern  GCM_AddAngularPattern (GCM_system gSys, GCM_geom g1, GCM_geom g2, GCM_alignment align=GCM_NO_ALIGNMENT) 
Create an angular pattern constraint.  
GCM_constraint  GCM_AddGeomToPattern (GCM_system gSys, GCM_pattern ptrn, GCM_geom geom, double position, GCM_alignment align=GCM_NO_ALIGNMENT, GCM_scale scale=GCM_RIGID) 
Add geometric object to the pattern.  
GCM_constraint  GCM_AddConstraint (GCM_system gSys, const GCM_c_record &cRec) 
Set a constraint.  
GCM_geom  GCM_SetDependent (GCM_system gSys, GCM_constraint con, GCM_geom g) 
void  GCM_RemoveConstraint (GCM_system gSys, GCM_constraint con) 
Delete a constraint from the system.  
GCM_constraint  GCM_FixGeom_ (GCM_system gSys, GCM_geom g) 
void  GCM_FixGeom (GCM_system gSys, GCM_geom g) 
Set a geometric object fixed.  
void  GCM_FreeGeom (GCM_system gSys, GCM_geom g) 
Set free geometric object fixed by GCM_FixGeom call.  
bool  GCM_IsFixed (GCM_system gSys, GCM_geom g) 
Returns 'true' if the object is fixed by GCM_FixGeom call.  
GCM_result  GCM_Evaluate (GCM_system gSys) 
Calculate the constraint system.  
GCM_result  GCM_EvaluationResult (GCM_system gSys, GCM_constraint cItem) 
Get result code of the evaluation of constraint.  
bool  GCM_IsSatisfied (GCM_system gSys, GCM_constraint cItem) 
Perform a check that a constraint is satisfied.  
MbPlacement3D  GCM_Placement (GCM_system gSys, GCM_geom g) 
Get current placement (solution) of the geometric object.  
double  GCM_Radius (GCM_system gSys, GCM_geom g) 
Current radius value of the geometric object.  
double  GCM_RadiusA (GCM_system gSys, GCM_geom g) 
Current "major" radius value of torus or cone.  
double  GCM_RadiusB (GCM_system gSys, GCM_geom g) 
Current "minor" radius value of torus or cone.  
GCM_result  GCM_ChangeDrivingDimension (GCM_system gSys, GCM_constraint dItem, double dVal) 
Change the value of driving dimension.  
void  GCM_SetPlacement (GCM_system gSys, GCM_geom g, const MbPlacement3D &place) 
Set current placement of the geometric object.  
GCM_result  GCM_PrepareReposition (GCM_system gSys, GCM_geom movGeom, const MbPlacement3D &projPlane, const MbCartPoint3D &curPnt) 
Initialize mode of object moving in the screen plane.  
GCM_result  GCM_PrepareReposition (GCM_system gSys, GCM_geom rotGeom, const MbCartPoint3D &org, const MbVector3D &axis) 
To initialize the rotation mode of the component around a fixed axis.  
void  GCM_FinishReposition (GCM_system gSys) 
Finish the dragging mode.  
GCM_geom  GCM_GetMovingGeom (GCM_system gSys) 
Get manipulation object with which the Solver works when being in the dragging mode (rotating or moving).  
GCM_result  GCM_SolveReposition (GCM_system gSys, GCM_geom g, const MbPlacement3D &newPos, MtRepositionMode movType) 
Solve the system for an arbitrary change of position of one solid.  
GCM_result  GCM_SolveReposition (GCM_system gSys, const MbCartPoint3D &curXYZ) 
Solve the system of constraints for new position of cursor in the dragging mode.  
GCM_result  GCM_SolveReposition (GCM_system gSys, double alpha) 
Solve the system by changing the position of the component through one coordinate.  
bool  GCM_SetJournal (GCM_system gSys, const char *fName) 
Switch on the journaling and specify the file for recording a journal of GCE API calls.  
Variables  
const GCM_object  GCM_NULL = _GCM_NULL 
Descriptor of empty object or constraint.  
const GCM_geom  GCM_GROUND = _GCM_GROUND 
Descriptor of rigid subset of objects which are given in global coordinate system. 
enum GCM_g_type 
enum GCM_c_type 
enum GCM_alignment 
enum GCM_angle_type 
enum GCM_tan_choice 
enum GCM_result 
GCM_result enumerates the values returned by the GCM API calls including the diagnostic codes of solving geometric constraints. Values of this type are returned by functions such as GCM_Evaluate and GCM_EvaluationResult.
enum GCM_dependency 
enum GCM_scale 
GCM_system GCM_CreateSystem  (  ) 
The call creates a simple constraint system. Besides, there are created internal data structures of geometric solver maintaining the system of constraints. The function returns a special descriptor by which the constraint system is available for various manipulations: addition and deletion of geometric objects, constraints, variation of sizes, dragging underconstrained objects etc.
void GCM_ClearSystem  (  GCM_system  gSys  ) 
This method makes the constraint system empty while the descriptor gSys remains valid, i.e. it is possible to perform the further work with the constraint system.
[in]  gSys   System of constraints. 
void GCM_RemoveSystem  (  GCM_system  gSys  ) 
This method makes the constraint system invalid. Deallocation of RAM from the internal data structures maintaining the system of constraints is performed.
[in]  gSys   System of constraints. 
bool GCM_ReadSystem  (  GCM_system  gSys, 
reader &  in  
) 
[in]  gSys   System of constraints. 
[in]  in   Stream for reading. 
bool GCM_WriteSystem  (  GCM_system  gSys, 
writer &  out  
) 
[in]  gSys   System of constraints. 
[in]  out   Stream for writing. 
GCM_g_record GCM_Cone  (  const MbCartPoint3D &  centre, 
const MbVector3D &  axis,  
double  radiusA,  
double  radiusB  
) 
[in]  centre   Center of base circle of the cone. 
[in]  axis   Direction vector of the cone axis. 
[in]  radiusA   Radius of the base circle. 
[in]  radiusB   Radius of section of circle ("minor" radius). 
It is assumed that the parameters describe the imaginary cone frustum, whose height is always unit of length. In this radiusA  is the radius of the base of the cone, and radiusB  the radius of its crosssection.
GCM_g_record GCM_Cylinder  (  const MbCartPoint3D &  centre, 
const MbVector3D &  axis,  
double  radius  
) 
[in]  centre   Center of base circle of the cylinder. 
[in]  axis   Direction vector of the cylinder axis. 
[in]  radius   Radius of the base circle. 
GCM_g_record GCM_Circle  (  const MbCartPoint3D &  centre, 
const MbVector3D &  axis,  
double  radius  
) 
[in]  centre   Center of the circle. 
[in]  axis   Direction vector of the circle axis. 
[in]  radius   Radius of the circle. 
GCM_g_record GCM_Torus  (  const MbCartPoint3D &  centre, 
const MbVector3D &  axis,  
double  majorR,  
double  minorR  
) 
[in]  centre   Center of torus. 
[in]  axis   Direction vector of the rotation axis. 
[in]  majorR   "Major" radius is the radius of circle sweeping center of the rotating section. 
[in]  minorR   Radius of section of circle ("minor" radius). 
Thus, it is assumed that the torus is an imaginary surface formed by rotation of a circle of "minor radius" lying in the same plane as the axis of rotation and the center located at a distance of majorR from the axis.
GCM_g_record GCM_Sphere  (  const MbCartPoint3D &  centre, 
double  radius  
) 
[in]  centre   Center of the sphere. 
[in]  radius   Radius of the sphere. 
GCM_g_record GCM_SolidLCS  (  const MbCartPoint3D &  org, 
const MbVector3D &  axisZ = MbVector3D::zAxis , 

const MbVector3D &  axisX = MbVector3D::xAxis 

) 
The result, which returns this function, is used to specify a rigid body (cluster) in the system by calling GCM_AddGeom or GCM_SubGeom.
GCM_g_record GCM_SolidLCS  (  const MbPlacement3D &  ) 
The result, which returns this function, is used to specify a rigid body (cluster) in the system by calling GCM_AddGeom or GCM_SubGeom.
GCM_geom GCM_AddPoint  (  GCM_system  gSys, 
const MbCartPoint3D &  pVal  
) 
[in]  gSys   System of constraints. 
[in]  pVal   Coordinates of a point. 
GCM_geom GCM_AddGeom  (  GCM_system  gSys, 
const GCM_g_record &  gRec  
) 
[in]  gSys   System of constraints. 
[in]  gRec   Record of geometric record. 
GCM_geom GCM_AddGeom  (  GCM_system  gSys, 
GCM_g_type  gType,  
const MbMatrix3D &  gMat,  
double  radiusA,  
double  radiusB  
) 
[in]  gSys   System of constraints. 
[in]  gType   Type of geometric object. 
[in]  gMat   Direct matrix of geometric object. 
[in]  radiusA   Radius of circle, cylinder, sphere, also "major" radius of cone and torus. 
[in]  radiusB   "Minor" radius of cone and torus. 
GCM_geom GCM_SubGeom  (  GCM_system  gSys, 
GCM_geom  sol,  
const GCM_g_record &  gRec  
) 
[in]  gSys   System of constraints. 
[in]  sol   Solid or rigid cluster. 
[in]  gRec   Record of geometric subobject, which is given in LCS of the solid. 
GCM_geom GCM_Parent  (  GCM_system  gSys, 
GCM_geom  subGeom  
) 
[in]  gSys   System of constraints. 
[in]  subGeom   A geometric object belonging to the cluster.. 
GCM_g_type GCM_GeomType  (  GCM_system  gSys, 
GCM_geom  g  
) 
[in]  gSys   System of constraints. 
[in]  g   Descriptor of geometric object 
void GCM_RemoveGeom  (  GCM_system  gSys, 
GCM_geom  g  
) 
gSys   System of constraints. 
g   Descriptor of geometric object 
After using this function the object descriptor 'g' will be invalidated. It should be noted that the removed geometric object can still involved in other objects and constraints. In this case, the object to be deleted, although it is considered removed actually remains in effect until other objects connected with will be deleted.
GCM_constraint GCM_AddBinConstraint  (  GCM_system  gSys, 
GCM_c_type  cType,  
GCM_geom  g1,  
GCM_geom  g2,  
GCM_alignment  aVal = GCM_CLOSEST , 

GCM_tan_choice  tVar = GCM_TAN_POINT 

) 
[in]  gSys   System of constraints. 
[in]  g1   Descriptors of first object. 
[in]  g2   Descriptors of second object. 
[in]  aVal   Alignment option. 
[in]  tVar   Variant of tangency for constraint of type 'GCM_TANGENT'. 
The function is used to set a binary constraint of any type except dimensional constraints, namely one of the following types: GCM_COINCIDENT, GCM_PARALLEL, GCM_PERPENDICULAR, GCM_TANGENT, GCM_CONCENTRIC, GCM_IN_PLACE. In a case of failure, the function returns a handle to an empty object GCM_NULL.
GCM_constraint GCM_AddDistance  (  GCM_system  gSys, 
GCM_geom  g1,  
GCM_geom  g2,  
double  dVal,  
GCM_alignment  aVal = GCM_CLOSEST 

) 
[in]  gSys   System of constraints. 
[in]  g1   Descriptors of first object. 
[in]  g2   Descriptors of second object. 
[in]  dVal   The value of dimension. 
[in]  aVal   Alignment option. 
The function creates a dimensional constraint of type GCM_DISTANCE, which specifies linear dimension between two geometric objects. In a failed call, the function returns a handle to an empty object GCM_NULL.
GCM_constraint GCM_AddAngle  (  GCM_system  gSys, 
GCM_geom  g1,  
GCM_geom  g2,  
GCM_geom  axis,  
double  dVal  
) 
[in]  gSys   System of constraints. 
[in]  g1   Descriptors of first object. 
[in]  g2   Descriptors of second object. 
[in]  axis   Descriptor of an object that specifying the rotation axis of angle. It can be GCM_NULL. 
[in]  dVal   The value of dimension (radians). 
The function creates a dimensional constraint of type GCM_ANGLE, which specifies angle between the directions of two geometric objects. If the rotational axis is specified (i.e. != GCM_NULL), the angle has an planar method of measurement (0 ... 2пи). In this case directions of 'g1' and 'g2' must lie on a plane which has a normal specified by the 'axis' parameter (both directions perpendicular to the axis ). In a failed call, the function returns a handle to an empty object GCM_NULL.
GCM_constraint GCM_FixRadius  (  GCM_system  gSys, 
GCM_geom  g1  
) 
[in]  gSys   System of constraints. 
[in]  g1   Descriptor of the first object which has nonzero radius. 
This function allows to specify a radius of the geometric object. To change radius value use the function GCM_ChangeDrivingDimension. To remove limitation on radius of the geometric object use the function GCM_RemoveConstraint. In a case of failure, the function returns a handle to an empty object GCM_NULL.
GCM_constraint GCM_AddPlanarAngle  (  GCM_system  gSys, 
GCM_geom  g1,  
GCM_geom  g2,  
GCM_geom  axis,  
double  dVal  
) 
This is the same call GCM_AddAngle, but requires an axis, which defines a plane in which the angle is measured.
GCM_pattern GCM_AddLinearPattern  (  GCM_system  gSys, 
GCM_geom  g1,  
GCM_geom  g2,  
GCM_alignment  align = GCM_NO_ALIGNMENT 

) 
The Linear Pattern constraint defines the law under which geometric objects added to this pattern using GCM_AddGeomToPattern function are located on the given line (guide line). In addition to the guide line to create a Linear Pattern constraint it's necessary to specify a geometric object called a Sample. This object defines the starting point of the guide line of the Linear Pattern. Thus, Sample always remains stationary relative to any translations, rotations and deformations in the coordinate system of the Linear Pattern guide line. The position of any object (called a Copy) to be added to the pattern is determined by its position on the guide line with the origin coinciding with the origin of the LCS of the Sample.
[in]  gSys   System of constraints. 
[in]  g1   Descriptor of the sample. 
[in]  g2   Descriptor of the direction axis of the Linear Pattern. 
[in]  align   Option of alignment of a sample g1 relative to the direction axis. If the option GCM_ALIGN_WITH_AXIAL_GEOM is given the sample g1 will be coincident with the direction line(axis). 
GCM_pattern GCM_AddAngularPattern  (  GCM_system  gSys, 
GCM_geom  g1,  
GCM_geom  g2,  
GCM_alignment  align = GCM_NO_ALIGNMENT 

) 
The Angular Pattern constraint defines the law under which geometric objects added to this pattern using GCM_AddGeomToPattern function are located on the given circle. This circle lies in a plane that is perpendicular to the given axis, and the center of this circle lies on this axis. In addition to the axis to create an Angular Pattern constraint it's necessary to specify a geometric object called a Sample. This object defines the zero angle and the initial radius of the circle for the Angular Pattern. The position of any object (called a Copy) to be added to the pattern is determined by the rotation around the given axis, starting from the Sample. The radius of the circle (the distance from the Copy or the Sample to the axis) is not constant and can vary in the process of solving the system of equations.
[in]  gSys   System of constraints. 
[in]  g1   Descriptor of the sample. 
[in]  g2   Descriptor of the rotation axis of the Angular Pattern. 
[in]  align   Option of alignment of a sample relative to the direction axis. If the GCM_ALIGN_WITH_AXIAL_GEOM option is specified sample g1 will lie in the XY plane of the direction axis object (rotation axis) and if the direction axis object has a radius (for example, this is a circle) the distance from the Angle Pattern objects to the rotation axis will be equal to the radius of the direction axis object (for example, radius of a circle). 
GCM_constraint GCM_AddGeomToPattern  (  GCM_system  gSys, 
GCM_pattern  ptrn,  
GCM_geom  geom,  
double  position,  
GCM_alignment  align = GCM_NO_ALIGNMENT , 

GCM_scale  scale = GCM_RIGID 

) 
Let's call a Copy the object that is added to the pattern. If the Copy is added to the Linear Pattern it's necessary to specify the distance from the Copy to the Sample. It can be positive or negative and is determined by the required position of the Copy relative to the Sample taking into account the guide axis. It's optionally possible to specify alignment of the Copy LCS relative to the Sample LCS. If the Copy is added to the Angular Pattern it's necessary to specify the angle of rotation of the Copy relative to the Sample around the pattern rotation axis. It's optionally possible to specify alignment of the Copy relative to the Sample. There are 2 types of alignment: GCM_ALIGNED  alignment of the local coordinate systems of the Copy and the Sample, GCM_ROTATED  the alignment of the local coordinate system of the Copy with the local coordinate system of the Sample that is rotated around the axis of rotation at the same angle as the Copy. The distance (or angle of rotation) from the sample to the copy is fixed by default, but can be varied by specifying the appropriate GCM_scale option.
[in]  gSys   System of constraints. 
[in]  ptrn   Descriptor of the pattern. 
[in]  geom   Descriptor of the copy. 
[in]  position   Variable that specifies the position of the copy in the pattern (distance or angle). 
[in]  align   Option that specifies the alignment of copy relative to the sample. 
[in]  scale   Scaling type of pattern element. 
GCM_constraint GCM_AddConstraint  (  GCM_system  gSys, 
const GCM_c_record &  cRec  
) 
[in]  gSys   System of constraints. 
[in]  cRec   Uniform record of a constraint. 
This function is used only for the automated testing of the solver therefore not documented.
void GCM_RemoveConstraint  (  GCM_system  gSys, 
GCM_constraint  con  
) 
[in]  gSys   System of constraints. 
[in]  con   Descriptor of constraint. 
void GCM_FixGeom  (  GCM_system  gSys, 
GCM_geom  g  
) 
[in]  gSys   System of constraints. 
[in]  g   Descriptors of geometric object. 
Thе function makes the object fixed depriving it of all degrees of freedom. If the geometric object is a sub geom of a solid (cluster), the object is frozen only in the framework of the cluster, but in the global coordinate system the object has the same freedom as the cluster to which it belongs.
void GCM_FreeGeom  (  GCM_system  gSys, 
GCM_geom  g  
) 
bool GCM_IsFixed  (  GCM_system  gSys, 
GCM_geom  g  
) 
GCM_result GCM_Evaluate  (  GCM_system  gSys  ) 
[in]  gSys   System of constraints. 
The function solves problem of constraints. The problem of constraint is formulated by API functions of geometric solver; the functions of a kind GCM_Add_XXXXXXX add a new object, the functions of kinds GCM_Change_XXXXXXX and GCM_Set_XXXXXXX change a state of objects. Thus, for all changes to take effect it is necessary to call the method GCM_Evaluate.
The algorithms GCM_Evaluate take into account whether constraint systems are satisfied, if all constraints have been already solved, then the function does not spend time for calculations, and the state of geometric objects remains unchanged.
GCM_result GCM_EvaluationResult  (  GCM_system  gSys, 
GCM_constraint  cItem  
) 
[in]  gSys   System of constraints. 
[in]  cItem   Descriptor of constraint belonging to the system gSys. 
bool GCM_IsSatisfied  (  GCM_system  gSys, 
GCM_constraint  cItem  
) 
[in]  gSys   System of constraints. 
[in]  cItem   Descriptor of constraint. 
GCM_result GCM_ChangeDrivingDimension  (  GCM_system  gSys, 
GCM_constraint  dItem,  
double  dVal  
) 
[in]  gSys   System of constraints. 
[in]  dItem   Descriptor of dimensional constraint. 
[in]  dVal   Required value of constraint. 
The function is used only for driving dimensions. If the driving dimension is angular, then the parameter dVal is specified in radians.
It should be noted that the function doesn't perform computations but only prepares the changing of dimension. For the changes to take effect it is required to call the function GCM_Evaluate.
void GCM_SetPlacement  (  GCM_system  gSys, 
GCM_geom  g,  
const MbPlacement3D &  place  
) 
GCM_result GCM_PrepareReposition  (  GCM_system  gSys, 
GCM_geom  movGeom,  
const MbPlacement3D &  projPlane,  
const MbCartPoint3D &  curPnt  
) 
[in]  gSys   System of constraints. 
[in]  movGeom   Component, part which is manipulated. 
[in]  projPlane   Plane of the screen given in the WCS of assembly. 
[in]  curPnt   Point of the component which is projected onto plane of the screen to cursor position and is 'dragging'. curPnt given in the LCS of the geometric object movGeom; 
The function runs once to start the dragging mode of components, which is controlled (by movement of the mouse) by the command GCM_SolveReposition(GCM_system, const MbCartPoint3D &). Mode is stopped by the calling any other command except GCM_PrepareReposition. There is also the special function to exit from the dragging mode explicitly  GCM_FinishReposition.
GCM_result GCM_SolveReposition  (  GCM_system  gSys, 
GCM_geom  g,  
const MbPlacement3D &  newPos,  
MtRepositionMode  movType  
) 
[in]  gSys   System of constraints. 
[in]  g   Solid, the position of which is changed. 
[in]  newPos   New position of a solid. 
[in]  movType   Code of the desired behavior 
GCM_result GCM_SolveReposition  (  GCM_system  gSys, 
const MbCartPoint3D &  curXYZ  
) 
[in]  gSys   System of constraints. 
[in]  curXYZ   Current position of a cursor in the WCS. 
Procedure that controls dragging mode which are stopped after calling any other command.
GCM_result GCM_SolveReposition  (  GCM_system  gSys, 
double  alpha  
) 
[in]  gSys   System of constraints. 
[in]  alpha   Driving parameter (this is ussualy an angle given in radians). 
This function controls reposition mode, in which the position of the solid is controlled by changing one coordinate. For example the angle of rotation around an axis. Mode is stopped by calling GCM_FinishReposition or any other command, which is changes state of the Solver, for example GCM_AddConstraint. This function is faster than the GCM_Evaluate or GCM_SolveReposition(GCM_system, GCM_geom, const MbPlacement3D &, MtRepositionMode) for large systems.
bool GCM_SetJournal  (  GCM_system  gSys, 
const char *  fName  
) 
[in]  gSys   System of constraints. 
[in]  fName   Name of destination file with a full path. 