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

Intersection volume of 2 meshes #162

Closed
edwardchaos opened this issue Apr 29, 2020 · 1 comment
Closed

Intersection volume of 2 meshes #162

edwardchaos opened this issue Apr 29, 2020 · 1 comment

Comments

@edwardchaos
Copy link

Goal: retrieve the intersection volume of 2 meshes if collisionResult.isCollision() returns true.

I have found the boolean capacity of whether meshes are colliding and also the computeDistances function where the distance between the 2 closest points can be queried.

Is there also provided api for the intersection volume or some way of quantifying the magnitude of 2 meshes intersecting?

I've found that the computeDistances function will always return a negative value close to 0 when 2 meshes partially intersect. This makes sense as the distance is only between the closest vertices on the meshes.

@jmirabel
Copy link
Contributor

First of all, mind that your question makes sense only for shapes whose interior is defined. This is not the case of shapes stored by BVH. This type of shapes is a surface only so there is no volume of intersection for them. This is also why you always get a very small penetration depth (the minimum distance).

In hpp-fcl, all the shapes with volume are convex. All of them should return a correct penetration depth. In the general case, when feasible, it would be very costly to compute the exact intersection. A volume included in the intersection could iteratively be built using the support function but this is not implemented.

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