C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
+ Collaboration diagram for Basic functions and data types:

Classes

struct  GCM_vec3d
 Coordinates of 3D-vector. More...
 
struct  GCM_point
 Coordinates of point in three-dimensional space. More...
 
struct  GCM_interval
 The range of allowable values for a linear or angular interval dimension. More...
 
struct  GCM_g_record
 Structure of data fields representing a geometric object. More...
 
struct  GCM_dof_record
 Detailed info about geometric degree of freedom. More...
 
struct  GCM_extra_param
 Additional parameter for functions of type #GCM_dependent_func. More...
 

Typedefs

typedef bool(* GCM_abort) ()
 Query to interrupt calculations.
 
typedef struct MtSystemHolder * GCM_system
 System of geometric constraints.
 
typedef MtObjectId GCM_object
 Descriptor of geometrical object registered in the constraint system.
 
typedef GCM_object GCM_geom
 Descriptor of geometrical object registered in the constraint system.
 
typedef GCM_object GCM_var
 Descriptor of numeric variable registered in the constraint system.
 
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 GCM_dependent_func GCM_dependent_geom_func
 Alternative typename of #GCM_dependent_func.
 

Enumerations

enum  GCM_argument_type {
  GCM_ARG_UNDEFINED = 0 , GCM_ARG_INTERVAL , GCM_ARG_DESCRIPTOR , GCM_ARG_NUMBER ,
  GCM_ARG_ENUM
}
 Dictionary of geometric argument types. More...
 
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_AXIS , 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_TRANSMITTION = 9 , GCM_CAM_MECHANISM = 10 , GCM_SYMMETRIC = 11 , GCM_DEPENDENT = 14 ,
  GCM_PATTERNED = 15 , GCM_LINEAR_PATTERN = 16 , GCM_ANGULAR_PATTERN = 17 , GCM_CS_PATTERN = 19 ,
  GCM_PATTERN_COORDINATE = 20 , GCM_RADIUS = 18 , GCM_LAST_CTYPE = 100 , GCM_IN_PLACE = 7
}
 Dictionary of constraint types. More...
 
enum  GCM_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_InconsistentAlignment = 3003 , GCM_RESULT_Duplicated , GCM_RESULT_CyclicDependence ,
  GCM_RESULT_MultiDependedGeom , GCM_RESULT_OverconstrainingDependedGeoms , GCM_RESULT_DependedGeomCantBeFixed , GCM_RESULT_InvalidArguments ,
  GCM_RESULT_UnsupportedTangencyChoice , GCM_RESULT_InconsistentTangencyChoice , GCM_RESULT_CoaxialGearTransmissionUnsupported , GCM_RESULT_OverconstrainedCamMechanism ,
  GCM_RESULT_CamMechanismsInCyclicDependency , GCM_RESULT_InconsistentFollowerAxis , GCM_RESULT_InconsistentPlanarAngle , GCM_RESULT_UnsupportedFollowerSurface ,
  GCM_RESULT_ItsNotDrivingDimension , GCM_RESULT_IncorrectDimensionInterval , GCM_RESULT_Unregistered , GCM_RESULT_InternalError ,
  GCM_RESULT_ImmutableData , GCM_RESULT_Aborted , GCM_RESULT_Last_
}
 Diagnostic codes of 3D-solver. More...
 
enum  GCM_dependency { GCM_NO_DEPENDENCY = 0 , GCM_1ST_DEPENDENT = 2 , GCM_2ND_DEPENDENT = 1 }
 Code denotes what kind of dependency there is between arguments of constraint. More...
 
enum  GCM_scale { }
 The type of relationship between elements in the pattern. More...
 
enum  GCM_coord_name {
  GCM_X_CRD = 1 , GCM_Y_CRD = 2 , GCM_Z_CRD = 3 , GCM_RADIAL_CRD = 4 ,
  GCM_AZIMUTH_CRD = 5 , GCM_POLAR_CRD = 6 , GCM_NULL_CRD = 1000
}
 
enum  GCM_reposition {
  GCM_REPOSITION_FreeRotation , GCM_REPOSITION_FreeMoving , GCM_REPOSITION_Dragging , GCM_REPOSITION_Rotation ,
  GCM_REPOSITION_Transfer
}
 Mode of the behavior when manipulating the undeconstrained system. More...
 
enum  GCM_dof_result { GCM_DOF_RESULT_WellDefined , GCM_DOF_RESULT_UnderDefined , GCM_DOF_RESULT_Unknown }
 Resulting code of the geometric degree of freedom computation. More...
 
enum  GCM_g_status { }
 Status code of geometric object. More...
 

Functions

GCM_system GCM_CreateSystem ()
 Create a simple constraint system.
More...
 
void GCM_ClearSystem (GCM_system gSys)
 Make the constraint system empty. More...
 
