Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Stride Speedup + Hints #2276

Merged
merged 18 commits into from
Aug 30, 2024
Merged

Release: Stride Speedup + Hints #2276

merged 18 commits into from
Aug 30, 2024

Conversation

mikedh
Copy link
Owner

@mikedh mikedh commented Aug 27, 2024

  • add some type hints to trimesh.inertia
  • in trimesh.base replace caching.cache_decorator with cache_decorator.
  • add mesh.copy(..., include_visual: bool = True) option to copy meshes skipping the visual data.
  • release Speed up GLTF loading. #2275
  • release fix documentation for repair.stitch #2277
  • remove mesh.as_open3d immediately and without deprecation as unfortunately it appears to be untested and fully broken in 2024.
    • This modifies mesh.simplify_quadric_decimation to use pyvista/fast-simplification, which as of testing only requires numpy and has cibuildwheel set up. I added it to the recommend pip extra which most people won't get, and if it works out we might move it up to easy.
    • Applies March 2024 deprecation by removing Trimesh.simplify_quadratic_decimation
  • add FCL back to docker images for tests with a workaround for currently broken PyPi wheels.
  • in docker we should no longer have to force-reinstall the [all] extra since release of BUG: Unpin numpy (regression) imageio/imageio#1098
  • updates github actions versions for checkout/cache/setup-python to silence warnings.

@mikedh mikedh merged commit f7df971 into main Aug 30, 2024
9 checks passed
@mikedh mikedh deleted the feat/stride branch August 30, 2024 20:01
@Jakub-Ramlab
Copy link

Jakub-Ramlab commented Oct 2, 2024

Dear Michael,

First of all, thank a lot for putting together and maintaining this great library.

In our software stack, we were relying in a number of places on mesh.as_open3d to interface between the two libraries. It always seemed to work without problems. So I cannot agree that it's fully broken. Partially? Maybe, but we experienced nothing that would indicate that.

Removing this function suddenly, without deprecation, and with no further explanation why is it "fully broken" caught us by surprise. It gives us extra work to, essentially, implement the conversion ourselves and replace it in every single instance in our code base. While not a critical issue, it creates overhead and erodes our trust in Trimesh being a reliable part of our stack. I am sure we are not the only ones in this situation.

I would much appreciate if, in the future, such changes were phased in more slowly and clearly communicated to the end users. Thank you very much in advance.

Jakub Sikorski,
RAMLAB BV

Scheepsbouwweg 8 - F6,
3089 JW Rotterdam
The Netherlands

@mikedh
Copy link
Owner Author

mikedh commented Oct 2, 2024

Sorry for the hassle. This one is a bit of a special case as mesh.as_open3d was on the base object and I though the downsides of new users trying to use it over the next year were worse than the downsides of yanking it. Usually there's at least a year of deprecation warnings, and for what it's worth I'll try to avoid this in the future if at all possible.

I'd recommend pinning trimesh==4.4.7 if you need that method.

"Fully broken" probably depends on the environment, but when I checked it (my original plan was to add a unit test), a user on Python 3.11 who tried to use it would hit 400mb+ open3d wheels, followed by "libgomp not found," "libx11 not found", and when it imports mesh.as_open3d immediately segfaults:

mikedh@orion:trimesh$ docker run -it python:3.11-slim-bookworm /bin/bash

root@12e029342d42:/# pip install open3d trimesh==4.4.7

root@12e029342d42:/# python
Python 3.11.10 (main, Sep 27 2024, 06:09:21) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import trimesh
>>> trimesh.__version__
'4.4.7'

>>> import open3d
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.11/site-packages/open3d/__init__.py", line 61, in <module>
    load_cdll(str(next((Path(__file__).parent / "cpu").glob("pybind*"))))
  File "/usr/local/lib/python3.11/site-packages/open3d/__init__.py", line 38, in load_cdll
    return CDLL(str(path))
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libgomp.so.1: cannot open shared object file: No such file or directory


root@12e029342d42:/# apt update && apt install -qq libgomp1
After this operation, 319 kB of additional disk space will be used.


root@12e029342d42:/# python
Python 3.11.10 (main, Sep 27 2024, 06:09:21) [GCC 12.2.0] on linux
>>> import open3d
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.11/site-packages/open3d/__init__.py", line 61, in <module>
    load_cdll(str(next((Path(__file__).parent / "cpu").glob("pybind*"))))
  File "/usr/local/lib/python3.11/site-packages/open3d/__init__.py", line 38, in load_cdll
    return CDLL(str(path))
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libX11.so.6: cannot open shared object file: No such file or directory


root@12e029342d42:/# apt install -qq xorg
After this operation, 389 MB of additional disk space will be used.

root@12e029342d42:/# python
Python 3.11.10 (main, Sep 27 2024, 06:09:21) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import open3d
>>> import trimesh

>>> trimesh.__version__
'4.4.7'

>>> open3d.__version__
'0.18.0'

>>> m = trimesh.creation.box()
>>> m.as_open3d
Segmentation fault (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants