Skip to main content

M3dgeoConstruct

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Construct a 3D geometry from other geometries.

Syntax

void M3dgeoConstruct(
AIL_ID Src1Geometry3dgeoId, //in
AIL_ID Src2Geometry3dgeoId, //in
AIL_ID DstGeometry3dgeoId, //out
AIL_INT GeometryType, //in
AIL_INT64 Operation, //in
AIL_DOUBLE Param, //in
AIL_INT64 ControlFlag //in
)

Description

This function constructs a new 3D geometry using the geometry from one or two source 3D geometries. You can construct a box, a cylinder, a line, a plane, a point, or a sphere.

Parameters

Src1Geometry3dgeoId (in, AIL_ID)

Specifies the first source 3D geometry object.

For specifying the first source 3D geometry

ValueDescription
M_XY_PLANESpecifies the XY (Z=0) plane.
3D geometry object identifierSpecifies the identifier of a 3D geometry object. The 3D geometry object must have been previously allocated using M3dgeoAlloc with M_GEOMETRY, and must have been successfully defined.

Src2Geometry3dgeoId (in, AIL_ID)

Specifies the second source 3D geometry object. If a second source is not required, set this parameter toM_NULL.

For specifying the second source 3D geometry

ValueDescription
M_XY_PLANESpecifies the XY (Z=0) plane.
3D geometry object identifierSpecifies the identifier of a 3D geometry object. The 3D geometry object must have been previously allocated using M3dgeoAlloc with M_GEOMETRY, and must have been successfully defined.

DstGeometry3dgeoId (out, AIL_ID)

Specifies the identifier of the destination 3D geometry object, previously allocated using M3dgeoAlloc with M_GEOMETRY.

GeometryType (in, AIL_INT)

Specifies the type of 3D geometry to construct.

Operation (in, AIL_INT64)

Specifies how to construct the 3D geometry.

Param (in, AIL_DOUBLE)

Specifies a scalar value for certain operations, where required. Set this parameter to M_DEFAULT if not used.

ControlFlag (in, AIL_INT64)

Reserved for future expansion and must be set to M_DEFAULT.

Parameter Associations

For specifying the type of geometry to construct

Set unused parameters to M_DEFAULT.


M_BOX

Specifies to construct a box.

ValueDescription
M_BOTH_CORNERSConstructs the box using two opposite corners. Src1Geometry3dgeoId and Src2Geometry3dgeoId must be defined as points.

M_CYLINDER

Specifies to construct a cylinder.

ValueDescription
M_AXISConstructs a cylinder using a central axis and a radius. Src1Geometry3dgeoId determines the central axis and must be defined as a line.
M_FLIPConstructs a cylinder by flipping the specified cylinder in on itself by swapping its start and end points. Src1Geometry3dgeoId must be defined as a cylinder.
M_TWO_POINTSConstructs a cylinder using two points and a radius. Src1Geometry3dgeoId and Src2Geometry3dgeoId must be defined as points.
M_DEFAULTSpecifies that this parameter is not used.
Value >= 0.0Sets the radius of the cylinder.

M_LINE

Specifies to construct a line.

ValueDescription
M_AXISConstructs a line on the specified cylinder's central axis; the line will have the same length as the cylinder. Src1Geometry3dgeoId must be defined as a cylinder.
M_EDGEConstructs a line on the specified edge of the source box geometry. The line will have the same length as the edge. Src1Geometry3dgeoId must be defined as a box.
M_FLIPConstructs a line by flipping the specified line in on itself by swapping its start and end points. Src1Geometry3dgeoId must be defined as a line.
M_NORMALConstructs a unit line parallel to the plane's normal. Src1Geometry3dgeoId must be defined as a plane, and Src2Geometry3dgeoId must be defined as a point or M_NULL. If Src2Geometry3dgeoId is M_NULL, the line passes through the closest point to the origin; otherwise, it passes throughSrc2Geometry3dgeoId.
M_TWO_POINTSConstructs a finite line from two points. Src1Geometry3dgeoId and Src2Geometry3dgeoId must be defined as points.
M_DEFAULTSpecifies that this parameter is not used.
0 <= Value <= 11Sets the edge along which to construct the line. The edges are assigned the following indices upon initially defining the box, based on the edge's position with respect to the axes of the working coordinate system. The index of an edge does not change based on the orientation of the box. [Image: Edge_Construction.png]

M_PLANE

Specifies to construct a plane.

ValueDescription
M_FACEConstructs a plane passing through the face of a box or cylinder. The plane's normal always points outside the geometry. Src1Geometry3dgeoId must be defined as a box or cylinder. Use Param to specify the box's face or cylinder's base. For infinite cylinders, set Param to 0, which constructs the plane at the cylinder's start point, perpendicular to its central axis.
M_FLIPConstructs a plane by flipping the specified plane in on itself by inverting its normal vector. Src1Geometry3dgeoId must be defined as a plane.
M_LINE_AND_POINTConstructs a plane passing through the specified line and point. Src1Geometry3dgeoId must be defined as a line, and Src2Geometry3dgeoId must be defined as a point. You can use M_LINE_AND_POINT to construct a plane from 3 points if you first construct a line using two of the points (M_TWO_POINTS).
M_NORMALConstructs a plane with a normal vector that coincides with the specified line. Src1Geometry3dgeoId must be defined as a line, and Src2Geometry3dgeoId must be defined as a point or M_NULL. The plane passes through the specified point (Src2Geometry3dgeoId); otherwise, the plane passes through the line's start point.
M_DEFAULTSpecifies that this parameter is not used.
0Specifies that the plane passes through the start point of the infinite cylinder.
0 <= Value <= 1Specifies either the first (0) or the second (1) circular base of the cylinder.
0 <= Value <= 5Specifies the face of the box. The faces are assigned the following indices upon initially defining the box, based on the face's position with respect to the axes of the working coordinate system. The index of a face does not change based on the orientation of the box. [Image: box_faces.png] To inquire the box's minimum and maximum coordinates, use M3dgeoInquire with M_UNROTATED_....

M_POINT

Specifies to construct a point.

ValueDescription
M_CENTERConstructs a point at the center of the specified 3D geometry. Src1Geometry3dgeoId must be defined as a box, finite cylinder, finite line, point, or sphere.
M_CLOSEST_TO_ORIGINConstructs a point on the plane such that the point is closest to the origin. Src1Geometry3dgeoId must be defined as a plane.
M_CORNERConstructs a point at the specified corner of the box. Src1Geometry3dgeoId must be defined as a box.
M_END_POINTConstructs a point at the end point of a finite line or a finite cylinder. Src1Geometry3dgeoId must be defined as a finite line or finite cylinder.
M_START_POINTConstructs a point at the start point of a line or cylinder. Src1Geometry3dgeoId must be defined as a line or cylinder.
M_DEFAULTSpecifies that this parameter is not used.
0 <= Value <= 7Specifies the box corner.[Image: 3dgeo_box.png]

M_SPHERE

Specifies to construct a sphere.

ValueDescription
M_CENTER_AND_RADIUSConstructs a sphere using a center point and a radius. Src1Geometry3dgeoId must be defined as a point.
M_DIAMETERConstructs a sphere using two antipodal points. Src1Geometry3dgeoId and Src2Geometry3dgeoId must be defined as points.
M_DEFAULTSpecifies that this parameter is not used.
Value >= 0.0Sets the radius of the sphere.
Copyright © 2026 Zebra Technologies.