I have a problem where I am stuck.
I want to align an instance object onto two surfaces to create a connector for metal plates that form a sculpture in the end. All touching plates have different angles, which it would be a helpful script instead of creating all connectors by hand and aligning and positioning them.
My plan was to create the connector in Rhino, so I have only selected the touching surfaces where it should be positioned, and the instanced object aligns itself at the right positions.
For my example surfaces it always worked (the screenshot with the red surfaces) and I could move, rotate or change the angle between them as I wished. Now that I wanted to apply the same onto the modelled sculpture the connectors are off and rotated and that’s where I am stuck at the moment.
Hopefully, someone has an easy fix because I think I am just missing one important step.
Thank you all in advance!
There Is some other stuff I included, but also without it is not working correctly.
I select the surfaces and then internalise the data and connect them to the script.
somehow as soon as I select new surfaces (there will be 3 of those “cubes”) I get the same result I poste before. Where was the change you have made in the script? Then I can figure out what I do wrong and fix it myself. Seems like a simple mistake
You might only have to flip the normals or planes for the orient inputs. If you can’t figure it out, provide a file where the three “cubes” are internalised please.
I’ve adde a stream filter and made sure the normals point inwards.
The third brep on index 2 does not join into a single brep so it failedd before. Due to this brep I sorted the joined breps according to their area and took the largest only. Brep Topology does not work with multiple breps just like that.
Seems to work pretty well. Some edges are missed out, but I knew I had to work on some special cases manually anyways.
I’ll have a closer look tomorrow morning, but thank you so much already!
So I know it’s been a while and I just now realised something.
Somehow the alignment to the normals does not work. It is slightly off. I tried to figure it out and my guess is that there must be some error in the lists. In the one screenshot is also one object I oriented in rhino to the normal, so the normal vector should be fine. I saw that after the cull and the second list item the duplicates are removed and also somehow the value goes up to 252 , while there where only 16 normals and the value for the input of the first list item was 56 with an output list of 56 also. So now I am a bit confused and trying to figure out how to properly work with data and lists. If there is a hint in the right direction, I would be thrilled !