void GCM_RemoveSystem (GCM_system gSys)
 Delete system of constraints.
More...
 
bool GCM_ReadSystem (GCM_system gSys, reader &in)
 Read constraint system from stream. More...
 
bool GCM_WriteSystem (GCM_system gSys, writer &out)
 Write constraint system to stream. More...
 
void GCM_SetCallback (GCM_system gSys, GCM_abort cbFunc)
 Set a callback to interrupt the calculations. More...
 
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 &centre, const MbVector3D &axis, double radiusA, double radiusB)
 Get data record of cone for the given set of parameters. More...
 
GCM_g_record GCM_Cylinder (const MbCartPoint3D &centre, const MbVector3D &axis, double radius)
 Get data record of cylinder for the given set of parameters. More...
 
GCM_g_record GCM_Circle (const MbCartPoint3D &centre, const MbVector3D &axis, double radius)
 Get record of circle specified by the set of parameters. More...
 
GCM_g_record GCM_Torus (const MbCartPoint3D &centre, const MbVector3D &axis, double majorR, double minorR)
 Get data record of torus for the given set of parameters. More...
 
GCM_g_record GCM_Sphere (const MbCartPoint3D &centre, double radius)
 Get data record of sphere specified by center and radius. More...
 
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, Z-axis and X-axis. More...
 
GCM_g_record GCM_SolidLCS (const MbPlacement3D &)
 Get a data record of the solid coordinate system by its placement. More...
 
GCM_geom GCM_AddPoint (GCM_system gSys, const MbCartPoint3D &pVal)
 Add point to the constraint system. More...
 
GCM_geom GCM_AddGeom (GCM_system gSys, const GCM_g_record &gRec)
 Add geometric object to the constraint system. More...
 
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. More...
 
GCM_geom GCM_SubGeom (GCM_system gSys, GCM_geom sol, const GCM_g_record &gRec)
 Include a geometric sub-object to the subsystem of a solid (rigid cluster). More...
 
GCM_geom GCM_Parent (GCM_system gSys, GCM_geom subGeom)
 Give a cluster (solid) in which a geometric object is included. More...
 
GCM_g_type GCM_GeomType (GCM_system gSys, GCM_geom g)
 A type of geometric object. More...
 
void GCM_RemoveGeom (GCM_system gSys, GCM_geom g)
 Delete a geometric object from the constraint system. More...
 
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)
 Returns true if the object is still valid. More...
 
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. More...
 
GCM_constraint GCM_AddDistance (GCM_system gSys, GCM_geom g1, GCM_geom g2, const GCM_interval &iVal, GCM_alignment aVal=GCM_CLOSEST)
 Set a constraint that specifies the allowed distance interval between a pair of geometric objects. More...
 
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. More...
 
GCM_constraint GCM_AddAngle (GCM_system gSys, GCM_geom g1, GCM_geom g2, GCM_geom axis, GCM_interval iVal)
 Set a constraint that specifies the allowed angle interval between a pair of geometric objects. More...
 
GCM_constraint GCM_FixRadius (GCM_system gSys, GCM_geom g1)
 To create a constraint which specifies a radius of geometric objects. More...
 
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. More...
 
GCM_pattern GCM_AddLinearPattern (GCM_system gSys, GCM_geom g1, GCM_geom g2, GCM_alignment align=GCM_NO_ALIGNMENT)
 Create a linear pattern constraint. More...
 
GCM_pattern GCM_AddAngularPattern (GCM_system gSys, GCM_geom smp, GCM_geom axial, GCM_alignment align=GCM_NO_ALIGNMENT)
 Create an angular pattern constraint. More...
 
GCM_pattern GCM_AddCoordSystemPattern (GCM_system gSys, GCM_geom sample, GCM_geom origin)
 Create an coordinate of the coordiёnate system pattern constraint. More...
 
GCM_pattern GCM_SubPattern (GCM_system gSys, GCM_pattern csPattern, GCM_coord_name crd, GCM_geom controlObj)
 Create the constraint coordinate of the coordinate system pattern. More...
 
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. More...
 
GCM_constraint GCM_AddConstraint (GCM_system gSys, const GCM_c_record &cRec)
 Set a constraint. More...
 
void GCM_RemoveConstraint (GCM_system gSys, GCM_constraint con)
 Delete a constraint from the system. More...
 
bool GCM_FreezeGeom (GCM_system gSys, GCM_geom g)
 Set a geometric object fixed. More...
 
void GCM_FreeGeom (GCM_system gSys, GCM_geom g)
 Set free geometric object fixed by GCM_FreezeGeom call. More...
 
GCM_result GCM_Evaluate (GCM_system gSys)
 Calculate the constraint system. More...
 
