Starting from right place - meshing blobby tubes for printing

I have written a fairly simple script for a parametric drainpipe bend connector. It has a male and female end, and uses loft curves to get a smooth shape between them. Lots of little bits of curves joined up later, the complete brep is meshed and baked for export to the printer.
An example has been printed and is in use.

adv_downpipe_joint.gh (30.3 KB)

Now, I want to extend it to this comical thing - the downpipe off the front gutter goes through 3 different bends in a short distance, and clogs up with moss every week or two. It’s a very wet area. The gutter is not easily reachable from the window, but the bottom of the first bend is, so the plan is to add a moss trap there with a hatch or plug so i can empty it weekly without getting the ladder out.

I have tried using the same approach, lofting from the female top to the moss trap bottom, and then doing a mesh difference each way, exploding the results and discarding the pieces that are ‘inside’ the joint pipe system. The index of the piece to be discarded is unpredictable as the mesh varies, and I am having a nightmare getting the meshes to combine back reliably - all to often half the mesh disappears on a union.

So, I am probably starting from the wrong place. Would I be better off doing something like placing points around the male, female and trap curves (inside and out), creating guide lines between them and then surfacing around that?

Did you ever figure out a logic that works ?
Wouldn’t it be possible to treat the connection as multiple surfaces that are joined in the end?
Maybe I’m over complicating it.

  1. The right half of the top and bottom pipe
  2. Right half of the bottom pipe + bottom part of “out” pipe
  3. Right half of “in” pipe and top part of “out” pipe
    Then generate the contours for those shapes. On the basis of “blend curves”
    At least that would be my initial thought. I might be way off tho.

not solved yet. I did a quick sketch based on your logic, but figuring out which piece is which manually is a pain, although I got a bit closer to solving that portion today on something else
You then also need to create three way infill pieces. I’m not convinced this approach is the right place to start from either.an_alt_take.gh (33.1 KB)

This is what I was referring to.
Basically you sort the curves based on the surfaces you need. And from here you can evolve.
What is left is to connect the surfaces together. But the main part/idea should be there.
Is this towards your goal ?
an_alt_take_V2.gh (58.5 KB)

1 Like