Operators |
copy_object_model_3d — Copy a 3D object model.
copy_object_model_3d( : : ObjectModel3D, Attributes : CopiedObjectModel3D)
A 3D object model consists of a set of attributes. The operator copy_object_model_3d creates a new 3D object model and copies the selected attributes of the input 3D object model to this new output 3D object model. The input 3D object model is defined by a handle ObjectModel3D. The operator returns the handle CopiedObjectModel3D of the new 3D object model. The operator can be used to save memory space by removing not needed attributes. Access to the attributes of the 3D object model is possible, e.g., with the operator get_object_model_3d_params.
The parameter Attributes determines which attributes should should be copied. In addition, attributes can be excluded from copying by using the prefix ~.
Note that because a 3D object model itself consists of a set of attributes, even the point coordinates are an attribute of the model. This means, that at least this one attribute must be selected for copy_object_model_3d else the object model to be copied would be empty. So if only a 3D object model representing a point cloud shall be copied without further attributes, Attributes must be set to 'point_coord' . If an attribute to be copied is not available or no attribute is selected, an exception is raised.
The following values for the parameter Attributes are possible:
This value specifies that the attribute with the 3D point coordinates is copied.
This value specifies that the attribute with the 3D point normals and the attribute with the 3D point coordinates are copied.
This value specifies that the attribute with the face triangles and attribute with the 3D point coordinates are copied.
This value specifies that the attribute with the face polygons and the attribute with the 3D point coordinates are copied.
This value specifies that the attribute with the lines and the attribute with the 3D point coordinates are copied.
This value specifies that the attribute with the mapping to image coordinates and the attribute with the 3D point coordinates are copied.
This value specifies that all extended attributes are copied. If it is necessary to copy further attributes that are related to the extended attributes, these attributes are copied, too. These further attributes could be, e.g., 3D point coordinates, face triangles, face polygons, or lines.
This value specifies that the attribute with the parameters of the primitive (including an empty primitive) is copied (e.g., obtained from the operator fit_primitives_object_model_3d).
This value specifies that the attribute with the primitive plane is copied (e.g., obtained from the operator fit_primitives_object_model_3d).
This value specifies that the attribute with the primitive sphere is copied (e.g., obtained from the operator fit_primitives_object_model_3d).
This value specifies that the attribute with the primitive cylinder is copied (e.g., obtained from the operator fit_primitives_object_model_3d).
This value specifies that the attribute with the primitive cylinder is copied.
This value specifies that the attribute with the prepared shape model for shape-based 3D matching is copied.
This value specifies that the attribute with the distance computation data structure is copied. The distance computation data can be created with prepare_object_model_3d, and can be used with distance_object_model_3d. If this attribute is selected, then the corresponding target data attribute of the distance computation is copied as well. For example, if the distance computation was prepared for triangles, the triangles and the vertices are copied.
This value specifies that the data for surface based matching are copied. The attributes with the 3D point coordinates and the attribute with the point normals are copied. If the attribute with point normals is not available, the attribute with the mapping from the 3D point coordinates to the image coordinates is copied. If the attribute with the mapping from the 3D point coordinates to the image coordinates is not available, the attribute with the face triangles is copied. If the attribute with face triangles is not available, too, the attribute with the face polygons is copied. If none of these attributes is available, an exception is raised.
This value specifies that the data for a 3D segmentation is copied. The attributes with the 3D point coordinates and the attribute with the face triangles are copied. If the attribute with the face triangles is not available, the attribute with the mapping from the 3D point coordinates to the image coordinates is copied. If none of these attributes is available, an exception is raised.
This value specifies that the attribute with the scores and the attribute with the 3D point coordinates are copied. Scores may be obtained from the operator reconstruct_surface_stereo.
This value specifies that the attribute containing the red color and the attribute with the 3D point coordinates are copied.
This value specifies that the attribute containing the green color and the attribute with the 3D point coordinates are copied.
This value specifies that the attribute containing the blue color and the attribute with the 3D point coordinates are copied.
This value specifies that all available attributes are copied. That is, the attributes are the point coordinates, the point normals, the face triangles, the face polygons, the mapping to image coordinates, the shape model for matching, and the parameter of a primitive.
Handle of the input 3D object model.
Attributes to be copied.
Default value: 'all'
List of values: 'all' , 'blue' , 'distance_computation_data' , 'extended_attribute' , 'face_polygon' , 'face_triangle' , 'green' , 'point_coord' , 'point_normal' , 'primitive_box' , 'primitive_cylinder' , 'primitive_plane' , 'primitive_sphere' , 'primitives_all' , 'red' , 'score' , 'segmentation_data' , 'shape_based_matching_3d_data' , 'surface_based_matching_data' , 'xyz_mapping'
Handle of the copied 3D object model.
copy_object_model_3d returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.
read_object_model_3d, xyz_to_object_model_3d
3D Metrology
Operators |