diffCheck.df_cvt_bindings module#

This module contains all the objects and functions to handle the conversion between, diffCheck (in particular diffCheck.diffcheck_bindings) to/from Rhino.

This module contains the utility functions to convert the data between the Rhino, the basic diffCheck data structures and the diffCheck bindings.

diffCheck.df_cvt_bindings.cvt_dfOBB_2_rhbrep(df_OBB)#

Convert a diffCheck OBB to a Rhino Brep.

Parameters:

df_OBB – diffCheck OBB

Return rh_obb_brep:

the brep box object

Return type:

Box

diffCheck.df_cvt_bindings.cvt_dfcloud_2_dict(df_cloud)#

Convert a diffCheck cloud to a dictionary mainly for pickling and serialization.

Parameters:

df_cloud (DFPointCloud) – diffCheck cloud

Return cloud_dict:

the cloud dictionary

Return type:

dict

diffCheck.df_cvt_bindings.cvt_dfcloud_2_rhcloud(df_cloud)#

Convert a diffCheck cloud to a Rhino cloud.

Parameters:

df_cloud – diffCheck cloud

Return rh_cloud:

rhino cloud

diffCheck.df_cvt_bindings.cvt_dfmesh_2_rhmesh(df_mesh)#

Convert a diffCheck mesh to a Rhino mesh.

Parameters:

df_mesh (DFMesh) – diffCheck mesh

Return rh_mesh:

rhino mesh

Return type:

Mesh

diffCheck.df_cvt_bindings.cvt_dfxform_2_rhxform(df_xform)#

Convert a diffCheck transformation to a Rhino transformation.

Parameters:

df_xform (DFTransformation) – diffCheck transformation

Return rh_xform:

rhino transformation

Return type:

Transform

diffCheck.df_cvt_bindings.cvt_dict_2_dfcloud(cloud_dict)#

Convert a dictionary to a diffCheck cloud mainly for pickling and deserialization.

Parameters:

cloud_dict (dict) – the cloud dictionary

Return df_cloud:

diffCheck cloud

Return type:

DFPointCloud

diffCheck.df_cvt_bindings.cvt_ndarray_2_rh_transform(matrix)#

Convert a numpy matrix to a Rhino transformation. Useful to transform a DFTransformation-transformation_matrix to a Rhino transformation.

Parameters:

matrix – the numpy matrix

Return transfo:

the Rhino transformation

Return type:

Transform

diffCheck.df_cvt_bindings.cvt_rhcloud_2_dfcloud(rh_cloud)#

Convert a Rhino cloud to a diffCheck cloud.

Parameters:

rh_cloud – rhino cloud

Return df_cloud:

diffCheck cloud

Return type:

DFPointCloud

diffCheck.df_cvt_bindings.cvt_rhmesh_2_dfmesh(rh_mesh)#

Convert a Rhino mesh to a diffCheck mesh.

Parameters:

rh_mesh (Mesh) – rhino mesh

Return df_mesh:

diffCheck mesh

Return type:

DFMesh

diffCheck.df_cvt_bindings.test_bindings()#

Test the bindings import.

Return is_imported:

True if the bindings are imported, False otherwise

Return type:

Any