C3D Kernel  104598
Classes | Functions
Auxiliary routines
Geometric Constraint Solver in Three-Dimensional Space
Collaboration diagram for Auxiliary routines:


struct  MtTransDof
 Record about the degree of freedom of movement. More...
struct  MtMateParameters
 Parameters of proximity to solution for geometric constraint. More...
struct  MtLDimensionTraits
 Characteristic data of linear dimension. More...
struct  MtADimensionTraits
 Characteristic data of angular dimension. More...


bool OK (GCM_result res)
GCM_result ResCode (bool ok)
GCM_result WorseResult (GCM_result res1, GCM_result res2)
 Select "the worst" result code.
GCM_resultoperator<< (GCM_result &sumRes, const GCM_result r)
 Summarize the resulting code.
SPtr< MtGeomSolverCreateSolver (ItPositionManager &pMan)
 Create interface of geometric solver.
MtMateType GetAutoMateType (const ItConstraintItem &cItem, bool forMove)
 Automatically assign the mate type for its arguments.
bool GetClosestParameters (const ItConstraintItem &cItem, MtMateParameters &cPars)
 Measure parameters of proximity to solution for geometric constraint.
bool GetDimensionTraits (const ItConstraintItem &dCon, MtLDimensionTraits &dPars)
 Determine the characteristic data of dimension.
bool GetDimensionTraits (const ItConstraintItem &dCon, MtADimensionTraits &dPars)
 Determine the characteristic data of angular dimension.
bool EstimateTangencyChoice (const ItConstraintItem &cItem, GCM_tan_choice tChoice)
 Whether it is possible to apply the variant of tangency to this constraint.
bool IsCompatibleMatingGeometry (const ItConstraintItem &cItem)
 Determine the compatibility of geometric objects to this constraint.
bool GCM_RelativePlacement (MbPlacement3D gPlaces[], size_t gPlacesSize, GCM_extra_param)
 Calculate "Relative placement".
bool GetMatingGeometry (const ItConstraintItem &cItem, int geomNb, bool inWCS, MtGeomType &gType, MbCartPoint3D &pc, MbVector3D &vec, double &r1, double &r2)
 Get the first or second geometric object of mate.
MtGeomVariant GCM_GeomArgument (const MbSpaceItem *, bool orient)
 Get a geometric object of type MtGeomVariant from geometry of type MbSpaceItem.
GCM_geom GCM_GeomId (GCM_system gSys, const ItGeom *gPtr)
 Get a geometric object of type GCM_geom from type of ItGeom *.
GCM_constraint GCM_ConstraintId (GCM_system gSys, const ItConstraintItem *cPtr)
 Get a geometric constraint of type GCM_constraint from type of ItConstraintItem *.
GCM_g_record GCM_GeomRecord (const MtGeomVariant &)
 Get the geometric record of the variant data type.
const ItConstraintItemGCM_ConstraintItem (GCM_system gSys, GCM_constraint conId)
 Get an interface object ItConstraintItem of geometric constraint by the descriptor.
const ItGeomGCM_SetDependencyGeom (GCM_system gSys, MtGeomId, const ItGeom *gPtr)
void GCM_GetProperties (const GCM_system &, MbProperties &)
ptrdiff_t VolumeOfAlignOption (const ItConstraintItem &)
 Determine the count of variants of alignment options for mate.

Function Documentation

GCM_result WorseResult ( GCM_result  res1,
GCM_result  res2 
) [inline]

The function selects from two error messages, something that needs attention before another error.

GCM_result& operator<< ( GCM_result sumRes,
const GCM_result  r 
) [inline]

The operator selects from stream of error messages, something that needs attention before anything else.

SPtr<MtGeomSolver> CreateSolver ( ItPositionManager pMan)

The function returns smart-pointer of solver Interface.

