In reference to my door numbering script here, I’m looking for a way to pull the clockwise locations of doors along the room’s perimeter polycurve instead of just radial from the center location of the room itself.
My other script should work for most instances, but the issue is when there are odd shaped rooms like this where radial numbering breaks:
I currently have the vector from room center to the room’s entry door (or 12 o’clock from center) to begin door numbering. I also have the polycurve of the room, so I need to correlate the start point of the entry door to the sequence of points around the room, which is where I’m stuck.
Logic:
- Count n doors in each room
- Divide polycurve by n
- Sort those n points to go clockwise along polycurve - are these always in order by default?
- Somehow correlate the start of my list with the entry door
- Get keys of those points and sort my doors by those keys
I found this post about finding if points fall within a bounding box of the door, but I think I’d only need to find the point that falls within my Entry door and sort from there. I also looked at BVN’s Renumbering Rooms Graph, but it seems like overkill.