trimesh
trimesh copied to clipboard
[WIP] Refactor Load Types
A very common source of annoyance and confusion is that trimesh.load can return lots of different types (i.e. #2239, etc). This re-factor changes the return types to:
trimesh.load -> Geometry- stays mostly as-is but use is discouraged
trimesh.load_scene -> Scene- the most general container which can hold any loadable type.
- most people should probably use this
trimesh.load_mesh -> Trimesh- does the equivalent of `trimesh.load(force='mesh') which does potentially drop information.
- the
trimesh.load(..., force='mesh')will be deprecated in favor ofload_mesh
trimesh.load_path -> Path- these can be
Path2DorPath3Dwhich both inherit but is still a little outside the spirit of "functions should return the same type always." Maybe aforce_dimensionargument could be here.
- these can be
This requires some deprecation notices and careful thinking so I'll leave it open for a while.