Click here to show toolbars of the Web Online Help System: show toolbars |
MIL_ID ContextId, | //in |
MIL_INT64 FeatureType, | //in |
MIL_INT64 Geometry, | //in |
MIL_INT FeatureLabel, | //in |
MIL_INT64 BuildOperation, | //in |
const MIL_INT *FeatureLabelArrayPtr, | //in |
const MIL_INT *SubFeatureIndexArrayPtr, | //in |
MIL_INT SizeOfArray, | //in |
MIL_INT64 ControlFlag | //in |
This function adds a feature to the metrology template of the specified metrology context. This function can also modify an existing feature of a metrology template. To delete features, use MmetControl() with M_DELETE.
To add several features to the template, you must call this function for each feature to add.
Features can either be physically measured from the target image or constructed from a set of other features, which can be referred to as base features. When a feature is composed of several instances of the same feature type, it is considered a multiple feature. Every instance of the feature type is a subfeature of the multiple feature. A single feature is a feature that has only one instance of the feature type. All supported features are single features, except for the edgel feature (M_MEASURED or M_CONSTRUCTED with M_EDGEL) and the measured multiple point feature (M_MEASURED with M_POINT). When adding a constructed feature that requires a point, it is possible to isolate and use a specific point subfeature of a measured multiple point feature. This is not true for the edgel feature since it is always used as a group.
Every feature has a position in the metrology template. For a physically measured feature, its position can be considered to be set according to the metrology region in which it is expected to be established (MmetSetRegion()). By default, the metrology region is infinite (the whole target image). For a constructed feature, its position in the template is defined by the position of the features used to construct it (its base features). The position of a feature is relative to a reference coordinate system, referred to as the reference frame. The global frame is the default. If the target image is not calibrated, the global frame's default origin (0,0) is aligned with the center of the top-left corner pixel of the target image. If the target image is calibrated, the global frame's default origin is aligned with the origin of the relative (world) coordinate system. To change the reference frame to a local frame, use MmetControl() with M_REFERENCE_FRAME. Local frames are coordinate systems located anywhere within the metrology template and defined as metrology features.
Once a feature is added to the template, it is possible to change its position using MmetSetPosition(). In addition, you can modify the feature so that it is constructed from a new set of base features and/or a new build operation; to do so, call MmetAddFeature() with M_MODIFY. Note that you cannot modify a feature's geometry.
To define the acceptable geometric relationship between several features in the template or the acceptable deviation from the definition of a feature, add a geometric tolerance, using MmetAddTolerance(). To calculate the added features and validate the geometric tolerances in the target image, use MmetCalculate(). To change the settings of a feature in the template, use MmetControl().
Specifies the identifier of the metrology context containing the template. The metrology context must have been previously allocated on the required system using MmetAlloc().
Specifies the type of feature to add (M_CONSTRUCTED or M_MEASURED) or specifies to modify a feature (M_MODIFY).
See the Parameter associations section for possible values that can be specified.
Specifies the geometric shape of the feature to add. If modifying a feature (M_MODIFY), this parameter must be set to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies the operation to use to build the feature.
See the Parameter associations section for possible values that can be specified.
Specifies the array that holds the label of every feature to use to construct the feature. Features used to construct a feature are considered to be its base features.
Set this parameter to M_NULL when adding measured features or parametrically constructed features (M_PARAMETRIC).
Specifies the array that holds the index of every subfeature to use to construct the feature. Features used to construct a feature are considered to be its base features.
If all features referenced by FeatureLabelArrayPtr are single features, set SubFeatureIndexArrayPtr to M_NULL. This is also true when adding measured features or parametrically constructed features (M_PARAMETRIC).
If some features referenced by FeatureLabelArrayPtr are multiple features, set SubFeatureIndexArrayPtr to an array that is the same size as the FeatureLabelArrayPtr array. Set each element of the SubFeatureIndexArrayPtr array to the index of the subfeature to use for the feature at the corresponding element of the FeatureLabelArrayPtr array; for single features, set their corresponding element in the SubFeatureIndexArrayPtr array to 0.
Specifies the size of the arrays that hold the information that will be used to construct the feature (FeatureLabelArrayPtr and SubFeatureIndexArrayPtr). When setting the FeatureLabelArrayPtr parameter to M_NULL, set this parameter to 0.
The tables below list possible values for the FeatureType, Geometry, and BuildOperation parameters.
To add a constructed feature, the FeatureType, Geometry, and BuildOperation parameters can be set to the following values. Note that certain build operations for constructed features require base features, which you can specify using the FeatureLabelArrayPtr parameter and, if necessary, the SubFeatureIndexArrayPtr parameter.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
Geometry | |||||||||||||||||||||||||||||||||||||||
BuildOperation | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a constructed feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a constructed arc feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the arc feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the arc feature is built from a geometric construction using the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the arc feature is built from the arc that best fits the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the arc feature is built from the following MmetControl() parametric controls: M_POSITION_X, M_POSITION_Y, M_ANGLE_START, M_ANGLE_END, and M_RADIUS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a constructed circle feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the circle feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the circle feature is built from a geometric construction using the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the circle feature is built from the circle that best fits the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the circle feature is built from the best inner fit of a circle around the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the circle feature is built from the best outer fit of a circle around the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the circle feature is built from the following MmetControl() parametric controls: M_POSITION_X, M_POSITION_Y, and M_RADIUS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a constructed edgel feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_COPY_FEATURE_EDGELS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the edgel feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the edgel feature is constructed by copying the edgels of the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the edgel feature is constructed from edgels or points established using other MIL modules or third party software. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a constructed line feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is built at a specified angle from the specified linear base feature (segment or line), and passing through the specified point base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is built where it divides, in two equal parts, an angle formed by the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is built from a geometric construction using the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is built from the resulting best fit of the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is built parallel to the specified linear base feature (segment or line), and passing through the specified point base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is built from the following MmetControl() parametric controls: M_LINE_A, M_LINE_B, and M_LINE_C. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is built perpendicular to the specified linear base feature (segment or line), and passing through the specified point base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the line feature is built where it divides, in two parts, an angle formed by the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a constructed local frame feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the local frame feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the local frame feature is built from a geometric construction using the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the local frame feature is built from the following MmetControl() parametric controls: M_POSITION_X, M_POSITION_Y, and M_ANGLE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a constructed point feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the specified absolute angle, on the contour of the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the specified relative angle, on the contour of the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the center of the specified base feature(s). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the point on the first specified base feature that is closest to the second specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the point of intersection between the extension of the first and second specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the point of intersection between the first and second specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the point on the first specified base feature that is farthest from any point on the second specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the midpoint of the contour (edge) of the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built from the following MmetControl() parametric controls: M_POSITION_X and M_POSITION_Y. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the specified position on the contour of the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the end of the contour of the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the specified relative position on the contour of the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the point feature is built at the start position of the contour of the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a constructed segment feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the segment feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the segment feature is built from a geometric construction using the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the segment feature is built from the line that best fits the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the segment feature is built from the segment that has the best inner fit in the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the segment feature is built from the outer fit of the specified base features. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the segment feature is built from the following MmetControl() parametric controls: M_POSITION_START_X, M_POSITION_START_Y, M_POSITION_END_X, and M_POSITION_END_Y. |
To add a measured feature, the FeatureType, Geometry, and BuildOperation parameters can be set to the following values.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
Geometry | |||||||||||||||||||||||||||||||||||||||
BuildOperation | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a physically measured feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a physically measured arc feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_FIT. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured arc feature is built using a best fit operation applied to the data (edgels) extracted from the metrology region. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a physically measured circle feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_FIT. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured circle feature is built using a best fit operation applied to the data (edgels) extracted from the metrology region. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured circle feature is built using the best inner fit operation applied to the data (edgels) extracted from the metrology region. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured circle feature is built using the best outer fit operation applied to the data (edgels) extracted from the metrology region. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a physically measured edgel feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured edgel feature is built by extracting all the edgels in the metrology region. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a physically measured point feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_FIT. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured point feature is built using a best fit operation applied to the data (edgels) extracted from the metrology region. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Adds a physically measured segment feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_FIT. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured segment feature is built from the line that best fits the data (edgels) extracted from the metrology region. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured segment feature is built from the segment that has the best inner fit applied to the data (edgels) extracted from the metrology region. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the measured segment feature is built from the segment that has the best outer fit applied to the data (edgels) extracted from the metrology region. |
To modify a feature, the FeatureType, Geometry, and BuildOperation parameters can be set to the following values.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
Geometry | |||||||||||||||||||||||||||||||||||||||
BuildOperation | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Modifies the build operation of the specified feature, and/or for a constructed feature, modifies its base features, which is the set of features used to build the constructed feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the current geometry of the feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to change only the features from which the selected feature is built (its base features) and that the selected feature's build operation should not be changed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a new build operation for the selected feature. |
Header | Include mil.h. |
Library | Use mil.lib; milmetrol.lib. |
DLL | Requires mil.dll; milmetrol.dll. |