Wednesday, December 03, 2008

Line Ring Selection Algorithm

I'm thinking about adding a tool that will select a ring of lines.
Here is an example of a ring you want to select.

Okay, what I've come up so far is something pretty simple.
1. Copy the target face.
2. Check to see if the selected line is an edge.
3a. Yes, calculate all the edges that are attached to the selected edge and select. END
3b. No, remove all polys that have edges. goto 2.

This image shows how it would work on the example.

I know there are some exceptions. It seems simple enough. I'll let you know how it works.

Happy Coding!

No comments:

Post a Comment