Help optimizing automatic joint system

Hello,
I teach foundation studies at an art school and I am assigning a project to design and build a kite out of paper straws. I have built a grasshopper file that automates the modeling of a joinery system for connecting the straws that they’ll 3d print. It seems to be successful but it takes quite a while for even a fairly simple object. I’m worried that the students hardware will get bogged down and frustration levels will run high. I’m wondering if anyone could look at this and offer any possibilities for streamlining it.
Thanks in advance.
Michael
straw kite.3dm (233.4 KB)
straw kite.gh (16.0 KB)

straw kite Edited v0.gh (40.7 KB)

I would change this to make the boolean faster and less error prone


the panel tells the pipe to cap round on one end (hence eliminating the need for spherical objects) and flat on the other

thanks! Thats great. but how can i control which end of the pipe gets rounded? it seems random in my file

test pipe cap.gh (8.7 KB)

Please share your GH file. It makes two Breps in my test.

@mtdelucia my bad, i was thinking about a custom pipe battery… but on second look, unless you know how to sort your curve directions, it’s not much use

@Quan_Li here’s the custom battery
CustomPipe.gh (14.1 KB)

Thanks @adel.albloushi , I would love to know how to manage curve directions in this way. I’ve been trying to study up but haven’t found any tutorials that suit this specific case. I would need them all to orient away from the vertex where they intesect. If i could do that yuour siggestion would be perfect.
thanks fo your help.
Also thanks @Quan_Li for your suggestions. I think im missing a plug in for yours. when i use the file you uploaded it has a lot of errors.

here’s two ways to ensure the correct direction

ensure_line_direction_for_straw_kite.gh (13.5 KB)

in the first, method, it checks which line endpoint is closes to a test point. if the start point isn’t the closest, it flips the direction of the line

in the second method, it ensures proper line direction from the construction.
to apply this to your script, instead of trimming with brep, do a Surface | curve intersection with your sphere as the surface and the lines as curve. then construct the line from the center of the sphere to the intersection.

there’s a third way which is by analyzing the domain, but that’s complicated to understand, and not simple to implement.

If you are on R8, Shrink Wrap might help a lot:

straw kite_with_Topologizer.gh (26.5 KB)

I used Topologizer to organize stuff in branches since the very start, it’s here:

1 Like