| Customize Help
| Save Settings

M3dgeoBox



Function Map
Synopsis
Define a 3D box geometry object.
Syntax
void M3dgeoBox(
MIL_ID Geometry3dgeoId, //in
MIL_INT64 CreationMode, //in
MIL_DOUBLE XPos1, //in
MIL_DOUBLE YPos1, //in
MIL_DOUBLE ZPos1, //in
MIL_DOUBLE XPos2OrLength, //in
MIL_DOUBLE YPos2OrLength, //in
MIL_DOUBLE ZPos2OrLength, //in
MIL_INT64 ControlFlag //in
)
Description

This function defines an axis-aligned, 3D box geometry object. You can get or set the 3D box orientation using M3dgeoCopy(). You can translate, rotate, scale, or transform the resulting box, using the 3D image processing module.

You can use the resulting box to, for example, crop a point cloud or perform an arithmetic operation on a depth map using the 3D image processing module, or calculate its distance from each point in a point cloud using the 3D metrology module.

If you want to define a box geometry object from results obtained in a different module, you can use the copy function of that module.

All coordinates are expressed in world units in the working coordinate system.

Note that if Geometry3dgeoId specifies a previously-defined box, and CreationMode is set to M_CENTER_AND_DIMENSION, you can leave some of the box's attributes unchanged, even if that attribute was set using a different creation mode or was modified using the 3D image processing module. Unless you specify M_ORIENTATION_UNCHANGED, its orientation will be reset to the identity matrix.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
Geometry3dgeoId

Specifies the identifier of the 3D geometry object, previously allocated on the required system using M3dgeoAlloc() with M_GEOMETRY.

CreationMode

Specifies how the box is defined.

See the Parameter associations section for possible values that can be specified.

XPos1

Specifies the X-coordinate of the first point used to define the box.

See the Parameter associations section for possible values that can be specified.

YPos1

Specifies the Y-coordinate of the first point used to define the box.

See the Parameter associations section for possible values that can be specified.

ZPos1

Specifies the Z-coordinate of the first point used to define the box.

See the Parameter associations section for possible values that can be specified.

XPos2OrLength

Specifies the X-coordinate of the second point used to define the box, or the length of the box along the X-axis.

See the Parameter associations section for possible values that can be specified.

YPos2OrLength

Specifies the Y-coordinate of the second point used to define the box, or the length of the box along the Y-axis.

See the Parameter associations section for possible values that can be specified.

ZPos2OrLength

Specifies the Z-coordinate of the second point used to define the box, or the length of the box along the Z-axis.

See the Parameter associations section for possible values that can be specified.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

The table below lists possible values for the CreationMode, XPos1, YPos1, ZPos1, XPos2OrLength, YPos2OrLength, and ZPos2OrLength parameters.

function map For specifying the box INQ
Click to summarize
CreationMode
Description
XPos1
YPos1
ZPos1
XPos2OrLength
YPos2OrLength
ZPos2OrLength
Click to summarize M_BOTH_CORNERS

Defines the box using any two opposite corners.

(summarize)
Click to summarize XPos1

Specifies the X-coordinate of the first corner of the box.

Click to summarize YPos1

Specifies the Y-coordinate of the first corner of the box.

Click to summarize ZPos1

Specifies the Z-coordinate of the first corner of the box.

Click to summarize XPos2OrLength

Specifies the X-coordinate of the second corner of the box, opposite to the first corner.

Click to summarize YPos2OrLength

Specifies the Y-coordinate of the second corner of the box, opposite to the first corner.

Click to summarize ZPos2OrLength

Specifies the Z-coordinate of the second corner of the box, opposite to the first corner.

Click to summarize M_CENTER_AND_DIMENSION +

Defines the box by its center point and its length along each axis.

You can determine the coordinates of the corners of the box by taking a coordinate from the center point and adding or subtracting half the box's length, along the coordinate's axis. For example, the Y-coordinates of the corners of the box are YPos1 ± (YPos2OrLength /2). You can also use M3dgeoInquire() with M_CORNER_....

