C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Blackbox. More...

#include <gcm_blackbox.h>

Public Member Functions

virtual void CollectMyInGeoms (IFC_Array< ItGeom > &) const =0
 The function collects in the array independent geoms of a blackbox.
 
virtual void CollectMyOutGeoms (IFC_Array< ItGeom > &) const =0
 The function collects in the array dependent geoms of a blackbox.
 
virtual GCM_dependent_result CalculateDependent (const std::vector< GeomPlace > &inGeomPlaces, GeomPlace &depPlace) const
 Calculate position of a dependent geometric object. More...
 
virtual bool IsMyOutGeom (const ItGeom &) const =0
 Check if the given geometric item is dependent.
 
virtual bool FormulateOutGeom (MtGeomSolver &solver, ItGeomPtr outGeom)
 Formulate constraints for the dependent geometric object. More...
 
virtual void FinishBlackBox ()
 To finish work with the black box. More...
 
virtual bool Calculate (const SArray< MbPlacement3D > &, const ItGeom &, MbPlacement3D &) const
 Calculate position of a dependent geometric object. More...
 

Detailed Description

Blackbox.


Blackbox implements a law of positioning of geometric objects which are dependent on positions of other objects. Interface ItGCBlackbox is usually implemented on the side of application and it is transferred from the application to C3D Solver by method #MtGeomSolver::AddBlackbox. The blackbox abstraction can be used to organize patterns in assembly structures, when the elements of the pattern are copies (instancies) of the same part (sample) replicated according to a geometric law specified by the application.

Member Function Documentation

◆ CalculateDependent()

virtual GCM_dependent_result ItGCBlackbox::CalculateDependent ( const std::vector< GeomPlace > &  inGeomPlaces,
GeomPlace &  depPlace 
) const
inlinevirtual

Calculate position of a dependent geometric object.

Parameters
[in]inGeomPlaces- Positions of independed geoms, which are got by ItGCBlackbox::CollectMyInGeoms.
[in]depPlace- Depended geometric object.
[out]depPlace- Calculated position for a dependent geom 'outGeom'
Returns
GCM_DEP_RESULT_Ok if the function performed succeeded otherwise one of diagnostic error codes.

◆ FormulateOutGeom()

bool ItGCBlackbox::FormulateOutGeom ( MtGeomSolver solver,
ItGeomPtr  outGeom 
)
inlinevirtual

Formulate constraints for the dependent geometric object.

The function allows to set the position of the dependent object relative to it's governing objects explicitly using the interface MtGeomSolver (MtGeomSolver::AddConstraint, MtGeomSolver::AddConstraintItem, #MtGeomSolver::AddPattren). This mechanism is an alternative to calling ItGCBlackbox::Calculate. Using this mechanism provides an information about the dependency character. This information allows to extend the class of solvable problems but in some cases can lead to performance degradation.

Parameters
[in,out]solver- System of constraints.
[in]outGeom- Depended geometric object.
Returns
The function should return true, if the position of the dependent object was formulated in the constraints solver explicitly using MtGeomSolver::AddConstraint, MtGeomSolver::AddConstraintItem or #MtGeomSolver::AddPattren methods. If the position of the dependent object must be calculated using the method ItGCBlackbox::Calculate, the function should return false.

◆ FinishBlackBox()

virtual void ItGCBlackbox::FinishBlackBox ( )
inlinevirtual

To finish work with the black box.

The function allows the user of this interface correctly to complete work with the black box when it is removing from the solver.

◆ Calculate()

virtual bool ItGCBlackbox::Calculate ( const SArray< MbPlacement3D > &  ,
const ItGeom ,
MbPlacement3D  
) const
inlinevirtual

Calculate position of a dependent geometric object.

Attention
This function is deprecated and supporting it will be stopped. So the customer application should be override new virtual function CalculateDependent instead.

The documentation for this struct was generated from the following file: