Operators |
trans_pose_shape_model_3d — Transform a pose that refers to the coordinate system of a 3D object model to a pose that refers to the reference coordinate system of a 3D shape model and vice versa.
trans_pose_shape_model_3d( : : ShapeModel3DID, PoseIn, Transformation : PoseOut)
The operator trans_pose_shape_model_3d transforms the pose PoseIn into the pose PoseOut by using the transformation direction specified in Transformation. In the majority of cases, the operator will be used to transform a camera pose that is given with respect to the source coordinate system to a camera pose that refers to the target coordinate system.
The pose can be transformed between two coordinate systems. The first coordinate system is the reference coordinate system of the 3D shape model that is passed in ShapeModel3DID. The origin of the reference coordinate system lies at the reference point of the underlying 3D object model. The orientation of the reference coordinate system is determined by the reference orientation that was specified when creating the 3D shape model with create_shape_model_3d.
The second coordinate system is the world coordinate system, i.e., the coordinate system of the 3D object model that underlies the 3D shape model. This coordinate system is implicitly determined by the coordinates that are stored in the CAD file that was read by using read_object_model_3d.
If Transformation is set to 'ref_to_model' , it is assumed that PoseIn refers to the reference coordinate system of the 3D shape model. The resulting output pose PoseOut in this case refers to the coordinate system of the 3D object model.
If Transformation is set to 'model_to_ref' , it is assumed that PoseIn refers to the coordinate system of the 3D object model. The resulting output pose PoseOut in this case refers to the reference coordinate system of the 3D shape model.
The relative pose of the two coordinate systems can be queried by passing 'reference_pose' for GenParamName in the operator get_shape_model_3d_params.
Handle of the 3D shape model.
Pose to be transformed in the source system.
Direction of the transformation.
Default value: 'ref_to_model'
List of values: 'model_to_ref' , 'ref_to_model'
Transformed 3D pose in the target system.
If the parameters are valid, the operator trans_pose_shape_model_3d returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.
hom_mat3d_translate, hom_mat3d_rotate
3D Metrology
Operators |