isl-org / isl-org/Open3D

Fastest way to test intersection between two stl meshes

Open
#6,523 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

Hi Open3D team,

I hope this message finds you well. I am currently working on a project that involves testing whether two STL meshes intersect or not using Open3D. I've been experimenting with the following code:

```python
import open3d as o3d

box = o3d.geometry.TriangleMesh.create_box()
box = o3d.t.geometry.TriangleMesh.from_legacy(box)
sphere = o3d.geometry.TriangleMesh.create_sphere(0.8)
sphere = o3d.t.geometry.TriangleMesh.from_legacy(sphere)

result = triangle_mesh1.boolean_intersection(triangle_mesh2)
o3d.visualization.draw([result])
```

This code successfully detects mesh intersections, but the execution time is quite slow for my specific application. I'm reaching out to inquire if there's a more efficient method or an alternative approach to check for mesh intersection in Open3D.

Is there a dedicated function or method within Open3D that allows for a faster evaluation of mesh intersections without generating the entire intersection mesh? I'm primarily interested in determining if there is any intersection between the two meshes, rather than visualizing the intersection result.

Any guidance or suggestions on optimizing the code for faster execution would be greatly appreciated.

Thank you for your time and assistance.

Best regards,

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.