Feature Inquiry
Functions introduced:
This section describes how to extract the element tree from a feature and analyze it. To find out how to inquire about the feature as a whole and its role in the owning solid, see the section Feature Inquiry in the section
Core: Features.
The function
ProFeatureElemtreeCreate() creates a copy of the feature element tree that describes the contents of a specified feature in the database. It is applicable only to those feature types that can be created using
ProFeatureCreate() (as described in
Overview of Feature Creation). The tree can then be analyzed using the read-access functions, such as
ProElement*Get(),
ProElement*Visit(), and
ProElementArrayCount() described in the sections
Feature Elements and
Feature Element Paths.
The function
ProFeatureElemtreeExtract() creates a copy of the feature element tree of a specified feature. It also provides options to resolve the paths of external references of the feature in case of assemblies.
Use the function
ProFeatureElemtreeFree()to free a copy of the feature element tree extracted using
ProFeatureElemtreeCreate()ProFeatureElemtreeExtract(). The function
ProElementFree() does not free all of the feature-specific runtime data associated with the element tree, and thus can result in a memory leak for certain features.
Instead of copying the entire element tree to analyze it, you can extract information about particular elements directly from the feature. The remaining functions in this section serve that purpose.
The function
ProFeatureElemValueGet() provides the value of a single-valued element specified by the
ProFeature object and a
ProElempath. The function
ProFeatureElemValuesGet() provides the values of a multivalued element in a feature.
The function
ProFeatureElemDimensionIdGet() gives you the integer identifier of the dimension in the database used to define the value of the specified single-valued element.
The function
ProFeatureElemIsVisible() distinguishes elements added to the tree by for internal reasons only, and are neither defined as needed for creation of that type of feature, nor otherwise documented.
The function
ProFeatureIsIncomplete() identifies features in the database whose element trees are still incomplete. Such a feature can arise by using the option
PRO_FEAT_CR_INCOMPLETE_FEAT when calling
ProFeatureCreate(), and does not give rise to geometry until completed. If a feature is incomplete, you can find out which element in its tree is at fault using the function
ProFeatureElemIsIncomplete(). Its input is a
ProFeature and a
ProElempath.