Table: | For drawing a context characteristic |
Table: | For drawing a feature characteristic |
Table: | For drawing a tolerance characteristic |
+ combination: | For M_DRAW_FEATURE and M_DRAW_TOLERANCE |
MIL_ID ContextGraId, | //in |
MIL_ID ContextOrResultMetId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT LabelOrIndex, | //in |
MIL_INT64 ControlFlag | //in |
This function draws specific features or tolerances of a metrology context or of a metrology result, in the destination image buffer or 2D graphics list.
You can draw results and settings, obtained relative to an offset, at the top-left corner of the destination image, using MgraControl() with M_DRAW_OFFSET_X and M_DRAW_OFFSET_Y and zoom them using MgraControl() with M_DRAW_ZOOM_X and M_DRAW_ZOOM_Y. For more information, see the Drawing graphics with offset and zoom subsection of the Drawing graphics section of Chapter 24: Generating graphics.
When zooming, MmetDraw() will draw into the destination image buffer even if the buffer is not large enough to contain all of the zoomed image. If necessary, the image will be clipped.
If a template reference has been set using MmetControl() with M_TEMPLATE_REFERENCE_ID, MmetDraw() can draw the results of features and tolerances extracted from that template reference. You will need to inquire M_TEMPLATE_REFERENCE_SIZE_X and M_TEMPLATE_REFERENCE_SIZE_Y to allocate an appropriate destination buffer.
Specifies the identifier of the 2D graphics context to use when drawing. This parameter must be set to one of the following values:
For specifying the 2D graphics context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the default 2D graphics context of the current MIL application is used. Note that there is a different default 2D graphics context for each thread. (summarize)Specifies that the default 2D graphics context of the current MIL application is used. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL 2D graphics context identifier |
Specifies a valid 2D graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the metrology result buffer or context from which to extract the features to draw. The metrology result buffer must have been previously allocated using MmetAllocResult(). The metrology context must have been previously allocated using MmetAlloc().
If you are using MmetDraw() with a metrology context, you can specify that a feature or tolerance in the context should not be drawn, using MmetControl() with M_DRAWABLE set to M_DISABLE. This can be useful if you have many features or tolerances and you want to draw all of them in one call, although there are some that you do not want to see. When features or tolerances are not drawn, you cannot affect them in an interactive display.
Specifies the identifier of the destination image buffer or 2D graphics list in which to draw. The buffer can be any valid MIL image buffer allocated using MbufAlloc...(). The 2D graphics list must be previously allocated using MgraAllocList(). By drawing into a display's overlay buffer or associating the 2D graphics list with the display, you can also annotate an image non-destructively.
If specifying an image buffer, it must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
When using MmetDraw() to draw features with a source model that is associated with a calibration context and if a calibration context is associated with the destination buffer, the latter must also be calibrated to the same world coordinate system. If no calibration context is associated with the destination buffer, the latter will use the same one as the template reference's. To add a template reference to a metrology context, use MmetControl() with M_TEMPLATE_REFERENCE_ID. MmetDraw() draws all the requested features according to whether the destination image buffer is physically corrected or not.
Specifies the type of drawing operation to perform. This parameter can be set to the following values:
For drawing a context characteristic
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_TEMPLATE_REFERENCE |
Draws the template reference. The LabelOrIndex parameter must be set to M_GENERAL. This operation cannot draw in a 2D graphics list. (summarize)Draws the template reference. (more details...) |
For the following constants, the LabelOrIndex parameter can be set to M_FEATURE_LABEL(), M_FEATURE_INDEX(), or M_ALL_FEATURES, unless otherwise specified.
For drawing a feature characteristic
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_ACTIVE_EDGELS |
Draws only the edgels that satisfied all edgel constraints. |
||||||||||||||||||||||||||||||||||||||
M_DRAW_ALL_EDGELS |
Draws all the edgels that were calculated in the target image. This includes the edgels that were used to measure a feature. (summarize)Draws all the edgels that were calculated in the target image. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_FEATURE + |
Draws the specified feature(s). In this case, you can also set the LabelOrIndex parameter to M_GLOBAL_FRAME. (summarize)Draws the specified feature(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_FITTED_EDGELS |
Draws only the edgels that satisfied all edgel constraints and fit constraints. The fitted edgels are those used by the fit operation to define a feature. (summarize)Draws only the edgels that satisfied all edgel constraints and fit constraints. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_NOISY_EDGELS |
Draws the edgels before they were denoised. Edgels are denoised using MmetControl() with M_EDGEL_DENOISING_MODE. (summarize)Draws the edgels before they were denoised. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_REGION |
Draws the feature's search region. When drawing in a 2D graphics list, this operation cannot draw ring and ring sector regions when M_REGION_ACCURACY_HIGH is set to M_DISABLE and the 2D graphics context's input units is set to world units (MgraControl() with M_INPUT_UNITS set to M_WORLD). (summarize)Draws the feature's search region. (more details...) |
For the following constants, the LabelOrIndex parameter can be set to M_TOLERANCE_LABEL(), M_TOLERANCE_INDEX(), M_ALL_TOLERANCES, M_ALL_PASS_TOLERANCES, M_ALL_FAIL_TOLERANCES, or M_ALL_WARNING_TOLERANCES.
For drawing a tolerance characteristic
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_TOLERANCE + |
Draws the geometric tolerance's icon. To view the icons, see MmetAddTolerance(). (summarize)Draws the geometric tolerance's icon. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_TOLERANCE_AREA |
Draws the area used to define the area-based geometric tolerance. These tolerances are set using MmetAddTolerance() with M_AREA_.... (summarize)Draws the area used to define the area-based geometric tolerance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_TOLERANCE_FEATURES |
Draws the features used to define a tolerance. The LabelOrIndex parameter can be set to M_TOLERANCE_LABEL(), M_TOLERANCE_INDEX(), M_ALL_TOLERANCES, M_ALL_PASS_TOLERANCES, M_ALL_FAIL_TOLERANCES, or M_ALL_WARNING_TOLERANCES. (summarize)Draws the features used to define a tolerance. (more details...) |
You can add one of the following values to the above-mentioned values to specify that the label or name of the feature or tolerance will also be drawn.
For M_DRAW_FEATURE and M_DRAW_TOLERANCE
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_LABEL |
Specifies that the label will also be drawn. |
||||||||||||||||||||||||||||||||||||||
M_DRAW_NAME |
Specifies that the name will also be drawn. |
Specifies the label or index of the result in the metrology result buffer for which to perform the drawing operation, or specifies that you are performing a general drawing operation for the metrology context. Set this parameter to one of the following values:
For specifying the index of the element in the
metrology result buffer
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default setting. M_DEFAULT is the same as M_ALL_FEATURES, when setting the Operation parameter to a value in the For drawing a feature characteristic table. M_DEFAULT is the same as M_ALL_TOLERANCES, when setting the Operation parameter to a value in the For drawing a tolerance characteristic table. M_DEFAULT is the same as M_GENERAL, when setting the Operation parameter to a value in the For drawing a context characteristic table. (summarize)Specifies the default setting. (more details...) |
||||||||||||||||||||||||||||||||||||||
Specifies the index value of an existing individual feature to draw, in either the metrology context or result buffer, depending on whether you provide a context or result buffer to the ContextOrResultMetId parameter. (summarize)Specifies the index value of an existing individual feature to draw, in either the metrology context or result buffer, depending on whether you provide a context or result buffer to the ContextOrResultMetId parameter. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the index of the individual feature to draw. You can set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
Specifies the label value of an existing individual feature to draw, in either the metrology context or result buffer, depending on whether you provide a context or result buffer to the ContextOrResultMetId parameter. (summarize)Specifies the label value of an existing individual feature to draw, in either the metrology context or result buffer, depending on whether you provide a context or result buffer to the ContextOrResultMetId parameter. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the label of the individual feature to draw. You can set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
Specifies the index value of an existing individual tolerance to draw, in either the metrology context or result buffer, depending on whether you provide a context or result buffer to the ContextOrResultMetId parameter. (summarize)Specifies the index value of an existing individual tolerance to draw, in either the metrology context or result buffer, depending on whether you provide a context or result buffer to the ContextOrResultMetId parameter. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the index of the individual tolerance to draw. You can set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
Specifies the label value of an existing individual tolerance to draw, in either the metrology context or result buffer, depending on whether you provide a context or result buffer to the ContextOrResultMetId parameter. (summarize)Specifies the label value of an existing individual tolerance to draw, in either the metrology context or result buffer, depending on whether you provide a context or result buffer to the ContextOrResultMetId parameter. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the label of the individual tolerance to draw. You can set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_ALL_FAIL_TOLERANCES |
Specifies that the drawing operation will be performed on all tolerance results that have the status M_FAIL. |
||||||||||||||||||||||||||||||||||||||
M_ALL_FEATURES |
Specifies to draw all feature results. |
||||||||||||||||||||||||||||||||||||||
M_ALL_PASS_TOLERANCES |
Specifies that the drawing operation will be performed on all tolerance results that have the status M_PASS. |
||||||||||||||||||||||||||||||||||||||
M_ALL_TOLERANCES |
Specifies to draw all tolerance results. |
||||||||||||||||||||||||||||||||||||||
M_ALL_WARNING_TOLERANCES |
Specifies that the drawing operation will be performed on all tolerance results that have the status M_WARNING. |
||||||||||||||||||||||||||||||||||||||
M_GENERAL |
Specifies to draw a setting of the context. |
||||||||||||||||||||||||||||||||||||||
M_GLOBAL_FRAME |
Specifies to draw the global frame of the context. |
Header | Include mil.h. |
Library | Use mil.lib; milmetrol.lib. |
DLL | Requires mil.dll; milmetrol.dll. |