GCM_result GCM_EvaluationResult (GCM_system gSys, GCM_constraint cItem)
 Get result code of the evaluation of constraint. More...
 
bool GCM_IsSatisfied (GCM_system gSys, GCM_constraint cItem)
 Perform a check that a constraint is satisfied. More...
 
GCM_dof_result GCM_IsWellDefined (GCM_system gSys, GCM_geom g)
 Whether the geometric entity is fully defined or underdefined. More...
 
MbPlacement3D GCM_Placement (GCM_system gSys, GCM_geom g)
 Get current placement (solution) of the geometric object.
 
MbCartPoint3D GCM_Origin (GCM_system gSys, GCM_geom g)
 Get an LCS origin of the geometric object. More...
 
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. More...
 
void GCM_SetPlacement (GCM_system gSys, GCM_geom g, const MbPlacement3D &place)
 Set current placement of the geometric object. More...
 
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. More...
 
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, GCM_reposition movType)
 Solve the system for an arbitrary change of position of one solid. More...
 
GCM_result GCM_SolveReposition (GCM_system gSys, const MbCartPoint3D &curPos)
 Solve the system of constraints for new position of cursor in the dragging mode. More...
 
GCM_result GCM_SolveReposition (GCM_system gSys, double alpha)
 Solve the system under one-parametric driving in the dragging mode. More...
 
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. More...
 
GCM_journal GCM_SubscribeJournal (GCM_system gSys, GCM_log_func logFunc, GCM_extra_param extParam)
 Get a logger that recording API calls, as well as other events related to interaction with the solver. More...
 

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.
 

Detailed Description

Enumeration Type Documentation

◆ GCM_argument_type

Dictionary of geometric argument types.

Enumerator
GCM_ARG_UNDEFINED 

Undefined argument.

GCM_ARG_INTERVAL 

Interval number.

GCM_ARG_DESCRIPTOR 

Descriptor of variable or geometric object.

GCM_ARG_NUMBER 

A floating point number.

GCM_ARG_ENUM 

Value of some enumeration type variable.

◆ GCM_g_type

enum GCM_g_type

Dictionary of geometric primitives types.

Enumerator
GCM_NULL_GTYPE 

Empty geometric object.

GCM_POINT 

Point.

GCM_LINE 

Line.

GCM_PLANE 

Plane.

GCM_CYLINDER 

Cylinder.

GCM_CONE 

Cone.

GCM_SPHERE 

Spherical surface.

GCM_TORUS 

Toroidal surface.

GCM_CIRCLE 

Circle.

GCM_LCS 

Coordinate system.

GCM_MARKER 

Point and pair of orthonormalized vectors.

GCM_SPLINE 

Spline curve.

◆ GCM_c_type

enum GCM_c_type

Dictionary of constraint types.

Note
Values of this enum can be used for permanent storage and will be kept in the future versions.
Enumerator
GCM_UNKNOWN 

Unknown type.

GCM_COINCIDENT 

Coincidence of loci.

GCM_PARALLEL 

Parallelism of two objects which have a direction vector.

GCM_PERPENDICULAR 

Perpendicularity of two objects which have a direction vector.

GCM_TANGENT 

Tangency of two objects, surfaces and curves.

GCM_CONCENTRIC 

Concentricity of two objects having a center or an axis.

GCM_DISTANCE 

Linear dimension between objects.

GCM_ANGLE 

Angular dimension between directed objects (vectors).

GCM_TRANSMITTION 

Mechanical transmission.

GCM_CAM_MECHANISM 

Cam mechanism.

GCM_SYMMETRIC 

Symmetry.

GCM_DEPENDENT 

Dependent object.

GCM_PATTERNED 

Patterned object.

GCM_LINEAR_PATTERN 

Linear pattern.

GCM_ANGULAR_PATTERN 

Angular pattern.

GCM_CS_PATTERN 

Coordinate System pattern.

GCM_PATTERN_COORDINATE 

Coordinate of the Coordinate System patten.

GCM_RADIUS 

Radial dimension.

◆ GCM_alignment

Variants of alignment.

Note
Values of this enum can be used for permanent storage and will be kept in the future versions.
Enumerator
GCM_OPPOSITE 

Anti-align the directions.

GCM_CLOSEST 

Orientation according to the nearest solution.

GCM_COORIENTED 

Cooriented directions.

GCM_NO_ALIGNMENT 

No defined orientation.

GCM_ALIGNED 

Axis aligned local coordinate systems.

GCM_ROTATED 

Ротационное (вращательной) выравнивание элементов паттерна.

GCM_ALIGN_WITH_AXIAL_GEOM 

Выровнять с объектом, задающим ось.

◆ GCM_angle_type

Variant of angular dimension.

Note
Values of this enum can be used for permanent storing of app data and will be kept in the future versions.
Enumerator
GCM_NONE_ANGLE 

