moments_object_model_3dT_moments_object_model_3dMomentsObjectModel3dMomentsObjectModel3d (Operator)

Name

moments_object_model_3dT_moments_object_model_3dMomentsObjectModel3dMomentsObjectModel3d — Calculates the mean or the central moment of second order for a 3D object model.

Signature

moments_object_model_3d( : : ObjectModel3D, MomentsToCalculate : Moments)

Herror T_moments_object_model_3d(const Htuple ObjectModel3D, const Htuple MomentsToCalculate, Htuple* Moments)

void MomentsObjectModel3d(const HTuple& ObjectModel3D, const HTuple& MomentsToCalculate, HTuple* Moments)

static HTuple HObjectModel3D::MomentsObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& MomentsToCalculate)

double HObjectModel3D::MomentsObjectModel3d(const HString& MomentsToCalculate) const

double HObjectModel3D::MomentsObjectModel3d(const char* MomentsToCalculate) const

double HObjectModel3D::MomentsObjectModel3d(const wchar_t* MomentsToCalculate) const   (Windows only)

static void HOperatorSet.MomentsObjectModel3d(HTuple objectModel3D, HTuple momentsToCalculate, out HTuple moments)

static HTuple HObjectModel3D.MomentsObjectModel3d(HObjectModel3D[] objectModel3D, HTuple momentsToCalculate)

double HObjectModel3D.MomentsObjectModel3d(string momentsToCalculate)

Description

moments_object_model_3dmoments_object_model_3dMomentsObjectModel3dMomentsObjectModel3dMomentsObjectModel3d calculates the mean or the central moment of second order for a 3D object model. To calculate the mean of the points of the 3D object model, select 'mean_points'"mean_points""mean_points""mean_points""mean_points" in MomentsToCalculateMomentsToCalculateMomentsToCalculateMomentsToCalculatemomentsToCalculate. If instead the central moment of second order should be calculated, select 'central_moment_2_points'"central_moment_2_points""central_moment_2_points""central_moment_2_points""central_moment_2_points". The results are the variances of the x, y, z, x-y, x-z, and y-z axes. To compute the three principal axes of the 3D object model select 'principal_axes'"principal_axes""principal_axes""principal_axes""principal_axes" in MomentsToCalculateMomentsToCalculateMomentsToCalculateMomentsToCalculatemomentsToCalculate. The result is a pose with the mean of the points as center. The coordinate system that corresponds to the pose has the x-axis along the first principal axis, the y-axis along the second principal axis and the z-axis along the third principal axis.

Execution Information

Parameters

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D (input_control)  object_model_3d(-array) HObjectModel3D, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D object model.

MomentsToCalculateMomentsToCalculateMomentsToCalculateMomentsToCalculatemomentsToCalculate (input_control)  number(-array) HTupleHTupleHtuple (string) (string) (HString) (char*)

Moment to calculate.

Default value: 'mean_points' "mean_points" "mean_points" "mean_points" "mean_points"

List of values: 'central_moment_2_points'"central_moment_2_points""central_moment_2_points""central_moment_2_points""central_moment_2_points", 'mean_points'"mean_points""mean_points""mean_points""mean_points", 'principal_axes'"principal_axes""principal_axes""principal_axes""principal_axes"

MomentsMomentsMomentsMomentsmoments (output_control)  number(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Calculated moment.

Number of elements: Moments == ObjectModel3D

Example (HDevelop)

gen_object_model_3d_from_points (rand(200), rand(200),\
                                  rand(200), ObjectModel3D)
moments_object_model_3d (ObjectModel3D, ['mean_points',\
                         'central_moment_2_points','principal_axes'], \
                         Moments)

Result

moments_object_model_3dmoments_object_model_3dMomentsObjectModel3dMomentsObjectModel3dMomentsObjectModel3d returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3d, connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dConnectionObjectModel3d

Possible Successors

project_object_model_3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3dProjectObjectModel3d, object_model_3d_to_xyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyzObjectModel3dToXyz

See also

volume_object_model_3d_relative_to_planevolume_object_model_3d_relative_to_planeVolumeObjectModel3dRelativeToPlaneVolumeObjectModel3dRelativeToPlaneVolumeObjectModel3dRelativeToPlane

Module

3D Metrology