Note that the box's size along each axis, M_SIZE_X, M_SIZE_Y, and M_SIZE_Z, will be the absolute values of the corresponding lengths specified by XPos2OrLength, YPos2OrLength, and ZPos2OrLength.

Note that if Geometry3dgeoId specifies a previously-defined box, you can leave some of its attributes unchanged, even if that attribute was set using a different creation mode or was modified using the 3D image processing module. To do so, set the corresponding parameter to M_UNCHANGED.

(summarize)
Click to summarize XPos1

Specifies the X-coordinate of the center of the box.

(summarize)
Click to summarize M_UNCHANGED

Specifies to use the previously-defined value.

Click to summarize Value

Specifies the box center's X-coordinate.

Click to summarize YPos1

Specifies the Y-coordinate of the center of the box.

(summarize)
Click to summarize M_UNCHANGED

Specifies to use the previously-defined value.

Click to summarize Value

Specifies the box center's Y-coordinate.

Click to summarize ZPos1

Specifies the Z-coordinate of the center of the box.

(summarize)
Click to summarize M_UNCHANGED

Specifies to use the previously-defined value.

Click to summarize Value

Specifies the box center's Z-coordinate.

Click to summarize XPos2OrLength

Specifies the length of the box along the X-axis.

(summarize)
Click to summarize M_UNCHANGED

Specifies to use the previously-defined value.

Click to summarize Value

Specifies the box's length along the X-axis.

Click to summarize YPos2OrLength

Specifies the length of the box along the Y-axis.

(summarize)
Click to summarize M_UNCHANGED

Specifies to use the previously-defined value.

Click to summarize Value

Specifies the box's length along the Y-axis.

Click to summarize ZPos2OrLength

Specifies the length of the box along the Z-axis.

(summarize)
Click to summarize M_UNCHANGED

Specifies to use the previously-defined value.

Click to summarize Value

Specifies the box's length along the Z-axis.

Click to summarize M_CORNER_AND_DIMENSION

Defines the box by one of its corners and its length (or negative length) along each axis.

A positive value for length extends the box in the direction of the positive axis, starting from the specified corner point. A negative value extends the box in the direction of the negative axis, starting at the specified corner point. For example, if the specified corner is (1, 1, 1) and the value of the X, Y, and Z lengths are all positive 3 (a cube), the coordinates of the corner opposite the specified corner would be (4, 4, 4). If the X length was -3, while the other two lengths remained positive 3 (still a cube), the coordinates of the corner opposite the specified corner would be (-2, 4, 4).

Note that the box's size along each axis, M_SIZE_X, M_SIZE_Y, and M_SIZE_Z, will be the absolute values of the corresponding lengths specified by XPos2OrLength, YPos2OrLength, and ZPos2OrLength.

(summarize)
Click to summarize XPos1

Specifies the X-coordinate of one corner of the box.

Click to summarize YPos1

Specifies the Y-coordinate of one corner of the box.

Click to summarize ZPos1

Specifies the Z-coordinate of one corner of the box.

Click to summarize XPos2OrLength

Specifies the length of the box along the X-axis.

Click to summarize YPos2OrLength

Specifies the length of the box along the Y-axis.

Click to summarize ZPos2OrLength

Specifies the length of the box along the Z-axis.

Combination value for M_CENTER_AND_DIMENSION.

You can add the following value to the above-mentioned value to specify to leave the orientation of the previously-defined box unchanged.

function map For specifying to leave the orientation unchanged
Click to summarizeCombination value Description
Click to summarize M_ORIENTATION_UNCHANGED

Specifies to leave the orientation of the previously-defined box unchanged.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3d.lib.
DLL Requires mil.dll; mil3d.dll.
BOTH CORNERS CENTER AND DIMENSION UNCHANGED UNCHANGED UNCHANGED UNCHANGED UNCHANGED UNCHANGED CORNER AND DIMENSION ORIENTATION UNCHANGED BOX