py4design.py3dmodel.export_collada module

py4design.py3dmodel.export_collada.occtopo_2_collada(dae_filepath, occface_list=None, face_rgb_colour_list=None, occedge_list=None)

This function converts OCCtopologies into a pycollada Collada class. The units are in meter.

Parameters:
dae_filepath : str

The file path of the DAE (Collada) file.

occface_list : list of OCCfaces

The geometries to be visualised with the results. The list of geometries must correspond to the list of results. Other OCCtopologies are also accepted, but the OCCtopology must contain OCCfaces. OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface.

face_rgb_colour_list : list of tuple of floats, optional

Each tuple is a r,g,b that is specifying the colour of the face. The number of colours must correspond to the number of OCCfaces.

occedge_list : list of OCCedges, optional

OCCedges to be visualised together, Default = None.

Returns:
mesh : pycollada Collada class object

The collada object from pycollada library.

py4design.py3dmodel.export_collada.write_2_collada(dae_filepath, occface_list=None, face_rgb_colour_list=None, occedge_list=None, text_string=None)

This function writes a 3D model into a Collada file.

Parameters:
dae_filepath : str

The file path of the DAE (Collada) file.

occface_list : list of OCCfaces, optional

The geometries to be visualised with the results. The list of geometries must correspond to the list of results. Other OCCtopologies are also accepted, but the OCCtopology must contain OCCfaces. OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface.

face_rgb_colour_list : list of tuple of floats, optional

Each tuple is a r,g,b that is specifying the colour of the face,Default = None. The number of colours must correspond to the number of OCCfaces.

occedge_list : list of OCCedges, optional

OCCedges to be visualised together, Default = None.

text_string : str, optional

Description for the 3D model, Default = None.

Returns:
None : None

The geometries are written to a DAE file.

py4design.py3dmodel.export_collada.write_2_collada_falsecolour(occface_list, result_list, unit_str, dae_filepath, description_str=None, minval=None, maxval=None, other_occface_list=None, other_occedge_list=None)

This function writes a falsecolour 3D model into a Collada file.

Parameters:
occface_list : list of OCCfaces

The geometries to be visualised with the results. The list of geometries must correspond to the list of results. Other OCCtopologies are also accepted, but the OCCtopology must contain OCCfaces. OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface.

result_list : list of floats

The results to be visualised. The list of results must correspond to the occface_list.

unit_str : str

The string of the unit to be displayed on the bar.

dae_filepath : str

The file path of the DAE (Collada) file.

description_str : str, optional

Description for the falsecolour bar, Default = None.

minval : float, optional

The minimum value of the falsecolour rgb, Default = None. If None the maximum value is equal to the maximum value from the results.

maxval : float, optional

The maximum value of the falsecolour rgb, Default = None. If None the maximum value is equal to the minimum value from the results.

other_occface_list : list of OCCfaces, optional

Other geometries to be visualised together with the results, Default = None. Other OCCtopologies are also accepted, but the OCCtopology must contain OCCfaces. OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface.

other_occedge_list : list of OCCedges, optional

Other OCCedges to be visualised together with the results, Default = None.

Returns:
None : None

The geometries are written to a DAE file.