Skip to content

smallest_sphere_object_model_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dsmallest_sphere_object_model_3dT_smallest_sphere_object_model_3d🔗

Short description🔗

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

Signature🔗

smallest_sphere_object_model_3d( object_model_3d ObjectModel3D, out number CenterPoint, out number Radius )void SmallestSphereObjectModel3d( const HTuple& ObjectModel3D, HTuple* CenterPoint, HTuple* Radius )static void HOperatorSet.SmallestSphereObjectModel3d( HTuple objectModel3D, out HTuple centerPoint, out HTuple radius )def smallest_sphere_object_model_3d( object_model_3d: MaybeSequence[HHandle] ) -> Tuple[Sequence[float], Sequence[float]]

def smallest_sphere_object_model_3d_s( object_model_3d: MaybeSequence[HHandle] ) -> Tuple[Sequence[float], float]Herror T_smallest_sphere_object_model_3d( const Htuple ObjectModel3D, Htuple* CenterPoint, Htuple* Radius )

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

HTuple HObjectModel3D::SmallestSphereObjectModel3d( double* Radius ) const

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

HTuple HObjectModel3D.SmallestSphereObjectModel3d( out double radius )

Description🔗

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

Execution information🔗

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🔗

ObjectModel3DobjectModel3Dobject_model_3d (input_control) object_model_3d(-array) → (handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Handle of the 3D object model.

CenterPointcenterPointcenter_point (output_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

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

Number of elements: CenterPoint == 3*ObjectModel3D

Radiusradiusradius (output_control) number(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (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_3dSmallestSphereObjectModel3d returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

connection_object_model_3dConnectionObjectModel3d

Possible successors

gen_sphere_object_model_3dGenSphereObjectModel3d

See also

smallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3d

Module🔗

3D Metrology