Undefined.

GCM_2D_ANGLE 

Angle of planar joints (0 .. 360 degrees)

GCM_3D_ANGLE 

Angle in space (0 .. 180 degrees)

◆ GCM_tan_choice

Variants of tangency of surfaces or curves.

Note
Values of this enum can be used for permanent storage of app data and will be kept in the future versions.
Enumerator
GCM_TAN_NONE 

Not chosen.

GCM_TAN_POINT 

Tangency in general case (contact at a point).

GCM_TAN_LINE 

Tangency by a generating line (for instance, two cylinders with parallel axes).

GCM_TAN_CIRCLE 

Tangency by a circle (for instance, a sphere inside a cone).

◆ GCM_result

enum GCM_result

Diagnostic codes of 3D-solver.

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.

Note
Values of this enum can be used for permanent storage of app data and will be kept in the future versions.
Enumerator
GCM_RESULT_None 

Code of undefined result or status.

GCM_RESULT_Ok 

The successful result of GCM API call.

GCM_RESULT_Satisfied 

Constraint or system of constraints are fulfilled.

GCM_RESULT_Overconstrained 

Constraint is redundant and contradicts the other conditions.

GCM_RESULT_MatedFixation 

Constraints are specified for pair of fixed objects.

GCM_RESULT_DraggingFailed 

Failed attempt to move a fixed object (as the object rigidly connected with fixed).

GCM_RESULT_Not_Satisfied 

Constraint(s) has not been solved (for unknown reasons).

GCM_RESULT_Unsolvable 

Constraint(s) is not solvable.

GCM_RESULT_DependentConstraintUnsolved 

The GCM_DEPENDENT constraint is not solved or its independent arguments are out of the solution domain.

Note
The situation GCM_RESULT_DependentConstraintUnsolved occurs when the GCM_dependent_func function returns false.
GCM_RESULT_Error 

Unknown error is usually not related to the solving.

GCM_RESULT_InappropriateAlignment 

The alignment option is inappropriate to a given constraint type.

GCM_RESULT_InappropriateArgument 

Geometric type of an argument is inappropriate to the constraint.

GCM_RESULT_IncompatibleArguments 

Inconsistent types of constraint arguments.

GCM_RESULT_InconsistentAlignment 

The orientation value is inconsistent with other mates.

GCM_RESULT_Duplicated 

Constraint duplicates another.

GCM_RESULT_CyclicDependence 

Unsolvable cyclic dependence.

GCM_RESULT_MultiDependedGeom 

A geometric object is dependent on two or more constraints of 'GCM_DEPENDED' type.

GCM_RESULT_OverconstrainingDependedGeoms 

A redundancy constraint between depended geoms.

GCM_RESULT_DependedGeomCantBeFixed 

The depended argument of 'GCM_DEPENDED' can't be fixed.

GCM_RESULT_InvalidArguments 

Constraint has invalid or undefined (void) arguments.

GCM_RESULT_UnsupportedTangencyChoice 

For mate the option of tangency choice by circle or generating curve is unsupported.

GCM_RESULT_InconsistentTangencyChoice 

For a given pair of surfaces the touching along the circle is geometrically impossible.

GCM_RESULT_CoaxialGearTransmissionUnsupported 

Mechanical transmission of components rotation with the same axis is not supported.

GCM_RESULT_OverconstrainedCamMechanism 

There are constraints creating dependence of the follower displacement from the cam in addition to the cam mechanism.

GCM_RESULT_CamMechanismsInCyclicDependency 

Given the cyclic dependence for two or more cam mechanisms.

GCM_RESULT_InconsistentFollowerAxis 

Given constraints for the follwer doesn't correspond to its motion axis.

GCM_RESULT_InconsistentPlanarAngle 

Planar angle conditions are not met (vectors from the sides of angle should be perpendicular to the axis).

GCM_RESULT_UnsupportedFollowerSurface 

The follower contact surface selected for the cam-follower kinematic pair is not yet supported by the solver.

GCM_RESULT_ItsNotDrivingDimension 

Given constraint should be a driving dimension.

GCM_RESULT_IncorrectDimensionInterval 

Incorrect interval for interval dimension constraint.

GCM_RESULT_Unregistered 

Access to invalid object.

GCM_RESULT_Aborted 

The evaluation process aborted by the application.

◆ GCM_dependency

Code denotes what kind of dependency there is between arguments of constraint.

Enumerator
GCM_NO_DEPENDENCY 

It means no one-directed dependency.

GCM_1ST_DEPENDENT 

The first argument is dependent on the others.

GCM_2ND_DEPENDENT 

The second argument is dependent on the others.

◆ GCM_scale

enum GCM_scale

The type of relationship between elements in the pattern.

Enumerator
GCM_RIGID 

