C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
+ 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...
 
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...
 
void GCM_GetProperties (GCM_system gSys, MbProperties &props)
 Get a list of editable and non-editable properties for the entire constraint system. More...
 
GCM_result GCM_DiagnoseHistoryDependent (GCM_system gSys, const ItGeom *gPtr)
 Specific diagnostics of a geometric object dependent on the construction history. More...
 
void GCM_ImportToC3D (GCM_system gSys, const TCHAR *c3dFile)
 Import the constraint system into C3D-model. More...
 
size_t VolumeOfAlignOption (const ItConstraintItem &)
 The number of alignment options (GCM_alignment) for a given 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.

◆ 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_GetProperties()

void GCM_GetProperties ( GCM_system  gSys,
MbProperties props 
)

Get a list of editable and non-editable properties for the entire constraint system.

Note
The function is used as an analytical tool for the developer.

◆ GCM_DiagnoseHistoryDependent()

GCM_result GCM_DiagnoseHistoryDependent ( GCM_system  gSys,
const ItGeom gPtr 
)

Specific diagnostics of a geometric object dependent on the construction history.

Parameters
[in]gSys- The system of geometric constraints in which the diagnostic object 'gPtr' is evaluated.
[in]gPtr- A pointer to a CAD model object whose current state is computed in the build history of the CAD assembly.
Returns
Resulting error code in the contradiction case.

The API-call is aimed at diagnosing a geometric object which at the same time subordinate to the CAD-assembly built history and at the same time evaluated in the constraint system. The algorithm detects the situation when the current state of the history-based object contradicts the state evaluated in the solver. The result of the call is an error code that is distributed to all adjacent constraints inherited from ItConstraintItem inside the application.

Note
The correct result is assumed only after the evaluating call (ie GCM_Evaluate or MtGeomSolver::Evaluate).

◆ GCM_ImportToC3D()

void GCM_ImportToC3D ( GCM_system  gSys,
const TCHAR *  c3dFile 
)

Import the constraint system into C3D-model.

The algorithm of import recognises a framework structures in the constraint system and writes their into C3D model format. The recognized structures are converted into wire-frame representation (see MbWireFrame).

Note
For testing purposes.