I am dealing with the joints of a polygonal frame. I need to create the 4 joints between the beams.
My only input is the two boundary curves of the frame (inner and external).
The difficulty lies in that the beams must always be orthogonal pieces, thus the joints need to absorb the angle.
I was able to get really close with my current definition. And I say really close because the top left joint is actually a little larger than what it should be (yellow last picture). Besides that, I consider my almost working attempt mediocre or dirty.
My procedure, basically, was to:
1- explode both curves of the frames
2- group the edges by proximity to each other, extend them and loft them.
3- use region intersection to find a first draft of my joints (polyline).
4- I then created all perpendicular lines from each draft by evaluating the midpoint of each segment and created a 4 edged surface from these lines.
5- Finally I performed a region intersection between these 4 edge surfaces and my draft joints polylines. This is the final result.
I apologize for the late reply. Thank you very much for your help. I have been working on this and I believe I have made some progress.
I drastically changed my initial approach, and instead of commencing from joints I am starting from the beams to then get to the joints.
It was my mistake to never mention that ideally a solution should be able to accept the first frame as well as the last one I showed. I apologize. Here I added even another version.
It is a somewhat extensive script that I think is overdoing some stuff here and there, but it works for now. It can surely be optimized. I upload the def for anyone interested, would greatly appreciate any feedback and shortcut options.
I tried to keep it tidy and organized, documenting what each section is meant to do. Certain sections will change to orange as empty data is passed thorough them given the different conditions of the frames.