MIL_ID ContextId, | //in |
MIL_INT FeatureLabelOrIndex, | //in |
MIL_INT64 TransformationType, | //in |
MIL_DOUBLE Param1, | //in |
MIL_DOUBLE Param2, | //in |
MIL_DOUBLE Param3, | //in |
MIL_DOUBLE Param4, | //in |
MIL_INT64 ControlFlag | //in |
This function moves the specified feature's position in the metrology template of a metrology context.
This function is valid for all measured (MmetAddFeature() with M_MEASURED) and parametrically constructed (MmetAddFeature() with M_CONSTRUCTED and M_PARAMETRIC) features, unless otherwise specified. Typically this function is used to move the position of the global frame or a parametrically constructed local frame (each of which is considered a feature). When specifying a frame, all features and metrology regions that use that frame as their reference frame are moved accordingly. Note that you can also position features using MmetControl() with M_POSITION_X and M_POSITION_Y. However, in this case you must enter exact values; you cannot, for example, position features based on the results of another module, as you can using MmetSetPosition() with M_RESULT.
MIL moves the specified feature relative to its reference frame, except for the global frame, which MIL moves relative to its default origin (0,0). If the target image is not calibrated, the global frame's default origin 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.
If a camera calibration context is associated with the target image, set positional and dimensional values in real-world units. Otherwise, use pixel units.
Specifies the identifier of the metrology context. The metrology context must have been previously allocated on the required system using MmetAlloc().
Specifies the label or index of the feature you want to position. Set this parameter to one of the following values.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the global frame. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the index value of an existing individual feature. (summarize)Specifies the index value of an existing individual feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the index of the feature to position. You can set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the label value of an existing individual feature. (summarize)Specifies the label value of an existing individual feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the label of the feature to position. You can set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
Specifies the type of transformation that will be used to set the new position of the feature.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the position to set. Its definition is dependent on the type of position chosen.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the position to set. Its definition is dependent on the type of position chosen.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the position to set. Its definition is dependent on the type of position chosen.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the position to set. Its definition is dependent on the type of position chosen.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
The table below lists possible values for the TransformationType, Param1, Param2, Param3, and Param4 parameters.
Note that any unused parameters should be set to M_DEFAULT.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
Param1 | |||||||||||||||||||||||||||||||||||||||
Param2 | |||||||||||||||||||||||||||||||||||||||
Param3 | |||||||||||||||||||||||||||||||||||||||
Param4 | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to position the feature using an operation based on forward transformation coefficients, using the equations that follow. x d = A x s + B y s + C . y d = -B x s + A y s + D . (summarize)Specifies to position the feature using an operation based on forward transformation coefficients, using the equations that follow. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the forward transformation coefficient A. (summarize)Sets the forward transformation coefficient A. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 1.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the coefficient. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the forward transformation coefficient B. (summarize)Sets the forward transformation coefficient B. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 1.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the coefficient. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the forward transformation coefficient C. (summarize)Sets the forward transformation coefficient C. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 1.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the coefficient. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the forward transformation coefficient D. (summarize)Sets the forward transformation coefficient D. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 1.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the coefficient. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to position the feature using an operation based on a translation and rotation. (summarize)Specifies to position the feature using an operation based on a translation and rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the translation value for the feature, in the X-direction. (summarize)Sets the translation value for the feature, in the X-direction. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the distance to move the feature, in pixel or world units. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the translation value for the feature, in the Y-direction. (summarize)Sets the translation value for the feature, in the Y-direction. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the distance to move the feature, in pixel or world units. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the angle of rotation for the feature. (summarize)Sets the angle of rotation for the feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0.0°. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the angle, in degrees. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to position the feature at a specific position and angle. This should be used only for a parametrically constructed local frame. (summarize)Specifies to position the feature at a specific position and angle. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the X-coordinate of the origin of the local frame. (summarize)Sets the X-coordinate of the origin of the local frame. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value. The default value is 0.0 pixels. (summarize)Specifies the default value. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the X-coordinate, in pixel or world units. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the Y-coordinate of the origin of the local frame. (summarize)Sets the Y-coordinate of the origin of the local frame. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value. The default value is 0.0 pixels. (summarize)Specifies the default value. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the Y-coordinate, in pixel or world units. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the angle of the local frame. (summarize)Sets the angle of the local frame. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0.0°. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the angle, in degrees. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to position the feature at the position calculated by another MIL module. Supported modules are Code, Geometric Model Finder, Pattern Matching, and String Reader. If you are using a Model Finder result, you can combine M_RESULT with M_FORWARD_COEFFICIENTS. In this case, the transformation uses the forward coefficients of Model Finder's result occurrence. (summarize)Specifies to position the feature at the position calculated by another MIL module. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets a MIL result buffer identifier from the MIL module to use to specify the feature's position. (summarize)Sets a MIL result buffer identifier from the MIL module to use to specify the feature's position. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the index value of the result occurrence to use to set the feature's position. This value must be a valid index that is contained within the result buffer you provided with Param1. (summarize)Sets the index value of the result occurrence to use to set the feature's position. (more details...) |
void MmetSetPositionInt64
(MIL_ID ContextId,
MIL_INT FeatureLabelOrIndex,
MIL_INT64 TransformationType,
MIL_INT64 Param1,
MIL_DOUBLE Param2,
MIL_DOUBLE Param3,
MIL_DOUBLE Param4,
MIL_INT64 ControlFlag)
Parameters
ContextId See ContextId of the main function for a description. FeatureLabelOrIndex See FeatureLabelOrIndex of the main function for a description. TransformationType See TransformationType of the main function for a description. Param1 See Param1 of the main function for a description. Param2 See Param2 of the main function for a description. Param3 See Param3 of the main function for a description. Param4 See Param4 of the main function for a description. ControlFlag See ControlFlag of the main function for a description. |
void MmetSetPositionDouble (MIL_ID ContextId,
MIL_INT FeatureLabelOrIndex,
MIL_INT64 TransformationType,
MIL_DOUBLE Param1,
MIL_DOUBLE Param2,
MIL_DOUBLE Param3,
MIL_DOUBLE Param4,
MIL_INT64 ControlFlag)
Parameters
ContextId See ContextId of the main function for a description. FeatureLabelOrIndex See FeatureLabelOrIndex of the main function for a description. TransformationType See TransformationType of the main function for a description. Param1 See Param1 of the main function for a description. Param2 See Param2 of the main function for a description. Param3 See Param3 of the main function for a description. Param4 See Param4 of the main function for a description. ControlFlag See ControlFlag of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib; milmetrol.lib. |
DLL | Requires mil.dll; milmetrol.dll. |