Model#

class vivid3d.Model#

Model class for combining multiple BaseMesh instances into a single scene.

meshes#

List of meshes held

Type

list[vivid3d.BaseMesh]

n_meshes#

Number of meshes held

Type

number

n_polygons#

Number of total polygons

Type

number

n_vertices#

Number of total vertices

Type

number

add_mesh(self: vivid3d._core.Model, mesh: vivid3d._core.BaseMesh) None#

Add Mesh, PointCloud, or Lines object to model

Parameters

mesh (vivid3d.BaseMesh) – Instance of vivid3d.Mesh, vivid3d.PointCloud, or vivid3d.Lines

add_meshes(self: vivid3d._core.Model, meshes: List[vivid3d._core.BaseMesh]) None#

Add Meshes, PointClouds, or Lines objects to model

Parameters

meshes (array_like[vivid3d.BaseMesh]) – List of vivid3d.Mesh, vivid3d.PointCloud, or vivid3d.Lines

export(self: vivid3d._core.Model, output_file: str = 'Vivid3dModel', file_type: str = 'glb') None#

Exports Model to output_file with given file_type format. For full list of supported file formats, see: https://vivid.readthedocs.io/en/latest/userguide/basics.html#supported-file-types

Parameters
  • output_file (str, default: "Vivid3dModel") – File Directory to export to

  • file_type (str, default: 'glb') – File format to export to

export_to_blob(self: vivid3d._core.Model, file_type: str = 'glb') vivid3d._core.BlobData#

Exports Model to Blob with given file_type format. For full list of supported file formats, see: https://vivid.readthedocs.io/en/latest/userguide/basics.html#supported-file-types

Parameters

file_type (str, default: 'glb') – File format to export to

Returns

blob (vivid3d.BlobData) – Object containing exported model file blobs

export_to_obj(self: vivid3d._core.Model, output_file: str, with_texture: bool = 1) None#

Writes Model to output_file with in standard OBJ format. Backup exporter if the main export() function fails.

Parameters
  • output_file (str, default: "") –

  • to (File Directory to export) –

show(self: vivid3d._core.Model, height: int = 600) object#

Render and view the model in a viewer window.

Parameters

height (int, default: 600) – height in pixels to open the viewer

Returns

html (str or IPython.display.HTML) – The HTML with embedded model

User Guide#