smallest_sphere_object_model_3dT_smallest_sphere_object_model_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3d (Operator)

Name

smallest_sphere_object_model_3dT_smallest_sphere_object_model_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3d — Calculate the smallest sphere around the points of a 3D object model.

Signature

smallest_sphere_object_model_3d( : : ObjectModel3D : CenterPoint, Radius)

Herror T_smallest_sphere_object_model_3d(const Htuple ObjectModel3D, Htuple* CenterPoint, Htuple* Radius)

void SmallestSphereObjectModel3d(const HTuple& ObjectModel3D, HTuple* CenterPoint, HTuple* Radius)

static HTuple HObjectModel3D::SmallestSphereObjectModel3d(const HObjectModel3DArray& ObjectModel3D, HTuple* Radius)

HTuple HObjectModel3D::SmallestSphereObjectModel3d(double* Radius) const

static void HOperatorSet.SmallestSphereObjectModel3d(HTuple objectModel3D, out HTuple centerPoint, out HTuple radius)

static HTuple HObjectModel3D.SmallestSphereObjectModel3d(HObjectModel3D[] objectModel3D, out HTuple radius)

HTuple HObjectModel3D.SmallestSphereObjectModel3d(out double radius)

Description

smallest_sphere_object_model_3dsmallest_sphere_object_model_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dSmallestSphereObjectModel3d calculates the smallest sphere around the points of the 3D object model given by ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D. The resulting center will be stored as x-, y-, and z-coordinates in CenterPointCenterPointCenterPointCenterPointcenterPoint as 3 values representing X, Y, and Z. The Radius is given in RadiusRadiusRadiusRadiusradius.

Execution Information

Parameters

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

Handle of the 3D object model.

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

x-, y-, and z-coordinates describing the center point of the sphere.

Number of elements: CenterPoint == 3 * ObjectModel3D

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

The estimated radius of the sphere.

Number of elements: Radius == ObjectModel3D

Example (HDevelop)

gen_object_model_3d_from_points (rand(20), rand(20), rand(20),\
                                 ObjectModel3D)
smallest_sphere_object_model_3d(ObjectModel3D, CenterPoint, Radius)
gen_sphere_object_model_3d_center (CenterPoint[0], CenterPoint[1], \
                                   CenterPoint[2], Radius, ObjectModel3D1)
dev_get_window (WindowHandle)
visualize_object_model_3d (WindowHandle, [ObjectModel3D,ObjectModel3D1], \
                           [], [], ['alpha_1'], [0.5], [], [], [], PoseOut)

Result

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

Possible Predecessors

connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dConnectionObjectModel3d

Possible Successors

gen_sphere_object_model_3dgen_sphere_object_model_3dGenSphereObjectModel3dGenSphereObjectModel3dGenSphereObjectModel3d

See also

smallest_bounding_box_object_model_3dsmallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3d

Module

3D Metrology