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

tolerenca strip around triangles #263

Closed
avlonder opened this issue Nov 28, 2018 · 2 comments
Closed

tolerenca strip around triangles #263

avlonder opened this issue Nov 28, 2018 · 2 comments

Comments

@avlonder
Copy link

Hello again,

I would like to have some kind of tolerance strip around the triangles for the ray casting.
Is this already present in trimesh / pyembree / embree?
It doesn't seem to be the case because some rays that should hit an edge of a simple cube are not hitting it.

I looked into ray_pyembree.py.
Maybe _ray_offset_factor does the trick?

BR,
Arne

@mikedh
Copy link
Owner

mikedh commented Nov 28, 2018

Hey, yeah unfortunately our logic to collect every hit using embree is a bit cheesy (more info on why it is required in RenderKit/embree#188). Trimesh's native raytracer is a LOT slower (50x or so) but does collect every hit robustly as far as I've seen. If you load meshes with use_embree=False it will use the native one:

In [1]: import trimesh

In [2]: m = trimesh.load('trimesh/models/featuretype.STL')

In [3]: b = trimesh.load('trimesh/models/featuretype.STL', use_embree=False)

In [4]: m.ray
Out[4]: <trimesh.ray.ray_pyembree.RayMeshIntersector at 0x7f4bba344eb8>

In [5]: b.ray
Out[5]: <trimesh.ray.ray_triangle.RayMeshIntersector at 0x7f4b96449438>

@mikedh
Copy link
Owner

mikedh commented Dec 21, 2018

This is actually the same problem seen as #242. Consolidating to that issue for now, thanks for the report!

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

No branches or pull requests

2 participants