C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
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. | |
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 ¢re, 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 ¢re, const MbVector3D &axis, double radius) |
Get data record of cylinder for the given set of parameters. More... | |
GCM_g_record | GCM_Circle (const MbCartPoint3D ¢re, const MbVector3D &axis, double radius) |
Get record of circle specified by the set of parameters. More... | |
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. More... | |
GCM_g_record | GCM_Sphere (const MbCartPoint3D ¢re, 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. | |
enum GCM_argument_type |
enum GCM_g_type |
Dictionary of geometric primitives types.
enum GCM_c_type |
Dictionary of constraint types.
enum GCM_alignment |
Variants of alignment.
enum GCM_angle_type |
enum GCM_tan_choice |
Variants of tangency of surfaces or curves.
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.
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.
|
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. |
enum GCM_dependency |
enum GCM_scale |
enum GCM_coord_name |
enum 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.
|
enum GCM_dof_result |
Resulting code of the geometric degree of freedom computation.
enum GCM_g_status |
Status code of geometric object.
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.
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.
[in] | gSys | - System of constraints. |
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.
[in] | gSys | - System of constraints. |
bool GCM_ReadSystem | ( | GCM_system | gSys, |
reader & | in | ||
) |
Read constraint system from stream.
[in] | gSys | - System of constraints. |
[in] | in | - Stream for reading. |
bool GCM_WriteSystem | ( | GCM_system | gSys, |
writer & | out | ||
) |
Write constraint system to stream.
[in] | gSys | - System of constraints. |
[in] | out | - Stream for writing. |
void GCM_SetCallback | ( | GCM_system | gSys, |
GCM_abort | cbFunc | ||
) |
Set a callback to interrupt the calculations.
[in] | gSys | - System of constraints. |
[in] | cbFunc | - A callback to interrupt the calculation. |
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.
[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 cross-section.
GCM_g_record GCM_Cylinder | ( | const MbCartPoint3D & | centre, |
const MbVector3D & | axis, | ||
double | radius | ||
) |
Get data record of cylinder for the given set of 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. |
GCM_g_record GCM_Circle | ( | const MbCartPoint3D & | centre, |
const MbVector3D & | axis, | ||
double | radius | ||
) |
Get record of circle specified by the set of parameters.
[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 | ||
) |
Get data record of torus for the given set of 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_g_record GCM_Sphere | ( | const MbCartPoint3D & | centre, |
double | radius | ||
) |
Get data record of sphere specified by center and 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 |
||
) |
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_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_geom GCM_AddPoint | ( | GCM_system | gSys, |
const MbCartPoint3D & | pVal | ||
) |
Add point to the constraint system.
[in] | gSys | - System of constraints. |
[in] | pVal | - Coordinates of a point. |
GCM_geom GCM_AddGeom | ( | GCM_system | gSys, |
const GCM_g_record & | gRec | ||
) |
Add geometric object to the constraint system.
[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 | ||
) |
Add geometric object to the constraint system.
[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 | ||
) |
Include a geometric sub-object to the subsystem of a solid (rigid cluster).
[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. |
GCM_geom GCM_Parent | ( | GCM_system | gSys, |
GCM_geom | subGeom | ||
) |
Give a cluster (solid) in which a geometric object is included.
[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 | ||
) |
A type of geometric object.
[in] | gSys | - System of constraints. |
[in] | g | - Descriptor of geometric object |
void GCM_RemoveGeom | ( | GCM_system | gSys, |
GCM_geom | g | ||
) |
Delete a geometric object from the constraint system.
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 |
||
) |
Returns true if the object is still valid.
Set a binary constraint for two geometric objects.
[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 |
||
) |
Set a constraint which specifies distance between a pair of geometric objects.
[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_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.
[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. |
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.
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.
[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 ). 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_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.
[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. |
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.
GCM_constraint GCM_FixRadius | ( | GCM_system | gSys, |
GCM_geom | g1 | ||
) |
To create a constraint which specifies a radius of geometric objects.
[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 | ||
) |
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_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.
[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 | 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.
[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). |
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.
[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. |
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.
...
[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. |
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.
[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 | ||
) |
Set a constraint.
[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 | ||
) |
Delete a constraint from the system.
[in] | gSys | - System of constraints. |
[in] | con | - Descriptor of constraint. |
bool GCM_FreezeGeom | ( | GCM_system | gSys, |
GCM_geom | g | ||
) |
Set a geometric object fixed.
[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.
void GCM_FreeGeom | ( | GCM_system | gSys, |
GCM_geom | g | ||
) |
Set free geometric object fixed by GCM_FreezeGeom call.
GCM_result GCM_Evaluate | ( | GCM_system | gSys | ) |
Calculate the constraint system.
[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 | ||
) |
Get result code of the evaluation of constraint.
[in] | gSys | - System of constraints. |
[in] | cItem | - Descriptor of constraint belonging to the system gSys. |
bool GCM_IsSatisfied | ( | GCM_system | gSys, |
GCM_constraint | cItem | ||
) |
Perform a check that a constraint is satisfied.
[in] | gSys | - System of constraints. |
[in] | cItem | - Descriptor of constraint. |
GCM_dof_result GCM_IsWellDefined | ( | GCM_system | gSys, |
GCM_geom | g | ||
) |
Whether the geometric entity is fully defined or underdefined.
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_result GCM_ChangeDrivingDimension | ( | GCM_system | gSys, |
GCM_constraint | dItem, | ||
double | dVal | ||
) |
Change the value of driving dimension.
[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 | ||
) |
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.
[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, | ||
GCM_reposition | movType | ||
) |
Solve the system for an arbitrary change of position of one solid.
[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 & | curPos | ||
) |
Solve the system of constraints for new position of cursor in the dragging mode.
[in] | gSys | - System of constraints. |
[in] | curPos | - 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 | ||
) |
Solve the system under one-parametric driving in the dragging mode.
[in] | gSys | - System of constraints. |
[in] | alpha | - Driving parameter (this is ussualy an angle given in radians). |
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.
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.
[in] | gSys | - System of constraints. |
[in] | fName | - Name of destination file with a full path. |
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.