Skip to content

Releases: mikedh/trimesh

Release 4.6.0

21 Jan 20:35
aed7eee
Compare
Choose a tag to compare

Release: Refactor Load Types (#2241)

A very common source of annoyance and confusion is that trimesh.load
can return lots of different types depending on what type of file was
passed (i.e. #2239). This refactor changes the return types for the
loading functions to:

  • trimesh.load_scene -> Scene
  • This loads into a Scene, the most general container which can hold
    any loadable type. Most people should probably use this to load
    geometry.
  • trimesh.load_mesh -> Trimesh
  • Forces all mesh objects in a scene into a single Trimesh object.
    This potentially has to drop information and irreversibly concatenate
    multiple meshes.
  • The implementation of the concatenation logic is now in
    Scene.to_mesh rather than load.
  • trimesh.load_path -> Path
  • This loads into either a Path2D or Path3D which both inherit from
    Path
  • trimesh.load -> Geometry
  • This was the original load entry point and is deprecated, but there
    are no current plans to remove it. It has been modified into a thin
    wrapper for load_scene that attempts to match the behavior of the
    previous loader for backwards compatibility. In my testing against the
    current main branch it was returning the same types 99.8% of the
    time

    although there may be other subtle differences.
  • trimesh.load(..., force='mesh') will emit a deprecation warning in
    favor of load_mesh
  • trimesh.load(..., force='scene') will emit a deprecation warning in
    favor of load_scene

Additional changes:

  • Removes Geometry.metadata['file_path'] in favor of
    Geometry.source.file_path. Everything that inherits from Geometry
    should now have a .source attribute which is a typed dataclass. This
    was something of a struggle as file_path was populated into metadata
    on load, but we also try to make sure metadata is preserved through
    round-trips if at all possible. And so the load inserted different
    keys into the metadata. Making it first-class information rather than a
    loose key seems like an improvement, but users will have to replace
    mesh.metadata["file_name"] with mesh.source.file_name.
  • Moves all network fetching into WebResolver so it can be more easily
    gated by allow_remote.
  • Removes code for the following deprecations:
  • January 2025 deprecation for trimesh.resources.get in favor of the
    typed alternatives (get_json, get_bytes, etc).
  • January 2025 deprecation for Scene.deduplicated in favor of a very
    short list comprehension on Scene.duplicate_nodes
  • March 2024 deprecation for trimesh.graph.smoothed in favor of
    trimesh.graph.smooth_shaded.
  • Adds the following new deprecations:
  • January 2026 Path3D.to_planar -> Path3D.to_2D to be consistent
    with Path2D.to_3D.
  • Fixes #2335
  • Fixes #2330
  • Fixes #2239
  • Releases #2313
  • Releases #2327
  • Releases #2336
  • Releases #2339

Release 4.5.3

28 Nov 00:29
2fcb2b2
Compare
Choose a tag to compare

Merge pull request #2319 from mikedh/test/iteration

Release: Iteration Tests

Release 4.5.2

05 Nov 18:04
9dbb10c
Compare
Choose a tag to compare

Merge pull request #2312 from mikedh/units/xaml

Release: Boolean Tests

Release 4.5.1

22 Oct 15:44
6ed17ba
Compare
Choose a tag to compare

Merge pull request #2300 from mikedh/followup/3mf

Release Followup: Tuning 3MF loading

Release 4.5.0

14 Oct 20:21
207ba23
Compare
Choose a tag to compare

Merge pull request #2290 from mikedh/release/revolve

Release: Revolve Caps

Release 4.4.9

04 Sep 19:26
634c608
Compare
Choose a tag to compare

Merge pull request #2278 from mikedh/fix/scene

Release: Scene Transform

Release 4.4.8

30 Aug 20:16
f7df971
Compare
Choose a tag to compare
Merge pull request #2276 from mikedh/feat/stride

Release: Stride Speedup + Hints

Release 4.4.7

20 Aug 18:18
e8a43dd
Compare
Choose a tag to compare
Merge pull request #2268 from mikedh/feat/trixie

[WIP] try a vanilla debian image

Release 4.4.6

16 Aug 16:57
2c20b49
Compare
Choose a tag to compare
Merge pull request #2265 from mikedh/feat/norm

Release: Fix Triangulation Option

Release 4.4.4

07 Aug 19:24
Compare
Choose a tag to compare