C3D Toolkit  Kernel - 105435, Vision - 121811.105435
+ Collaboration diagram for Auxiliary routines:

Classes

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

Functions

GCM_result WorseResult (GCM_result res1, GCM_result res2)
 Select "the worst" result code. More...
 
GCM_resultoperator<< (GCM_result &sumRes, const GCM_result r)
 Summarize the resulting code. More...
 
SPtr< MtGeomSolverCreateSolver (ItPositionManager &pMan)
 Create interface of geometric solver. More...
 
MtMateType GetAutoMateType (const ItConstraintItem &cItem, bool forMove)
 Automatically assign the mate type for its arguments. More...
 
bool GetClosestParameters (const ItConstraintItem &cItem, MtMateParameters &cPars)
 Measure parameters of proximity to solution for geometric constraint. More...
 
bool GetDimensionTraits (const ItConstraintItem &dCon, MtLDimensionTraits &dPars)
 Determine the characteristic data of dimension. More...
 
bool GetDimensionTraits (const ItConstraintItem &dCon, MtADimensionTraits &dPars)
 Determine the characteristic data of angular dimension. More...
 
bool EstimateTangencyChoice (const ItConstraintItem &cItem, GCM_tan_choice tChoice)
 Whether it is possible to apply the variant of tangency to this constraint.
More...
 
bool IsCompatibleMatingGeometry (const ItConstraintItem &cItem)
 Determine the compatibility of geometric objects to this constraint. More...
 
bool GCM_RelativePlacement (MbPlacement3D gPlaces[], size_t gPlacesSize, GCM_extra_param)
 Calculate "Relative placement". More...
 
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. More...
 
MtGeomVariant GCM_GeomArgument (const MbSpaceItem *, bool orient)
 Get a geometric object of type MtGeomVariant from geometry of type MbSpaceItem. More...
 
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. More...
 
ptrdiff_t VolumeOfAlignOption (const ItConstraintItem &)
 Determine the count of variants of alignment options for mate.
 

Detailed Description

Function Documentation

◆ WorseResult()

GCM_result WorseResult ( GCM_result  res1,
GCM_result  res2 
)
inline

Select "the worst" result code.

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

◆ operator<<()

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

Summarize the resulting code.

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

◆ CreateSolver()

SPtr<MtGeomSolver> CreateSolver ( ItPositionManager pMan)

Create interface of geometric solver.

The function returns smart-pointer of solver Interface.

Parameters
[in]pMan- Interface of the client application that provides functions of reposition of geometric objects on the client side.
Returns
smart-pointer to an instance of geometric solver.

◆ GetAutoMateType()

MtMateType GetAutoMateType ( const ItConstraintItem cItem,
bool  forMove 
)

Automatically assign the mate type for its arguments.

Parameters
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.
Returns
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).

◆ GetClosestParameters()

bool GetClosestParameters ( const ItConstraintItem cItem,
MtMateParameters cPars 
)

Measure parameters of proximity to solution for geometric constraint.

Parameters
[in]cItem- Considered constraint.
[out]cPars- The resulting evaluation parameters.
Returns
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.

◆ GetDimensionTraits() [1/2]

bool GetDimensionTraits ( const ItConstraintItem dCon,
MtLDimensionTraits dPars 
)

Determine the characteristic data of dimension.

Parameters
[in]dCon- Dimensional geometric constraint.
[out]dPars- Structure of the characteristic parameters of dimension.
Returns
If it returns true, then dPars contains the correct answer to the query.

◆ GetDimensionTraits() [2/2]

bool GetDimensionTraits ( const ItConstraintItem dCon,
MtADimensionTraits dPars 
)

Determine the characteristic data of angular dimension.

Parameters
[in]dCon- Dimensional geometric constraint.
[out]dPars- Structure of the characteristic parameters of dimension.
Returns
If it returns true, then dPars contains the correct answer to the query.

◆ EstimateTangencyChoice()

bool EstimateTangencyChoice ( const ItConstraintItem cItem,
GCM_tan_choice  tChoice 
)

Whether it is possible to apply the variant of tangency to this constraint.

Parameters
[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.
Returns
Will return true if the tangency option is applicable to this mate.
Note
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.

◆ IsCompatibleMatingGeometry()

bool IsCompatibleMatingGeometry ( const ItConstraintItem cItem)

Determine the compatibility of geometric objects to this constraint.

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
Returns true if given pair of geometric objects is applicable to this type of mate.

◆ GCM_RelativePlacement()

bool GCM_RelativePlacement ( MbPlacement3D  gPlaces[],
size_t  gPlacesSize,
GCM_extra_param   
)

Calculate "Relative placement".

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.

Parameters
[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.
Returns
true if the function is performed successfully.
Implementation
gPlaces[0] = gPlaces[2];
gPlaces[0].Transform( gPlaces[3].GetMatrixInto() );
gPlaces[0].Transform( gPlaces[1].GetMatrixFrom() );

◆ GetMatingGeometry()

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.

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

◆ GCM_GeomArgument()

MtGeomVariant GCM_GeomArgument ( const MbSpaceItem ,
bool  orient 
)

Get a geometric object of type MtGeomVariant from geometry of type MbSpaceItem.

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

◆ GCM_ConstraintItem()

const ItConstraintItem* GCM_ConstraintItem ( GCM_system  gSys,
GCM_constraint  conId 
)

Get an interface object ItConstraintItem of geometric constraint by the descriptor.

Note
Internal use only