ClassesClasses | | Operators

copy_object_model_3dcopy_object_model_3dCopyObjectModel3dCopyObjectModel3d (Operator)

Name

copy_object_model_3dcopy_object_model_3dCopyObjectModel3dCopyObjectModel3d — Copy a 3D object model.

Signature

copy_object_model_3d( : : ObjectModel3D, Attributes : CopiedObjectModel3D)

Herror copy_object_model_3d(const Hlong ObjectModel3D, const char* Attributes, Hlong* CopiedObjectModel3D)

Herror T_copy_object_model_3d(const Htuple ObjectModel3D, const Htuple Attributes, Htuple* CopiedObjectModel3D)

void CopyObjectModel3d(const HTuple& ObjectModel3D, const HTuple& Attributes, HTuple* CopiedObjectModel3D)

HObjectModel3D HObjectModel3D::CopyObjectModel3d(const HTuple& Attributes) const

HObjectModel3D HObjectModel3D::CopyObjectModel3d(const HString& Attributes) const

HObjectModel3D HObjectModel3D::CopyObjectModel3d(const char* Attributes) const

static void HOperatorSet.CopyObjectModel3d(HTuple objectModel3D, HTuple attributes, out HTuple copiedObjectModel3D)

HObjectModel3D HObjectModel3D.CopyObjectModel3d(HTuple attributes)

HObjectModel3D HObjectModel3D.CopyObjectModel3d(string attributes)

Description

A 3D object model consists of a set of attributes. The operator copy_object_model_3dcopy_object_model_3dCopyObjectModel3dCopyObjectModel3dCopyObjectModel3d 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 ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D. The operator returns the handle CopiedObjectModel3DCopiedObjectModel3DCopiedObjectModel3DCopiedObjectModel3DcopiedObjectModel3D 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_paramsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParamsGetObjectModel3dParams.

The parameter AttributesAttributesAttributesAttributesattributes 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_3dcopy_object_model_3dCopyObjectModel3dCopyObjectModel3dCopyObjectModel3d 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, AttributesAttributesAttributesAttributesattributes must be set to 'point_coord'"point_coord""point_coord""point_coord""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 AttributesAttributesAttributesAttributesattributes are possible:

'point_coord'"point_coord""point_coord""point_coord""point_coord":

This value specifies that the attribute with the 3D point coordinates is copied.

'point_normal'"point_normal""point_normal""point_normal""point_normal":

This value specifies that the attribute with the 3D point normals and the attribute with the 3D point coordinates are copied.

'face_triangle'"face_triangle""face_triangle""face_triangle""face_triangle":

This value specifies that the attribute with the face triangles and attribute with the 3D point coordinates are copied.

'face_polygon'"face_polygon""face_polygon""face_polygon""face_polygon":

This value specifies that the attribute with the face polygons and the attribute with the 3D point coordinates are copied.

'lines'"lines""lines""lines""lines":

This value specifies that the attribute with the lines and the attribute with the 3D point coordinates are copied.

'xyz_mapping'"xyz_mapping""xyz_mapping""xyz_mapping""xyz_mapping":

This value specifies that the attribute with the mapping to image coordinates and the attribute with the 3D point coordinates are copied.

'extended_attribute'"extended_attribute""extended_attribute""extended_attribute""extended_attribute":

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.

'primitives_all'"primitives_all""primitives_all""primitives_all""primitives_all":

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_3dfit_primitives_object_model_3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3d).

'primitive_plane'"primitive_plane""primitive_plane""primitive_plane""primitive_plane":

This value specifies that the attribute with the primitive plane is copied (e.g., obtained from the operator fit_primitives_object_model_3dfit_primitives_object_model_3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3d).

'primitive_sphere'"primitive_sphere""primitive_sphere""primitive_sphere""primitive_sphere":

This value specifies that the attribute with the primitive sphere is copied (e.g., obtained from the operator fit_primitives_object_model_3dfit_primitives_object_model_3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3d).

'primitive_cylinder'"primitive_cylinder""primitive_cylinder""primitive_cylinder""primitive_cylinder":

This value specifies that the attribute with the primitive cylinder is copied (e.g., obtained from the operator fit_primitives_object_model_3dfit_primitives_object_model_3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3d).

'primitive_box'"primitive_box""primitive_box""primitive_box""primitive_box":

