Replies: 3 comments 2 replies
0 replies
|
Nice!
FWIW, in my matlab library gptoolbox there's `linear_sweep.m` that does
sweeps along linear translations.
https://github.com/alecjacobson/gptoolbox/blob/master/mesh/linear_sweep.m
You can also use
https://github.com/libigl/libigl/blob/main/include/igl/copyleft/cgal/minkowski_sum.h
with your shape + line segment. I don't remember exactly but I think the
minkowski sum is implemented in a very slow way.
…-Alec
Message ID: ***@***.***
com>
|
1 reply
|
not really. The minkowski sum is our mesh arrangements paper extended in
the most straightforward unoptimized way. The linear sweep I think I just
cooked up based on what I thought it should be. I think it should be quite
robust because it uses the mesh arrangements under the hood.
-Alec
…On Fri, Sep 5, 2025 at 5:33 PM Rob McDonald ***@***.***> wrote:
Thanks for those pointers. Are there any papers / examples / writeups
about how those work?
—
Reply to this email directly, view it on GitHub
<#2498 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARDJGNHSRE45LNSC23LT333RH6S5AVCNFSM6AAAAACFYERKSKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZSGQYDOMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm developing a simple Swept Volume calculator. My use case is focused on plain linear translation, so an exact swept volume of a mesh is possible. I start with a mesh, translate the 'shadow' side, construct 'edges', and then self-intersect the mesh, splitting triangles as needed. For the final step, I use the IGL Winding Number calculation to classify the split tris as inside / outside, discarding interior tris.
Since the winding number calculator works at survey points, I take the center of each triangle and perturb it (say 1e-6) in the direction of the tri's unit normal vector. I use the inside / outsideness of that point to classify the triangle.
The winding number calculation is the most expensive part of this process. I'm using the exact IGL winding number method -- the fast approximate version did not do a good job in my brief attempts. The exact one is fast enough for my purposes.
This is working remarkably well for single translations -- even for complex non-convex meshes.
I do not want to use an implicit swept volume calculator. I have tried both IGL's swept volume calculator and https://github.com/sgsellan/swept-volumes. These methods work, but they produce approximate results and take much longer than my exact CSG based approach.
Progressing past plain linear translation, I want to find the union of the swept volumes in two directions. I may be able to accomplish this by computing each swept volume separately and then taking the CSG union of them. There will be perfectly coincident faces, so this presents challenges. Instead, I am trying to construct all the swept faces and then let a single winding number calculation sort it out.
Unfortunately, I am getting undesirable results. Here (left image) is a simplified case.
The circle has been translated to two end positions. I am interested in the winding number at the point at the bottom. None of the edges are duplicated.
As the line integral is traversed, there are often two or three away-facing faces for a particular direction -- that is offset by only one towards-facing face. Consequently, the point of interest ends up with a negative winding number -- even though it is clearly outside the profile -- and even outside the convex hull of the shape.
I've read the "Robust Inside-Outside Segmentation using Generalized Winding Numbers" paper, and I go back and forth as to whether this result is expected.
During construction, I can also eliminate the 'top' of the original circle (right figure). This changes the results, but still has the same underlying problem.
It seems that my best course of action may be to lie to the winding number calculation by feeding it duplicate faces for the tris that are used more than once (3x for the left figure, 2x for the right).
Are there other avenues I should pursue?
All reactions