I was stuck for quite a while on getting a point inside a 2D surface that has a weird shape, like U-shape or with holes. I was looking for a reliable GH way of doing this on the internet, but couldn’t find it. Thanks to an explanation here I was able to create a solution in GH. Thought it would be nice to post this, in case other people get stuck.
Unless the Bounding Box is oriented to the surface, which it is not in this case, the method is somewhat arbitrary. You can see this by rotating the surface. The white point moves all over the place.
For me, the purpose of the function is to find a point with the topological relationship A inside B. The script does exactly that regardless of the orientation of the bounding box or the shape of the surface. When changing the orientation it’ll still maintain that relationship. I don’t neccesarily see the added benefit of aligning the bbox to the surface’s longest edge when the location of the point itself is somewhat irrelevant.
“0.5, 0.5” or “// 0.5, 0.5” == “tomato” or “tomato”