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

Feature request: adjacent_faces #74

Open
RReverser opened this issue May 14, 2022 · 2 comments
Open

Feature request: adjacent_faces #74

RReverser opened this issue May 14, 2022 · 2 comments

Comments

@RReverser
Copy link

RReverser commented May 14, 2022

Spade 2.0 looks great API-wise, and is almost perfect for my triangulation needs.

One thing I found missing is that, when iterating over inner faces, I need to get their 3 neighbour faces, which currently seems pretty difficult.

Would it be possible to add an adjacent_faces method similar to adjacent_edges to the face handle?

@RReverser
Copy link
Author

RReverser commented May 14, 2022

OTOH maybe not that difficult... I guess this should be just adjacent_edges().map(|edge| edge.rev().face())?

@Stoeoef
Copy link
Owner

Stoeoef commented Jan 1, 2023

Sorry for my late reply!

Yep, you've found the best current solution. This works especially well since adjacent_edges() will return a fixed size array that can be mapped into another fixed size array (thanks const generics!)

That being said, I agree that an adjacent_faces method would be a nice addition.

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

No branches or pull requests

2 participants