Multipipe and a line trimmed at both ends

A LINE is successfully trimmed from both ends using Trim with Brep.

At one end, first with a Brep, being a Capped cylinder (output "Outside, flattened) and then, at the other end, with a Surface (output “Inside”, also flattened).

That works as expected, but in a subsequent Multipipe operation, it misbehaves.

The line converts to a pipe alright and the pipe’s ends land precisely on Points common to other lines which are all Polylines (some open, others closed). However, it fails to blend with other lines, at either one end or other end.

As expected, Shrink Trimmed Surface does not help; is there any way that I can, as it were, shrink the trimmed line to the desired length, in case that Multipipe is then able to deal with it in a regular way?

Or perhaps some other, Grasshopper automated workaround?

Thanks for considering.

upload your .gh file, with geo internalised. Then we have something to work with. Regards, Eef

Eef, thanks for the offer of advice.

Before your prompt to internalise (attached) and due to the density of the cobweb of curves, I could not easily see—contrary to what I wrote above—that the ends of at least some of the double-trimmed, radiating lines are not in fact coincident with other points.

Stripping this down to just the lines then revealed the gaps or overlaps. Some lines very slightly over shoot while others very slightly under shoot (best seen at the widest, top layer).

This must be a complete explanation as to why Multipipe fails.

However, given that they’re supposed to be working to the same Point, it is a mystery as to why the ends are not coincident.

(N.B. neither the inner nor the outer six-sided, closed polylines are intended to be neat, equal-sided hexagons!

I think it has something to do with the trimming, as described above.

25B.gh (13.0 KB)

Looks like you just need to flatten the input.

The dashed wire indicates that the data being passed is a data tree.

Multipipe operates on a list of curves, and if given a tree, it will create a separate multipipe surface for each branch of that tree.

If you right click on the Curve component and select the Flatten option, it turns the tree into a single list.

Oh, maybe I spoke too soon, sorry. I see now some of the pipes are not connected even after flattening.

However, the input lines themselves do not connect so this is the expected and correct result for that input.

If you want them to connect then these ends need to be cleaned up.
Ideally this would happen by when they are constructed, but it can also be done as a post-process, snapping nearby points with an adjustable tolerance like this:

25B_cleanup.gh (17.9 KB)

Daniel,

Many thanks.

I was just about to reply that I’d already tried flattening and then I saw your helpful solution of clean-up.

Thanks again!

Daniel,

I appreciate your gentle hint that I might consider fixing this at the construction stage.

I went back to the drawing board and unearthed errors and now all is as it should be. The post hoc clean-up repairs did work but I was encouraged to dig deeper by your “ideal” solution. Given that Gh & Rhino work to six decimal places and were likely to produce coincident points, I suspected that I had mucked up earlier.

Thanks for the nudge in the right direction.