smallest_sphere_object_model_3dT_smallest_sphere_object_model_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dsmallest_sphere_object_model_3d (Operator)
Name
smallest_sphere_object_model_3dT_smallest_sphere_object_model_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dsmallest_sphere_object_model_3d
— Calculate the smallest sphere around the points of a 3D object model.
Signature
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]
Description
smallest_sphere_object_model_3dsmallest_sphere_object_model_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dsmallest_sphere_object_model_3d
calculates the smallest sphere
around the points of the 3D object model given by
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d
. The resulting center will be stored as x-, y-, and
z-coordinates in
CenterPointCenterPointCenterPointCenterPointcenterPointcenter_point
as 3 values representing X, Y, and Z.
The Radius is given in RadiusRadiusRadiusRadiusradiusradius
.
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
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d
(input_control) object_model_3d(-array) →
HObjectModel3D, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D object model.
CenterPointCenterPointCenterPointCenterPointcenterPointcenter_point
(output_control) number-array →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
x-, y-, and z-coordinates
describing the center point of the sphere.
Number of elements: CenterPoint == 3 * ObjectModel3D
RadiusRadiusRadiusRadiusradiusradius
(output_control) number(-array) →
HTupleSequence[float]HTupleHtuple (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_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dsmallest_sphere_object_model_3d
returns TRUE if all parameters
are correct. If necessary, an exception is raised.
Possible Predecessors
connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dConnectionObjectModel3dconnection_object_model_3d
Possible Successors
gen_sphere_object_model_3dgen_sphere_object_model_3dGenSphereObjectModel3dGenSphereObjectModel3dGenSphereObjectModel3dgen_sphere_object_model_3d
See also
smallest_bounding_box_object_model_3dsmallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dsmallest_bounding_box_object_model_3d
Module
3D Metrology