3D geometry objects must be allocated and defined before using them as a source in other 3D modules.
The following steps provide a basic methodology for defining 3D geometry objects.
Allocate a 3D geometry object on the specified system, using M3dgeoAlloc() with M_GEOMETRY.
Define the geometry of the object by calling one of the 3D geometry definition functions (for example, M3dgeoBox() or M3dgeoCylinder()); see the 3D geometry objects subsection of this section. You can also copy a geometry result into the 3D geometry object to define it (for example, M3dimCopyResult() with M_BOUNDING_BOX).
If necessary, manipulate the defined geometry object using the 3D Image Processing module. You can translate, rotate, scale, or otherwise transform the geometry using M3dimTranslate(), M3dimRotate(), M3dimScale(), or M3dimMatrixTransform(), respectively.
Pass the 3D geometry object to a function that can take one (for example, M3dmetDistance() or M3dimCrop()).
Free the 3D geometry object, using M3dgeoFree().
The following table lists all 3D geometries that you can define; it also indicates the M3dgeo...() functions that you can use to define them.
Geometry name 
Example 
Geometry definition function 
Box 

M3dgeoBox() 
Cylinder 

M3dgeoCylinder() 
Line 

M3dgeoLine() 
Plane 

M3dgeoPlane() 
Sphere 

M3dgeoSphere() 