Distance between elements is constant. The pattern is not scaled.

GCM_LINEAR_SCALE 

Distance between elements is linearly scaled when stretching.

◆ GCM_coord_name

Enumerator
GCM_X_CRD 

Cartesian or affine X coordinate.

GCM_Y_CRD 

Cartesian or affine Y coordinate.

GCM_Z_CRD 

Cartesian or affine Z coordinate.

GCM_RADIAL_CRD 

Radial distance.

GCM_AZIMUTH_CRD 

Azimuth angle.

GCM_POLAR_CRD 

Polar angle.

◆ GCM_reposition

Mode of the behavior when manipulating the undeconstrained system.

Enumerator
GCM_REPOSITION_FreeRotation 

Arbitrary reposition with predominant rotation.

GCM_REPOSITION_FreeMoving 

Arbitrary reposition with predominant moving.

GCM_REPOSITION_Dragging 

Dragging in the plane of the screen.

GCM_REPOSITION_Rotation 

Rotation around fixed axis.

GCM_REPOSITION_Transfer 

Shift only one solid.

Note
This mode GCM_REPOSITION_Transfer have been intended for insertion processes of a new solid in the CAD assembly.

◆ GCM_dof_result

Resulting code of the geometric degree of freedom computation.

Attention
Internal use only. The feature is under development.
Enumerator
GCM_DOF_RESULT_WellDefined 

An geometric object is well defined, fixed or frozen (dof=0).

GCM_DOF_RESULT_UnderDefined 

An geometric object has translational or rotational freedom (dof>0).

GCM_DOF_RESULT_Unknown 

The geometric object state of freedom is not calculated.

◆ GCM_g_status

Status code of geometric object.

Note
Internal use only. The feature is under development.
Enumerator
GCM_G_STATUS_WellDefined 

A state in which all constraints and dimensions that define an object have been fullfilled so that all of the degrees of freedom are eliminated.

GCM_G_STATUS_Unknown 

The geomeric status is undefined.

Function Documentation

◆ GCM_CreateSystem()

GCM_system GCM_CreateSystem ( )

Create a simple constraint system.

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.

Returns
Descriptor of constraint system.

◆ GCM_ClearSystem()

void GCM_ClearSystem ( GCM_system  gSys)

Make the constraint system empty.

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.

Parameters
[in]gSys- System of constraints.
See also
GCM_RemoveSystem

◆ GCM_RemoveSystem()

void GCM_RemoveSystem ( GCM_system  gSys)

Delete system of constraints.

This method makes the constraint system invalid. Deallocation of RAM from the internal data structures maintaining the system of constraints is performed.

Parameters
[in]gSys- System of constraints.
See also
GCM_ClearSystem

◆ GCM_ReadSystem()

bool GCM_ReadSystem ( GCM_system  gSys,
reader in 
)

Read constraint system from stream.

Parameters
[in]gSys- System of constraints.
[in]in- Stream for reading.

◆ GCM_WriteSystem()

bool GCM_WriteSystem ( GCM_system  gSys,
writer out 
)

Write constraint system to stream.

Parameters
[in]gSys- System of constraints.
[in]out- Stream for writing.

◆ GCM_SetCallback()

void GCM_SetCallback ( GCM_system  gSys,
GCM_abort  cbFunc 
)

Set a callback to interrupt the calculations.

Parameters
[in]gSys- System of constraints.
[in]cbFunc- A callback to interrupt the calculation.

◆ GCM_Cone()

GCM_g_record GCM_Cone ( const MbCartPoint3D centre,
const MbVector3D axis,
double  radiusA,
double  radiusB 
)

Get data record of cone for the given set of parameters.

Parameters
[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).
Returns
Record of cone.

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 cross-section.

◆ GCM_Cylinder()

GCM_g_record GCM_Cylinder ( const MbCartPoint3D centre,
const MbVector3D axis,
double  radius 
)

Get data record of cylinder for the given set of parameters.

Parameters
[in]centre- Center of base circle of the cylinder.
[in]axis- Direction vector of the cylinder axis.
[in]radius- Radius of the base circle.
Returns
Record of cylinder.

◆ GCM_Circle()

GCM_g_record GCM_Circle ( const MbCartPoint3D centre,
const MbVector3D axis,
double  radius 
)

Get record of circle specified by the set of parameters.

Parameters
[in]centre- Center of the circle.
[in]axis- Direction vector of the circle axis.
[in]radius- Radius of the circle.
Returns
Data record of the circle.

◆ GCM_Torus()

GCM_g_record GCM_Torus ( const MbCartPoint3D centre,
const MbVector3D axis,
double  majorR,
double  minorR 
)

Get data record of torus for the given set of parameters.

