Feature Tree

Types

A3DFRMTreeData

EA3DFRMEnumValue_ModeType

Fields

A3DStatus A3DAsmPartDefinitionFeatureTreesGet

param

kA3DFRMEnumValue_ModeType_None

kA3DFRMEnumValue_ModeType_Cut

kA3DFRMEnumValue_ModeType_CutOut

kA3DFRMEnumValue_ModeType_Surface

kA3DFRMEnumValue_ModeType_SurfaceCappedEnds

kA3DFRMEnumValue_ModeType_PatternGeometry

kA3DFRMEnumValue_ModeType_Symbolic

Functions

A3DStatus

A3DFRMTreeGet

A3DStatus

A3DFRMGetSpecificNodes

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. ../_images/frm_tree.png

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.

Field Documentation

A3DStatus A3DGetCurveAsAnalytic param

Function to get curves as analytic (line or circle) according to a certain tolerance.

delete RTF data created by A3DMkpRTFInit

Get each independent field of a RTF data.

Calculates the bounding box of the model file entity, without using any callback functions.

Draws the markup item entities, using the callbacks defined by A3DDrawInitCallbacks.

Draws the representation item entities, using the callbacks defined by A3DDrawInitCallbacks.

Draws the model file entities, using the callbacks defined by A3DDrawInitCallbacks.

Enables internal SIGSEGV handling (Linux only)

Function to compute Hidden Line Removal on a A3DAsmModelFile.

Function to project Point Cloud on BrepModel with a A3DProjectPointCloudManager.

Function to get surface as analytic according to a certain tolerance.

Function to get curves as analytic (line or circle) according to a certain tolerance Try to use UV curves from Edges if exist, otherwise use 3D Curves.

Use A3DEntityDelete to delete the analytic curve after using it.

Deprecated:

Use A3DSimplifyCurveWithAnalytics instead. This will be removed in version 2026.1.0.

Use A3DEntityDelete to delete the analytic curve after using it.
Deprecated:

use A3DSimplifyCurveWithAnalyticsFromCoEdge instead. This will be removed in version 2026.1.0.

Use A3DEntityDelete to delete the analytic surface after using it. Recognized surface type are: Conic Surface Cylindrical Surface Plane Surface Spherical Surface Toric Surface
Deprecated:

use A3DSimplifySurfaceWithAnalytics instead. This will be removed in version 2026.1.0.

Version

5.0

Version

5.0

Version

5.0

Deprecated:

use A3DProjectPointCloud3 instead. This will be removed in version 2026.1.0.

Version

8.1

Memory Management

In case of success, ppProjectedPointCloud contains heap allocated memory you are responsible for. To free the memory on ppProjectedPointCloud, call A3DProjectPointCloud2 by setting pManager to 0. In this case, all other parameters are ignored:

A3DProjectPointCloud2(0, 0, 0, A3D_FALSE, 0, 0.0, ppProjectedPointCloud);

Deprecated:

use A3DComputeOrthoHLROnModelFile3 instead. This will be removed in version 2026.1.0.

Call A3DComputeOrthoHLROnModelFile( NULL, pOptMrkRView, NULL, pNumberHLRData, pppHLRData) to release pppHLRData structure ( A3DCrvPolyLine was not released) Note: If the model file doesn’t contain any representation items, function returns A3D_INVALID_DATA error;
Version

8.1

Deprecated:

use A3DComputeOrthoHLROnModelFile3 instead. This will be removed in version 2026.1.0.

Version

9.0

Call A3DComputeOrthoHLROnModelFile2( NULL, NULL, NULL, pNumberHLRRepItem, pppHLRRepItem) to release pppHLRRepItem structure ( internal A3DCrvPolyLine was not released)

If pOptMrkRView is a cutting view, psSectionParametersData can be set to 0. In this case, the cutting planes within pOptMrkRView are used for the computation. Planes must to ordered and be set a profile, otherwise the function will return #A3D_TOOLS_INVALID_SECTION_PLANE.

