Feature Tree
Types
Fields
Functions
Detailed Description
- group a3d_feature_tree_module
CAD model are represented by a feature tree.
A model tree is composed by nodes. Each of these nodes is a build step, whose definition parameters are stored in a feature. The following model is defined with construction entities, then a pad, and a hole.
The model trees are accessible through the product occurrence by using the function A3DAsmProductOccurrenceGet, and the function A3DFRMTreeGet will populate the data structure. An array of feature trees is stored in A3DAsmProductOccurrenceData, usually there is only one feature tree by model.
A3DUns32 u; A3DAsmProductOccurrenceData sData; A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceData, sData); if( A3DAsmProductOccurrenceGet(pOccurrence, &sData)== A3D_SUCCESS) { for (u = 0; u < sData.m_uiFeatureBasedEntitiesSize; ++u) { A3D_INITIALIZE_DATA(A3DFRMTreeData, sTreeData); A3DFRMTreeGet (sData.m_ppFeatureBasedEntities[u], &sTreeData); //... A3DFRMTreeGet (NULL, &sTreeData); } A3DAsmProductOccurrenceGet(NULL, &sData); }
In addition, the function A3DFRMGetSpecificNodes allows to directly get a list of features with a specific cad type. For instance, to get all features HOLE defined in the tree. In this case,
A3DUns32 iSize; A3DFRMFeature** ppFeatureNodes; A3DFRMGetSpecificNodes( pFRMFeatureTree, kA3DFRMEnumValue_CadType_Hole, &iSize, &ppFeatureNodes); //... A3DFRMGetSpecificNodes( NULL, kA3DFRMEnumValue_CadType_Hole, &iSize, &ppFeatureNodes);
Note that A3DFRMTree object is an abstraction of A3DRiSet, so it possible to directly call the function A3DFRMTreeGet on a set
A3DEEntityType eType=kA3DTypeUnknown; A3DEntityGetType(pRepresentationItem,&eType); if(eType == kA3DTypeRiSet) { A3DFRMTreeData oData; A3D_INITIALIZE_DATA(A3DFRMTreeData, sTreeData); if (A3DFRMTreeGet(pRepresentationItem, &sTreeData) == A3D_SUCCESS) { A3DFRMTreeGet(NULL, &sTreeData); } else { //regular RiSet } }
Type Documentation
-
enum EA3DFRMEnumValue_ModeType
Enumerate the possible types of mode type.
- Version
10.2
Values:
-
enumerator kA3DFRMEnumValue_ModeType_None
No mode.
-
enumerator kA3DFRMEnumValue_ModeType_Cut
Cut mode.
-
enumerator kA3DFRMEnumValue_ModeType_CutOut
CutOut mode.
-
enumerator kA3DFRMEnumValue_ModeType_Surface
Surface mode.
-
enumerator kA3DFRMEnumValue_ModeType_SurfaceCappedEnds
Surface with capped ends mode.
-
enumerator kA3DFRMEnumValue_ModeType_PatternGeometry
Pattern geometry mode.
-
enumerator kA3DFRMEnumValue_ModeType_Symbolic
Symbolic mode.
Function Documentation
-
A3DStatus A3DFRMTreeGet(const A3DFRMTree *pTree, A3DFRMTreeData *pData)
Populate the A3DFRMTreeData structure.
- Version
10.2
- Return values:
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_INVALID_ENTITY_TYPE –
A3D_ERROR –
A3D_INVALID_LICENSE –
A3D_SUCCESS –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DFRMGetSpecificNodes(const A3DFRMTree *pTree, EA3DFRMEnumValue_CadType eCADType, A3DUns32 *piSize, A3DFRMFeature ***pppFeatureNodes)
Build a List of Features corresponding to a node with specific CAD type.
- Version
10.2
- Parameters:
pTree – [in] The feature tree to query features from.
eCADType – [in] CAD type of feature (Hole, Pattern, …).
piSize – [out] The number of feature founds. Corresponds to the size of pppFeatureNodes.
pppFeatureNodes – [out] An array of size piSize containing the found features (Hole, Pattern, …).
- Return values:
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_ERROR –
A3D_SUCCESS –
- Returns:
A3D_SUCCESS
on success, or an error code on failure