Hey guys, I finally picked this project back up. For context, I’m trying to write a script that automatically places notes with family names in plan and section views. Doing it in plan views is fairly easy, but section views have a lot of visual overlapping. My goal is for the script to evaluate that and pick the right spot for the text.
Following your advice from another post, here’s what I have so far: solids that get trimmed based on the equipment’s depth and eventually turn into surfaces. The visible surfaces are all on the same plane, so if you see one rectangle in front of another, it means the one in the back is actually an irregular shape.
I used circles to figure out the shortest available side for the text (which would be the text height), but I can’t wrap my head around how to evaluate the longest side (the text width). Any ideas on where to go from here? I included a visual example in the third image of what I’m aiming for.