[in]pMan- Interface of the client application that provides functions of reposition of geometric objects on the client side.
smart-pointer to an instance of geometric solver.
MtMateType GetAutoMateType ( const ItConstraintItem cItem,
bool  forMove 
cItem[in]- Geometric constraint with unknown type: mct_Unknown (see #MtMateType).
forMove[in]- The evaluation method for solids with the behavior of moving or expression.
Type which should be assigned to this mate (see #MtMateType).

The unknown mate cItem of this feature is considered as a pair of objects of mate for which to select the most suitable variant for connection. For example: for the two cylinders it is coaxiality. The flag forMove helps to determine variant of connections to the most natural behavior in dynamic changing objects (for example: the mouse cursor).

bool GetClosestParameters ( const ItConstraintItem cItem,
MtMateParameters cPars 
[in]cItem- Considered constraint.
[out]cPars- The resulting evaluation parameters.
If it returns true, then cPars contains the correct answer to the query.

The mate ItConstraintItem is characterized by integer and real parameters (alignment option and size). The function GetClosestParameters calculates the state of parameters in which the mate would be satisfied or the closest to the solution.

bool GetDimensionTraits ( const ItConstraintItem dCon,
MtLDimensionTraits dPars 
[in]dCon- Dimensional geometric constraint.
[out]dPars- Structure of the characteristic parameters of dimension.
If it returns true, then dPars contains the correct answer to the query.
bool GetDimensionTraits ( const ItConstraintItem dCon,
MtADimensionTraits dPars 
[in]dCon- Dimensional geometric constraint.
[out]dPars- Structure of the characteristic parameters of dimension.
If it returns true, then dPars contains the correct answer to the query.
bool EstimateTangencyChoice ( const ItConstraintItem cItem,
GCM_tan_choice  tChoice 
[in]cItem- Mate which carries a pair of mating objects or at least one (first or second).
[in]tChoice- Tangency variant which was to be applied to mate cItem.
Will return true if the tangency option is applicable to this mate.
The mate cItem can not be fully specified, i.e. is selected only one geometric object, then the function will respond about applicability tChoice to the one object without selecting the second.
bool IsCompatibleMatingGeometry ( const ItConstraintItem cItem)

If in the constraint given the first and second mating objects, then a function provides about the possibility mating of given geometric objects, otherwise if only one of the objects (either first or second) is given in the mate, then function provides for the applicability of this geometric object for the given mate.

Returns true if given pair of geometric objects is applicable to this type of mate.
bool GCM_RelativePlacement ( MbPlacement3D  gPlaces[],
size_t  gPlacesSize,

The function implements a type of GCM_dependent_func considering dependency g1 = f( g2, g3, g4 ), namely calculates placement of first geom (g1) that is related to second geom (g2) in same way as g3 was placed relative to g4. In this way, g1 is dependent on others.

[in]gPlaces- Array of current placements of geometric objects g1, g2 .. g4.
[out]gPlaces- Calculated placement of first geom g1 (it is returned to the element gPlaces[0]).
[in]gPlacesSize- Known size of received array gPlaces.
true if the function is performed successfully.
gPlaces[0] = gPlaces[2];
gPlaces[0].Transform( gPlaces[3].GetMatrixInto() );
gPlaces[0].Transform( gPlaces[1].GetMatrixFrom() );
bool GetMatingGeometry ( const ItConstraintItem cItem,
int  geomNb,
bool  inWCS,
MtGeomType gType,
MbCartPoint3D pc,
MbVector3D vec,
double &  r1,
double &  r2 
[in]cItem- Geometric constraint.
[in]geomNb- 1st or 2nd index of geometric object.
[in]inWCS- If = true, then the function returns object given in GCS otherwise in LCS of 1st or 2nd solid respectively.
[out]gType- A type of geometric object.
pc,vec,r1,r2- A tuple of object parameters (described below).
If returns true the tuple {pc, vec, r1, r2} contains the correct answer to the query.
Writing format of the tuple {pc, vec, r1, r2}
Tuple of values {pc, vec, r1, r2} unified describes all the types of geometric objects listed in the #MtGeometryType.
Point is given by a single value {pc};
Line is given by a pair {pc, vec};
Plane is given by a pair {pc, vec} where vec - normal of plane pc - point on the plane;
Cylinder is given by {pc, vec, r1, r2} where {pc,vec} - the cylinder axis, r1=r2 - the cylinder radius;
Circle is given by triplet: {pc, vec, r1, r2} where {pc,vec} - the circle axis with origin in circle center, r1 - the circle radius, r2=0;
Cone - {pc, vec, r1, r2}, where {pc,vec}-the cone axis, r1 - the bottom radius, r2 - the section radius. Cone has a height equal to one i.e. the distance between the base and section is equal to one, the point pc lies in the plane of the base.
Sphere is given by a point pc - the sphere center and r1=r2 -the sphere radius;
Torus is given by a point pc - the torus center, {pc,vec}-the torus axis, r1 -the major radius of torus, r2 -the minor radius (half the thickness of a torus).
MtGeomVariant GCM_GeomArgument ( const MbSpaceItem ,
bool  orient 

The function extracts geometry data of the solver type from geometric object presented class MbSpaceItem.

const ItConstraintItem* GCM_ConstraintItem ( GCM_system  gSys,
GCM_constraint  conId 
Internal use only
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines