User's guide > Feature Element Tree
Feature Element Tree
This section explains feature creation in Creo Object TOOLKIT Java.
Overview of Feature Creation
There are many kinds of features in Creo+ and each feature can contain a large and varied amount of information. All this information must be complete and consistent before a feature can be used in regeneration and create the geometry.
You must build all the information needed by a feature into a data structure before passing that whole structure to Creo+. This structure is called Feature Element Tree (FET). The FET structure is in the form of a tree containing the data elements. Creo Object TOOLKIT Java defines this structure as an object that can be allocated and filled using special classes.
You must use the following steps to create a feature in Creo+:
1. Allocate the FET structure as wfcElementTree.
2. Fill the FET structure by creating Element objects.
3. Pass the FET structure to Creo+ to create the feature by calling the function wfcSolid.WSolid.WCreateFeature.
The feature is created in a sequence of manageable steps with the error checking along the way.
The full FET is represented by a ElementTree object. The root and branch points in FET are called “elements”. Each element is modeled by Element class.
FET contains all the information required to define the feature. It includes the following information:
All the options and attributes. For example, the material side and depth type for an extrusion or slot, placement method for a hole, and so on.
All the references to existing geometry items. For example, the placement references, up to surfaces, sketching planes, and so on.
All the references to Sketcher models used for sections in the feature.
All dimension values.
The values of dimensions used by the feature are in the FET. However, there are no descriptions or references to the dimension objects themselves.
Each element in the FET is assigned an element ID. The element ID is an unique to every element. No two elements at the same level in the tree can have the same identifier, unless they belong to an array element.
You cannot create all feature types using Creo Object TOOLKIT Java, but the FET structure is capable of defining any feature type. This allows you to extend the range of features.
* 
The Creo Object TOOLKIT Java is based on the same toolkit that is used to build Creo+. Changes in Creo+ may require the definition of the element tree to be altered for some features. PTC will support upward compatibility in most of the cases. However, there may be cases where the old application will not run with the new version of Creo+. You must rewrite the application's code to conform to the new definition of the feature tree.
The Creo Object TOOLKIT Java and Creo TOOLKIT share the same definitions of FET element IDs and values. To use a specific element, you must refer to the header files in <creo_toolkit_loadpoint>/includes for feature-specific element trees, and then insert the actual integer value of the constant which defines the element ID or the element value.
PRO_E_FEATURE_TYPE
PRO_E_FEATURE_FORM
PRO_E_EXT_DEPTH
PRO_E_THICKNESS
PRO_E_4AXIS_PLANE
Was this helpful?