moments_object_model_3dT_moments_object_model_3dMomentsObjectModel3dMomentsObjectModel3dmoments_object_model_3d (Operator)

Name

moments_object_model_3dT_moments_object_model_3dMomentsObjectModel3dMomentsObjectModel3dmoments_object_model_3d — 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)

def moments_object_model_3d(object_model_3d: MaybeSequence[HHandle], moments_to_calculate: MaybeSequence[str]) -> Sequence[float]

def moments_object_model_3d_s(object_model_3d: MaybeSequence[HHandle], moments_to_calculate: MaybeSequence[str]) -> float

Description

moments_object_model_3dmoments_object_model_3dMomentsObjectModel3dMomentsObjectModel3dMomentsObjectModel3dmoments_object_model_3d 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""mean_points" in MomentsToCalculateMomentsToCalculateMomentsToCalculateMomentsToCalculatemomentsToCalculatemoments_to_calculate. 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""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""principal_axes" in MomentsToCalculateMomentsToCalculateMomentsToCalculateMomentsToCalculatemomentsToCalculatemoments_to_calculate. 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

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d (input_control)  object_model_3d(-array) HObjectModel3D, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D object model.

MomentsToCalculateMomentsToCalculateMomentsToCalculateMomentsToCalculatemomentsToCalculatemoments_to_calculate (input_control)  number(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Moment to calculate.

Default: 'mean_points' "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""central_moment_2_points", 'mean_points'"mean_points""mean_points""mean_points""mean_points""mean_points", 'principal_axes'"principal_axes""principal_axes""principal_axes""principal_axes""principal_axes"

MomentsMomentsMomentsMomentsmomentsmoments (output_control)  number(-array) HTupleSequence[float]HTupleHtuple (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_3dMomentsObjectModel3dMomentsObjectModel3dMomentsObjectModel3dmoments_object_model_3d returns 2 ( H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3dread_object_model_3d, connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dConnectionObjectModel3dconnection_object_model_3d

Possible Successors

project_object_model_3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3dProjectObjectModel3dproject_object_model_3d, object_model_3d_to_xyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyzObjectModel3dToXyzobject_model_3d_to_xyz

See also

volume_object_model_3d_relative_to_planevolume_object_model_3d_relative_to_planeVolumeObjectModel3dRelativeToPlaneVolumeObjectModel3dRelativeToPlaneVolumeObjectModel3dRelativeToPlanevolume_object_model_3d_relative_to_plane

Module

3D Metrology