This function activates the handling of the SIGSEGV signal on Linux. When this function is activated, SIGSEGV is handled and an exception is thrown to return A3D_EXCEPTION.

Remark

If the model file doesn’t contain any representation item, the function will return #A3D_INVALID_DATA error

Deprecated:

the default behavior has changed with 11.2 to disable the SIGSEGV handling This will be removed in version 2026.1.0.

Deprecated:

The Draw module is deprecated and will be removed in version 2026.1.0.

To set the uiDrawFlags argument, use the flags defined in Flags for Drawing Model File Entities.
Version

2.0

Deprecated:

The Draw module is deprecated and will be removed in version 2026.1.0.

Deprecated:

The Draw module is deprecated and will be removed in version 2026.1.0.

Deprecated:

The Draw module is deprecated and will be removed in version 2026.1.0.

To set the uiDrawFlags argument, use the flags defined in Flags for Drawing Model File Entities.
Version

2.0

Version

2.0

Version

2.0

Deprecated:

This function is deprecated. Please use A3DMkpRTFFieldGet instead to implement the same behaviour. This will be removed in version 2026.1.0.

Version

4.2

Deprecated:

This function is deprecated. Please use A3DMkpRTFFieldDelete instead to implement the same behaviour. This will be removed in version 2026.1.0.

Version

4.2

Warning

must be deleted by the user

Warning

If A3DProjectPointCloudManagerCreateFromRI is used to create pManager, and A3DProjectPointCloudManagerDataFromRI::m_bUseExactComputation is set to false, you can’t set bUseExactComputation to true. In this case, an A3D_INVALID_DATA error is returned.

Warning

You must call this function before A3DDllInitialize

Retval A3D_SUCCESS:

if an analytic has been created

Retval A3D_ERROR:

Retval A3D_SUCCESS:

if an analytic has been created

Retval A3D_ERROR:

Return:

A3D_SUCCESS on success, or an error code on failure

Return:

A3D_SUCCESS on success, or an error code on failure

Param pSrf:

[in] The input surface

Param dTol:

[in] Tolerance

Param pAnalyticSurface:

[out] The new analytic surface.

Param peAnalyticType:

[out] The type of analytic surface

Retval A3D_SUCCESS:

Retval A3D_INVALID_ENTITY_NULL:

Retval A3D_INVALID_ENTITY_TYPE:

Retval A3D_ERROR:

Return:

A3D_SUCCESS on success, or an error code on failure

Param pManager:

[in] A3DProjectPointCloudManager created by A3DProjectPointCloudManagerCreateFromModelFile function.

Param uPointCloudSize:

[in] Number of points in pPointCloudToProject.

Param pPointCloudToProject:

[in] Point cloud to project. This point cloud must be in the same coordinate system as the BrepData structures stored in BrepModel.

Param bUseExactComputation:

[in] Flag to use exact topology. When this flag is false, the algorithm drops the point cloud on the faceted geometry, otherwise, the exact topology is used.

Param uNbThreads:

[in] Number of threads wanted. 0 means non multi-thread. Please avoid setting a number of threads larger than the number of CPU cores.

Param dInsidePointEdgeTolerance:

[in] Tolerance used to check if projection point which is inside a face is on edge.

Param ppProjectedPointCloud:

[out] Point cloud projected.

Retval A3D_SUCCESS:

Retval A3D_INVALID_DATA_STRUCT_NULL:

Retval A3D_INVALID_DATA_STRUCT_SIZE:

Retval A3D_INVALID_ENTITY_TYPE:

Retval A3D_INVALID_DATA:

Retval A3D_ERROR:

Return:

A3D_SUCCESS on success, or an error code on failure

Param pModelFile:

[in] Model file to work on.

Param pOptMrkRView:

[in] optional A3DMkpView (cut, filter and/or move entities).

