smallest_bounding_box_object_model_3dT_smallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dsmallest_bounding_box_object_model_3d (算子名称)
名称
smallest_bounding_box_object_model_3dT_smallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dsmallest_bounding_box_object_model_3d — Calculate the smallest bounding box around the points of a
3D object model.
参数签名
void SmallestBoundingBoxObjectModel3d(const HTuple& ObjectModel3D, const HTuple& Type, HTuple* Pose, HTuple* Length1, HTuple* Length2, HTuple* Length3)
static HPoseArray HObjectModel3D::SmallestBoundingBoxObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Type, HTuple* Length1, HTuple* Length2, HTuple* Length3)
HPose HObjectModel3D::SmallestBoundingBoxObjectModel3d(const HString& Type, double* Length1, double* Length2, double* Length3) const
HPose HObjectModel3D::SmallestBoundingBoxObjectModel3d(const char* Type, double* Length1, double* Length2, double* Length3) const
HPose HObjectModel3D::SmallestBoundingBoxObjectModel3d(const wchar_t* Type, double* Length1, double* Length2, double* Length3) const
(
Windows only)
static void HOperatorSet.SmallestBoundingBoxObjectModel3d(HTuple objectModel3D, HTuple type, out HTuple pose, out HTuple length1, out HTuple length2, out HTuple length3)
static HPose[] HObjectModel3D.SmallestBoundingBoxObjectModel3d(HObjectModel3D[] objectModel3D, string type, out HTuple length1, out HTuple length2, out HTuple length3)
HPose HObjectModel3D.SmallestBoundingBoxObjectModel3d(string type, out double length1, out double length2, out double length3)
def smallest_bounding_box_object_model_3d(object_model_3d: MaybeSequence[HHandle], type: str) -> Tuple[Sequence[Union[int, float]], Sequence[float], Sequence[float], Sequence[float]]
def smallest_bounding_box_object_model_3d_s(object_model_3d: MaybeSequence[HHandle], type: str) -> Tuple[Sequence[Union[int, float]], float, float, float]
描述
smallest_bounding_box_object_model_3dsmallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dsmallest_bounding_box_object_model_3d calculates the smallest
bounding box around the points of a 3D object model.
The resulting bounding box is described using its coordinate system
(PosePosePosePoseposepose), which is oriented such that the longest side of the
box is aligned with the x-axis, the second longest side is aligned with
the y-axis and the smallest side is aligned with the z-axis.
The lengths of the sides are returned in Length1Length1Length1Length1length1length_1,
Length2Length2Length2Length2length2length_2, and Length3Length3Length3Length3length3length_3, in descending order.
The box can be either axis-aligned or oriented, which can be chosen by the
TypeTypeTypeTypetypetype. The algorithm for 'oriented'"oriented""oriented""oriented""oriented""oriented" is
computationally significantly more costly than the algorithm for
'axis_aligned'"axis_aligned""axis_aligned""axis_aligned""axis_aligned""axis_aligned", and returns only an approximation of the
oriented bounding box. Note that the algorithm for the oriented bounding
box is randomized and can return a different box for each call.
In order to retrieve the corners of the 'axis_aligned'"axis_aligned""axis_aligned""axis_aligned""axis_aligned""axis_aligned" box,
该算子 get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParamsGetObjectModel3dParamsget_object_model_3d_params can be used with the
parameter 'bounding_box1'"bounding_box1""bounding_box1""bounding_box1""bounding_box1""bounding_box1".
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- Automatically parallelized on internal data level.
参数表
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d (input_control) object_model_3d(-array) → HObjectModel3D, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D object model.
TypeTypeTypeTypetypetype (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
The method that is used to estimate the
smallest box.
Default:
'oriented'
"oriented"
"oriented"
"oriented"
"oriented"
"oriented"
List of values:
'axis_aligned'"axis_aligned""axis_aligned""axis_aligned""axis_aligned""axis_aligned", 'oriented'"oriented""oriented""oriented""oriented""oriented"
PosePosePosePoseposepose (output_control) pose(-array) → HPose, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
The pose that describes the position and
orientation of the box that is generated.
The pose has its origin in the center of the
box and is oriented such
that the x-axis is aligned with the longest
side of the box.
Length1Length1Length1Length1length1length_1 (output_control) number(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
The length of the longest side of the box.
Number of elements:
Length1 == ObjectModel3D
Length2Length2Length2Length2length2length_2 (output_control) number(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
The length of the second longest side of the
box.
Number of elements:
Length2 == ObjectModel3D
Length3Length3Length3Length3length3length_3 (output_control) number(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
The length of the third longest side of the
box.
Number of elements:
Length3 == ObjectModel3D
例程 (HDevelop)
gen_object_model_3d_from_points (rand(20), rand(20), rand(20), \
ObjectModel3D)
smallest_bounding_box_object_model_3d (ObjectModel3D, 'oriented', \
Pose, Length1, Length2, Length3)
gen_box_object_model_3d (Pose, Length1, Length2, Length3, ObjectModel3D1)
dev_get_window (WindowHandle)
visualize_object_model_3d (WindowHandle, [ObjectModel3D,ObjectModel3D1], \
[], [], ['alpha_1'], [0.5], [], [], [], PoseOut)
结果
smallest_bounding_box_object_model_3dsmallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3dsmallest_bounding_box_object_model_3d returns 2 (
H_MSG_TRUE)
if all parameters
are correct. 如有必要,将引发异常。
可能的前置算子
connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dConnectionObjectModel3dconnection_object_model_3d,
simplify_object_model_3dsimplify_object_model_3dSimplifyObjectModel3dSimplifyObjectModel3dSimplifyObjectModel3dsimplify_object_model_3d
可能的后置算子
gen_box_object_model_3dgen_box_object_model_3dGenBoxObjectModel3dGenBoxObjectModel3dGenBoxObjectModel3dgen_box_object_model_3d
参考其它
smallest_sphere_object_model_3dsmallest_sphere_object_model_3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dSmallestSphereObjectModel3dsmallest_sphere_object_model_3d
模块
3D Metrology