Parameters
[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_Sphere()

GCM_g_record GCM_Sphere ( const MbCartPoint3D centre,
double  radius 
)

Get data record of sphere specified by center and radius.

Parameters
[in]centre- Center of the sphere.
[in]radius- Radius of the sphere.
Returns
Data record of the sphere.

◆ GCM_SolidLCS() [1/2]

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, Z-axis and X-axis.

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_SolidLCS() [2/2]

GCM_g_record GCM_SolidLCS ( const MbPlacement3D )

Get a data record of the solid coordinate system by its placement.

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_AddPoint()

GCM_geom GCM_AddPoint ( GCM_system  gSys,
const MbCartPoint3D pVal 
)

Add point to the constraint system.

Parameters
[in]gSys- System of constraints.
[in]pVal- Coordinates of a point.
Returns
Descriptor of registered point.

◆ GCM_AddGeom() [1/2]

GCM_geom GCM_AddGeom ( GCM_system  gSys,
const GCM_g_record gRec 
)

Add geometric object to the constraint system.

Parameters
[in]gSys- System of constraints.
[in]gRec- Record of geometric record.
Returns
Descriptor of registered object.

◆ GCM_AddGeom() [2/2]

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.

Parameters
[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.
Returns
Descriptor of registered object.

◆ GCM_SubGeom()

GCM_geom GCM_SubGeom ( GCM_system  gSys,
GCM_geom  sol,
const GCM_g_record gRec 
)

Include a geometric sub-object to the subsystem of a solid (rigid cluster).

Parameters
[in]gSys- System of constraints.
[in]sol- Solid or rigid cluster.
[in]gRec- Record of geometric sub-object, which is given in LCS of the solid.
Returns
Descriptor of sub-object in subset of the solid.

◆ GCM_Parent()

GCM_geom GCM_Parent ( GCM_system  gSys,
GCM_geom  subGeom 
)

Give a cluster (solid) in which a geometric object is included.

Parameters
[in]gSys- System of constraints.
[in]subGeom- A geometric object belonging to the cluster..
Returns
Descriptor of the cluster that owns this geometric object.

◆ GCM_GeomType()

GCM_g_type GCM_GeomType ( GCM_system  gSys,
GCM_geom  g 
)

A type of geometric object.

Parameters
[in]gSys- System of constraints.
[in]g- Descriptor of geometric object
Returns
Geometric type of an object.

◆ GCM_RemoveGeom()

void GCM_RemoveGeom ( GCM_system  gSys,
GCM_geom  g 
)

Delete a geometric object from the constraint system.

Parameters
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_AddBinConstraint()

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 
)

Returns true if the object is still valid.

Set a binary constraint for two geometric objects.

Parameters
[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'.
Returns
Descriptor of a new constraint.

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_AddDistance() [1/2]

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.

Parameters
[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.
Returns
Descriptor of the created constraint of type GCM_DISTANCE.

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.

Note
Value of dVal can be positive as well as negative for oriented objects.

◆ GCM_AddDistance() [2/2]

GCM_constraint GCM_AddDistance ( GCM_system  gSys,
GCM_geom  g1,
GCM_geom  g2,
const GCM_interval iVal,
GCM_alignment  aVal = GCM_CLOSEST 
)

Set a constraint that specifies the allowed distance interval between a pair of geometric objects.

Parameters
[in]gSys- System of constraints.
[in]g1- Descriptors of first object.
[in]g2- Descriptors of second object.
[in]iVal- The value of the allowed distance interval.
[in]aVal- Alignment option.
Returns
Descriptor of the created constraint of type GCM_DISTANCE.

The function creates a dimensional constraint of type GCM_DISTANCE, which specifies a linear interval dimension between two geometric objects. In a failed call, the function returns a handle to an empty object GCM_NULL.

Note
Value of iVal can be positive as well as negative for oriented objects. Setting the alignment option follows the same rules as for driving dimensions.

◆ GCM_AddAngle() [1/2]

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.

Parameters
[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).
Returns
Descriptor of the created constraint of type GCM_ANGLE.

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 ). A plane-line angle is measured from the plane regardless of the order of the arguments. In a failed call, the function returns a handle to an empty object GCM_NULL.

◆ GCM_AddAngle() [2/2]

GCM_constraint GCM_AddAngle ( GCM_system  gSys,
GCM_geom  g1,
GCM_geom  g2,
GCM_geom  axis,
GCM_interval  iVal 
)

Set a constraint that specifies the allowed angle interval between a pair of geometric objects.

Parameters
[in]gSys- System of constraints.
[in]g1- Descriptor of first object.
[in]g2- Descriptor of second object.
[in]axis- Descriptor of rotation axis (may be equal to GCM_NULL).
[in]iVal- The value of the allowed angle interval.
[in]aVal- Alignment option.
Returns
Descriptor of the created constraint of type GCM_ANGLE.

The function creates a dimensional constraint of type GCM_ANGLE, which specifies an angular interval dimension between two geometric objects. In a failed call, the function returns a handle to an empty object GCM_NULL.

Note
The length of the interval of allowable angles (iVal) cannot exceed 2*pi.

◆ GCM_FixRadius()

GCM_constraint GCM_FixRadius ( GCM_system  gSys,
GCM_geom  g1 
)

To create a constraint which specifies a radius of geometric objects.

Parameters
[in]gSys- System of constraints.
[in]g1- Descriptor of the first object which has nonzero radius.
Returns
Descriptor of the created constraint which has a type GCM_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_AddPlanarAngle()

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.

This is the same call GCM_AddAngle, but requires an axis, which defines a plane in which the angle is measured.

◆ GCM_AddLinearPattern()

GCM_pattern GCM_AddLinearPattern ( GCM_system  gSys,
GCM_geom  g1,
GCM_geom  g2,
GCM_alignment  align = GCM_NO_ALIGNMENT 
)

Create a linear pattern constraint.

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.

Removal procedure
To remove the Linear Pattern completely It's necessary to use the GCM_RemoveConstraint function. There is no need to remove constraints that were created by the addition of new Copies to the pattern using the function GCM_AddGeomToPattern. They will be deleted automatically.
Parameters
[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).
Returns
Descriptor of the created constraint which has a type GCM_LINEAR_PATTERN.

◆ GCM_AddAngularPattern()

GCM_pattern GCM_AddAngularPattern ( GCM_system  gSys,
GCM_geom  smp,
GCM_geom  axial,
GCM_alignment  align = GCM_NO_ALIGNMENT 
)

Create an angular pattern constraint.

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.

Removal procedure
To remove the Angular Pattern completely It's necessary to use the GCM_RemoveConstraint function. There is no need to remove constraints that were created by the addition of new Copies to the pattern using the function GCM_AddGeomToPattern. They will be deleted automatically.
Parameters
[in]gSys- System of constraints.
[in]smp- Descriptor of the sample.
[in]axial- 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).
Returns
Descriptor of the created constraint which has a type GCM_ANGULAR_PATTERN.

◆ GCM_AddCoordSystemPattern()

GCM_pattern GCM_AddCoordSystemPattern ( GCM_system  gSys,
GCM_geom  sample,
GCM_geom  origin 
)

Create an coordinate of the coordiёnate system pattern constraint.

brief Create the constraint the coordinate system pattern.

Parameters
[in]gSys- System of constraints.
[in]sample- Descriptor of the sample.
[in]origin- Descriptor of the origin of the Coordinate System Pattern. It is used to specify the position of the sample in the pattern space.
Returns
Descriptor of the created constraint which has a type GCM_CS_PATTERN.

◆ GCM_SubPattern()

GCM_pattern GCM_SubPattern ( GCM_system  gSys,
GCM_pattern  csPattern,
GCM_coord_name  crd,
GCM_geom  controlObj 
)

Create the constraint coordinate of the coordinate system pattern.

...

Parameters
[in]gSys- System of constraints.
[in]sample- Descriptor of the Coordinate System pattern.
[in]crd- Name of the adding coordinate of the Coordinate System pattern.
Returns
Descriptor of the created constraint which has a type GCM_PATTERN_COORDINATE.

◆ GCM_AddGeomToPattern()

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.

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.

Removal procedure
To remove a Copy from the pattern use the function GCM_RemoveConstraint. If it's necessary to remove the pattern completely there is no need to remove each copy from the pattern. Just remove the pattern constraint.
Parameters
[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.
Returns
Descriptor of the created constraint which has a type GCM_PATTERNED.

◆ GCM_AddConstraint()

GCM_constraint GCM_AddConstraint ( GCM_system  gSys,
const GCM_c_record cRec 
)

Set a constraint.

Parameters
[in]gSys- System of constraints.
[in]cRec- Uniform record of a constraint.
Returns
Descriptor of a new constraint.

This function is used only for the automated testing of the solver therefore not documented.

◆ GCM_RemoveConstraint()

void GCM_RemoveConstraint ( GCM_system  gSys,
GCM_constraint  con 
)

Delete a constraint from the system.

Parameters
[in]gSys- System of constraints.
[in]con- Descriptor of constraint.

◆ GCM_FreezeGeom()

bool GCM_FreezeGeom ( GCM_system  gSys,
GCM_geom  g 
)

Set a geometric object fixed.

Parameters
[in]gSys- System of constraints.
[in]g- Descriptors of geometric object.

The 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.

Note
In the future this function will be returning a descriptor of constraint, i.e. will create a fixing constraint.
See also
GCM_FreeGeom

◆ GCM_FreeGeom()

void GCM_FreeGeom ( GCM_system  gSys,
GCM_geom  g 
)

Set free geometric object fixed by GCM_FreezeGeom call.

See also
GCM_FreezeGeom

◆ GCM_Evaluate()

GCM_result GCM_Evaluate ( GCM_system  gSys)

Calculate the constraint system.

Parameters
[in]gSys- System of constraints.
Returns
Calculation result code.

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_EvaluationResult()

GCM_result GCM_EvaluationResult ( GCM_system  gSys,
GCM_constraint  cItem 
)

Get result code of the evaluation of constraint.

Parameters
[in]gSys- System of constraints.
[in]cItem- Descriptor of constraint belonging to the system gSys.
Note
If the system has not yet been evaluated then the function will return the code GCM_RESULT_None.
Returns
Diagnostic code stored in the system after the last call GCM_Evaluate.

◆ GCM_IsSatisfied()

bool GCM_IsSatisfied ( GCM_system  gSys,
GCM_constraint  cItem 
)

Perform a check that a constraint is satisfied.

Parameters
[in]gSys- System of constraints.
[in]cItem- Descriptor of constraint.
Returns
true if a constraint is satisfied.

◆ GCM_IsWellDefined()

GCM_dof_result GCM_IsWellDefined ( GCM_system  gSys,
GCM_geom  g 
)

Whether the geometric entity is fully defined or underdefined.

Returns
Returns GCM_DOF_RESULT_WellDefined, if the solver determines a geometric entity belongs to a well-defined part of the model.

◆ GCM_Origin()

MbCartPoint3D GCM_Origin ( GCM_system  gSys,
GCM_geom  g 
)

Get an LCS origin of the geometric object.

The function returns coordinates of the origin of the LCS. The call can be applied to any type of geometry. For example, for a circle the call will return its center, for a plane - it is a point laying on the plane, for a cylinder - it is a center of its foundation circle and so on.

◆ GCM_ChangeDrivingDimension()

GCM_result GCM_ChangeDrivingDimension ( GCM_system  gSys,
GCM_constraint  dItem,
double  dVal 
)

Change the value of driving dimension.

Parameters
[in]gSys- System of constraints.
[in]dItem- Descriptor of dimensional constraint.
[in]dVal- Required value of constraint.
Returns
Operation result code.

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.

◆ GCM_SetPlacement()

void GCM_SetPlacement ( GCM_system  gSys,
GCM_geom  g,
const MbPlacement3D place 
)

Set current placement of the geometric object.

Note
The function only impart new state of the object without the revaluation of constraints. Call GCM_Evaluate can change the given state to satisfy constraints of this object.

◆ GCM_PrepareReposition()

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.

Parameters
[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;
Returns
Result code.

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_SolveReposition() [1/3]

GCM_result GCM_SolveReposition ( GCM_system  gSys,
GCM_geom  g,
const MbPlacement3D newPos,
GCM_reposition  movType 
)

Solve the system for an arbitrary change of position of one solid.

Parameters
[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
Returns
Result code.
Note
This function doesn't allow to take out constraint system from decided state, except when before call of function the system was already unsolved. If new position 'newPos' doesn't allow to satisfy the system of constraints, then new position of solid will be the most nearest to newPos (while preserving solvability).

◆ GCM_SolveReposition() [2/3]

GCM_result GCM_SolveReposition ( GCM_system  gSys,
const MbCartPoint3D curPos 
)

Solve the system of constraints for new position of cursor in the dragging mode.

Parameters
[in]gSys- System of constraints.
[in]curPos- Current position of a cursor in the WCS.
Returns
Result code.

Procedure that controls dragging mode which are stopped after calling any other command.

◆ GCM_SolveReposition() [3/3]

GCM_result GCM_SolveReposition ( GCM_system  gSys,
double  alpha 
)

Solve the system under one-parametric driving in the dragging mode.

Parameters
[in]gSys- System of constraints.
[in]alpha- Driving parameter (this is ussualy an angle given in radians).
Returns
Result code.

This function controls dynamic reposition mode (see GCM_PrepareReposition), in which the position of the solid is driven 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.

◆ GCM_SetJournal()

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.

Parameters
[in]gSys- System of constraints.
[in]fName- Name of destination file with a full path.
Returns
true, if journaling has been successfully switched on.
Attention

The journal file will be written only when a session of work with the constraint system is finished, i.e. immediately after calling the GCM_RemoveSystem method. Adding records to the journal from parallel code does not occur.

◆ GCM_SubscribeJournal()

GCM_journal GCM_SubscribeJournal ( GCM_system  gSys,
GCM_log_func  logFunc,
GCM_extra_param  extParam 
)

Get a logger that recording API calls, as well as other events related to interaction with the solver.

Note
The call is used for testing purposes only. It may be changed or removed in future revisions.