spade icon indicating copy to clipboard operation
spade copied to clipboard

Feature request: adjacent_faces

Open RReverser opened this issue 2 years ago • 2 comments

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 avatar May 14 '22 22:05 RReverser

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

RReverser avatar May 14 '22 22:05 RReverser

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.

Stoeoef avatar Jan 01 '23 16:01 Stoeoef