trimesh.exchange.assimp

Functions:

load_cyassimp(file_obj[, file_type, resolver])

Load a file using the cyassimp bindings.

load_pyassimp(file_obj[, file_type, resolver])

Use the pyassimp library to load a mesh from a file object and type or file name if file_obj is a string

loader(file_obj[, file_type, resolver])

Use the pyassimp library to load a mesh from a file object and type or file name if file_obj is a string

trimesh.exchange.assimp.load_cyassimp(file_obj, file_type=None, resolver=None, **kwargs)

Load a file using the cyassimp bindings.

The easiest way to install these is with conda: conda install -c menpo/label/master cyassimp

Parameters
  • file_obj (str, or file object) – File path or object containing mesh data

  • file_type (str) – File extension, aka ‘stl’

  • resolver (trimesh.visual.resolvers.Resolver) – Used to load referenced data (like texture files)

  • kwargs (dict) – Passed through to mesh constructor

Returns

meshes – Contain kwargs for Trimesh constructor

Return type

(n,) list of dict

trimesh.exchange.assimp.load_pyassimp(file_obj, file_type=None, resolver=None, **kwargs)

Use the pyassimp library to load a mesh from a file object and type or file name if file_obj is a string

Parameters
  • file_obj (str, or file object) – File path or object containing mesh data

  • file_type (str) – File extension, aka ‘stl’

  • resolver (trimesh.visual.resolvers.Resolver) – Used to load referenced data (like texture files)

  • kwargs (dict) – Passed through to mesh constructor

Returns

scene – Native trimesh copy of assimp scene

Return type

trimesh.Scene

trimesh.exchange.assimp.loader(file_obj, file_type=None, resolver=None, **kwargs)

Use the pyassimp library to load a mesh from a file object and type or file name if file_obj is a string

Parameters
  • file_obj (str, or file object) – File path or object containing mesh data

  • file_type (str) – File extension, aka ‘stl’

  • resolver (trimesh.visual.resolvers.Resolver) – Used to load referenced data (like texture files)

  • kwargs (dict) – Passed through to mesh constructor

Returns

scene – Native trimesh copy of assimp scene

Return type

trimesh.Scene