This value specifies that the attribute with the primitive cylinder is copied.

'shape_based_matching_3d_data'"shape_based_matching_3d_data""shape_based_matching_3d_data""shape_based_matching_3d_data""shape_based_matching_3d_data":

This value specifies that the attribute with the prepared shape model for shape-based 3D matching is copied.

'distance_computation_data'"distance_computation_data""distance_computation_data""distance_computation_data""distance_computation_data":

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_3dprepare_object_model_3dPrepareObjectModel3dPrepareObjectModel3dPrepareObjectModel3d, and can be used with distance_object_model_3ddistance_object_model_3dDistanceObjectModel3dDistanceObjectModel3dDistanceObjectModel3d. 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.

'surface_based_matching_data'"surface_based_matching_data""surface_based_matching_data""surface_based_matching_data""surface_based_matching_data":

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.

'segmentation_data'"segmentation_data""segmentation_data""segmentation_data""segmentation_data":

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.

'score'"score""score""score""score":

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_stereoreconstruct_surface_stereoReconstructSurfaceStereoReconstructSurfaceStereoReconstructSurfaceStereo.

'red'"red""red""red""red":

This value specifies that the attribute containing the red color and the attribute with the 3D point coordinates are copied.

'green'"green""green""green""green":

This value specifies that the attribute containing the green color and the attribute with the 3D point coordinates are copied.

'blue'"blue""blue""blue""blue":

This value specifies that the attribute containing the blue color and the attribute with the 3D point coordinates are copied.

'all'"all""all""all""all":

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.

Note that if a 3D object model is no longer needed or should be overwritten, the memory has to be freed first by calling the operator clear_object_model_3dclear_object_model_3dClearObjectModel3dClearObjectModel3dClearObjectModel3d.

Execution Information

Parameters

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D (input_control)  object_model_3d HObjectModel3D, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the input 3D object model.

AttributesAttributesAttributesAttributesattributes (input_control)  string(-array) HTupleHTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Attributes to be copied.

Default value: 'all' "all" "all" "all" "all"

List of values: 'all'"all""all""all""all", 'blue'"blue""blue""blue""blue", 'distance_computation_data'"distance_computation_data""distance_computation_data""distance_computation_data""distance_computation_data", 'extended_attribute'"extended_attribute""extended_attribute""extended_attribute""extended_attribute", 'face_polygon'"face_polygon""face_polygon""face_polygon""face_polygon", 'face_triangle'"face_triangle""face_triangle""face_triangle""face_triangle", 'green'"green""green""green""green", 'point_coord'"point_coord""point_coord""point_coord""point_coord", 'point_normal'"point_normal""point_normal""point_normal""point_normal", 'primitive_box'"primitive_box""primitive_box""primitive_box""primitive_box", 'primitive_cylinder'"primitive_cylinder""primitive_cylinder""primitive_cylinder""primitive_cylinder", 'primitive_plane'"primitive_plane""primitive_plane""primitive_plane""primitive_plane", 'primitive_sphere'"primitive_sphere""primitive_sphere""primitive_sphere""primitive_sphere", 'primitives_all'"primitives_all""primitives_all""primitives_all""primitives_all", 'red'"red""red""red""red", 'score'"score""score""score""score", 'segmentation_data'"segmentation_data""segmentation_data""segmentation_data""segmentation_data", 'shape_based_matching_3d_data'"shape_based_matching_3d_data""shape_based_matching_3d_data""shape_based_matching_3d_data""shape_based_matching_3d_data", 'surface_based_matching_data'"surface_based_matching_data""surface_based_matching_data""surface_based_matching_data""surface_based_matching_data", 'xyz_mapping'"xyz_mapping""xyz_mapping""xyz_mapping""xyz_mapping"

CopiedObjectModel3DCopiedObjectModel3DCopiedObjectModel3DCopiedObjectModel3DcopiedObjectModel3D (output_control)  object_model_3d HObjectModel3D, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the copied 3D object model.

Result

copy_object_model_3dcopy_object_model_3dCopyObjectModel3dCopyObjectModel3dCopyObjectModel3d returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3d, xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3dXyzToObjectModel3d

Possible Successors

get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParamsGetObjectModel3dParams

Module

3D Metrology


ClassesClasses | | Operators