Hi everyone!
I am excited to announce a new addition to Bowerbird: the BB Label Point component (BBLabelPt), located under the Text subcategory.
If you’ve ever tried to place text labels inside arbitrary planar shapes, you know that using the standard geometric centroid can be problematic. For concave shapes (like L-shapes or U-shapes), the centroid often falls completely outside the polygon. For polygons with holes, the centroid might end up inside an empty cutout.
BB Label Point solves this by calculating the pole of inaccessibility. This is the point furthest away from any boundary or hole (i.e., the center of the largest possible inscribed circle).
Key Features:
- Guaranteed optimal placement: The point is guaranteed to be placed in the area with the most space, even inside highly concave shapes.
- Automatic hole detection: Automatically detects and avoids holes, finding the best spot in the remaining solid area.
The component integrates PolylabelNet, a fast C# port of Mapbox’s Polylabel algorithm, and Clipper2 for classifying outer boundaries and inner holes regardless of their winding direction.
Here are some examples:
The current version of Bowerbird (v2.10) containing this new component can be downloaded directly inside the Rhino Package Manager.
