connection_object_model_3d — Determine the connected components of the 3D object model.
connection_object_model_3d determines the connected components of the input 3D object model given in ObjectModel3D. The decision if two parts of the 3D object model are connected can be based on different attributes and respective distance functions. The attribute and distance function can be selected in Feature:
The euclidean distance between the point coordinates of the set of the 3D points are tested. For any distance below Value the points are considered as connected.
The angles between the normals of the points in the 3D object model are compared. Similar normals are considered as connected if their angular distance is below Value. Value is specified in radians and should be between 0 and pi.
Prerequisite: The 3D object model must contain normals, which can be computed with surface_normals_object_model_3d.
The mapping measures the distance between the pixel coordinates of points in the 3D object model that are stored in the 2D mapping. Use a value larger than 1.5 for Value to get a connection in an 8-neighborhood in the image.
Prerequisite: The 3D object model must contain a 2D mapping, which is available if the 3D object model has been created with xyz_to_object_model_3d.
Returns parts of the 3D object model that are connected with triangles or polygons. Value is ignored.
Prerequisite: The 3D object model must provide a triangulation, which can be obtained with triangulate_object_model_3d. Alternatively, if the 3D object model already contains a 2D mapping, prepare_object_model_3d can be used with Purpose set to 'segmentation' to quickly triangulate the 3D object model.
Returns parts of the object model that are connected by lines. Value is ignored.
Prerequisite: The 3D object model must contain polylines, which can be computed with intersect_plane_object_model_3d.
Alternatively, the required attributes can be set manually with set_object_model_3d_attrib or set_object_model_3d_attrib_mod. Note that the 3D object model might already contain the required attribute, especially if the 3D object model has been read with read_object_model_3d or if it has been deserialized with deserialize_object_model_3d. To check whether the required attribute is available, use get_object_model_3d_params.
This operator supports cancelling timeouts.
Handle of the 3D object model.
Attribute used to calculate the connected components.
Default value: 'distance_3d'
List of values: 'angle', 'distance_3d', 'distance_mapping', 'lines', 'mesh'
Maximum value for the distance between two connected components.
Default value: 1.0
Suggested values: 1.0, 1.1, 1.5, 10.0, 100.0
Handle of the 3D object models that represent the connected components.
gen_object_model_3d_from_points (rand(100), rand(100),\ rand(100), ObjectModel3D) connection_object_model_3d (ObjectModel3D, 'distance_3d', 0.2,\ ObjectModel3DConnected) dev_get_window (WindowHandle) visualize_object_model_3d (WindowHandle, [ObjectModel3DConnected], , ,\ ['colored'], , , , , PoseOut)
connection_object_model_3d returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.
read_object_model_3d, xyz_to_object_model_3d, select_points_object_model_3d