Param psHLRViewPlaneData:

[in] define a plane as a camera with orthogonal projection.

Param pNumberHLRData:

[out] Number A3DHLRRepresentationItemData.

Param pppHLRData:

[out] HLR curve result grouped by A3DRiRepresentationItem entity. pppHLRData is automatically allocated by A3DComputeOrthoHLROnModelFile.

Retval A3D_SUCCESS:

Retval A3D_INVALID_DATA_STRUCT_NULL:

Retval A3D_INVALID_DATA_STRUCT_SIZE:

Retval A3D_INVALID_ENTITY_TYPE:

Retval A3D_INVALID_DATA:

Retval A3D_ERROR:

Retval A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE:

Return:

A3D_SUCCESS on success, or an error code on failure

Param pModelFile:

[in] Model file to work on.

Param pOptMrkRView:

[in] optional A3DMkpView (cut, filter and/or move entities).

Param psHLRViewPlaneData:

[in] define a plane as a camera with orthogonal projection.

Param pNumberHLRRepItem:

[out] Number A3DHLRRepresentationItem.

Param pppHLRRepItem:

[out] HLR curve result grouped by A3DRiRepresentationItem entity. pppHLRRepItem is automatically allocated by A3DComputeOrthoHLROnModelFile.

Retval A3D_SUCCESS:

Retval A3D_INVALID_DATA_STRUCT_NULL:

Retval A3D_INVALID_DATA_STRUCT_SIZE:

Retval A3D_INVALID_ENTITY_TYPE:

Retval A3D_INVALID_DATA:

Retval A3D_ERROR:

Retval A3D_TOOLS_INVALID_SECTION_PLANE:

Retval A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE:

Return:

A3D_SUCCESS on success, or an error code on failure

Retval A3D_SUCCESS:

Retval A3D_ERROR:

if not on Linux

Return:

A3D_SUCCESS on success, or an error code on failure

Retval A3D_INITIALIZE_NOT_CALLED:

Retval A3D_INVALID_DATA_STRUCT_SIZE:

Retval A3D_INVALID_DATA_STRUCT_NULL:

Retval A3D_INVALID_ENTITY_NULL:

Retval A3D_INVALID_ENTITY_TYPE:

Retval A3D_SUCCESS:

Retval A3D_INITIALIZE_NOT_CALLED:

Retval A3D_INVALID_DATA_STRUCT_SIZE:

Retval A3D_INVALID_DATA_STRUCT_NULL:

Retval A3D_INVALID_ENTITY_NULL:

Retval A3D_INVALID_ENTITY_TYPE:

Retval A3D_SUCCESS:

Retval A3D_INITIALIZE_NOT_CALLED:

Retval A3D_INVALID_DATA_STRUCT_SIZE:

Retval A3D_INVALID_DATA_STRUCT_NULL:

Retval A3D_INVALID_ENTITY_NULL:

Retval A3D_INVALID_ENTITY_TYPE:

Retval A3D_SUCCESS:

Return:

A3D_SUCCESS on success, or an error code on failure

Return:

A3D_SUCCESS on success, or an error code on failure

Return:

A3D_SUCCESS on success, or an error code on failure

Retval A3D_INITIALIZE_NOT_CALLED:

Retval A3D_INVALID_DATA_STRUCT_SIZE:

Retval A3D_INVALID_DATA_STRUCT_NULL:

Retval A3D_INVALID_ENTITY_NULL:

Retval A3D_INVALID_ENTITY_TYPE:

Retval A3D_SUCCESS:

Return:

A3D_SUCCESS on success, or an error code on failure

Retval A3D_ERROR:

Retval A3D_SUCCESS:

Return:

A3D_SUCCESS on success, or an error code on failure

Retval A3D_ERROR:

Retval A3D_SUCCESS:

Return:

A3D_SUCCESS on success, or an error code on failure

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