Operator Reference

max_diameter_object_model_3dT_max_diameter_object_model_3dMaxDiameterObjectModel3dMaxDiameterObjectModel3dmax_diameter_object_model_3d (Operator)

max_diameter_object_model_3dT_max_diameter_object_model_3dMaxDiameterObjectModel3dMaxDiameterObjectModel3dmax_diameter_object_model_3d — Calculate the maximal diameter of a 3D object model.

Signature

max_diameter_object_model_3d( : : ObjectModel3D : Diameter)

Herror T_max_diameter_object_model_3d(const Htuple ObjectModel3D, Htuple* Diameter)

void MaxDiameterObjectModel3d(const HTuple& ObjectModel3D, HTuple* Diameter)

static HTuple HObjectModel3D::MaxDiameterObjectModel3d(const HObjectModel3DArray& ObjectModel3D)

double HObjectModel3D::MaxDiameterObjectModel3d() const

static void HOperatorSet.MaxDiameterObjectModel3d(HTuple objectModel3D, out HTuple diameter)

static HTuple HObjectModel3D.MaxDiameterObjectModel3d(HObjectModel3D[] objectModel3D)

double HObjectModel3D.MaxDiameterObjectModel3d()

def max_diameter_object_model_3d(object_model_3d: MaybeSequence[HHandle]) -> Sequence[float]

def max_diameter_object_model_3d_s(object_model_3d: MaybeSequence[HHandle]) -> float

Description

max_diameter_object_model_3dmax_diameter_object_model_3dMaxDiameterObjectModel3dMaxDiameterObjectModel3dmax_diameter_object_model_3d calculates the maximal diameter of the 3D object model by calculating the convex hull of the object and searching for the pair of points on the convex hull with the largest distance.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

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

Handle of the 3D object model.

DiameterDiameterDiameterdiameterdiameter (output_control)  number(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Calculated diameter.

Number of elements: Diameter == ObjectModel3D

Example (HDevelop)

gen_object_model_3d_from_points (rand(200), rand(200),\
                                    rand(200), ObjectModel3D)
max_diameter_object_model_3d (ObjectModel3D, Diameter)

Result

max_diameter_object_model_3dmax_diameter_object_model_3dMaxDiameterObjectModel3dMaxDiameterObjectModel3dmax_diameter_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_3dReadObjectModel3dReadObjectModel3dread_object_model_3d, connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dconnection_object_model_3d

Possible Successors

select_object_model_3dselect_object_model_3dSelectObjectModel3dSelectObjectModel3dselect_object_model_3d

See also

volume_object_model_3d_relative_to_planevolume_object_model_3d_relative_to_planeVolumeObjectModel3dRelativeToPlaneVolumeObjectModel3dRelativeToPlanevolume_object_model_3d_relative_to_plane, area_object_model_3darea_object_model_3dAreaObjectModel3dAreaObjectModel3darea_object_model_3d, moments_object_model_3dmoments_object_model_3dMomentsObjectModel3dMomentsObjectModel3dmoments_object_model_3d

Module

3D Metrology