Multipipe gives sharp spikes

Multipipe Sharp Spikes.gh (87.5 KB)

When the angle is too sharp, Multipipe generates spikes. I’m aware that this limitation has been present for a long time. I would like to inquire if there is a solution to address this issue. While I know that voxel tools can be used as a workaround, I am specifically interested in understanding if there are ways to optimize Multipipe for better performance. Thank you!


1 Like

The spikes are due to the pipes overlapping when they are too close together.

One way to fix this is by increasing the distance at which points get merged.

Multipipe Sharp Spikes.gh (100.7 KB)

1 Like

Multipipe Sharp Spikes v2 comparison.gh (93.6 KB)

Thank you very much! @martinsiegrist
But that will change the overall shape into something very different from my goal.


And seems like there are no overlapping curves if I highlight the end points(green) of the curves (Line-Like).

I always think it is caused by the sharp angle between the lines. Not sure if that is true.

1 Like

In general I think it would be better to use curves instead of polylines. The multipipe component has an input for the angle between segments…

1 Like

Multipipe Sharp Spikes v3 Smooth Mesh.gh (94.4 KB)

If I see the underlying mesh, actually every fork gives big or small “spike”, but most of them will be smoothed out by Subd. Only the problematic parts stay.

By realizing that, I tried Smooth Mesh after Multipipe. It gives a good result, but the overall shape becomes much thinner, the radius is uncontrollable.

So, I guess my question now is:
How can I only smooth out the spike parts?

@DanielPiker Would you like to look into this case and find the cause or maybe a solution?
Thanks!

1 Like

If your input curves are smooth curves, the result is much better. This has to do with the proximity of the division of the curve and the intersection of the curves. You get a spike when a division is too close to an intersection.

This can be avoided by using curves instead of polylines and adjust the division with the KinkAngle input.
multipipe_smooth_curves.gh (24.7 KB)

3 Likes

multipipe_smooth_curves V1.gh (58.4 KB)

Thank you very much! @martinsiegrist

But it will not solve the problem, spikes will appear if I push the radius to around 3.
The root cause is the underlying mesh gives very sharp geometries. So, I think smoothing out those edges only is the fundamental solution.
I made your code into an Userobject, thank you very much, I learned a lot from you.

1 Like

Instead of using Multipipe, why don’t you simply use individual solid pipes and join them into one solid with a Boolean unions. This will give you sharp and clean geometry intersections that could still be filleted if you want smoother transitions and even QuadRemesh'ed.

2 Likes

I have been encountering this problem quite a lot recently, so I like to find a solution for this spike thing.

1 Like

Like Martin already explained above, this is caused by your radius being too big. There’s no solution other than making it smaller or choosing a different more appropriate workflow, which may yield different results.

1 Like

I am trying to find a way to smooth out certain edges, the edges make spikes.
I think in this way the multipipe radius can go much higher.

1 Like

Hi Quan Li

I’ll try and clarify what’s happening by illustrating a single node with no offsets.
The distance of each ‘inside elbow’ point from its node has to vary with the angle between the adjacent struts in order to keep the pipe radii similar. Without this nodes would have a strange pinched appearance. The smaller the angle, the further out.
At some point as the angle decreases, the distance takes it further than ends of the struts:

Of course we usually have other nodes connected, and sometimes divisions of the curves between the nodes, so as these points get pushed out, more things can start crossing over each other.

Having lots of divisions of the input curves exacerbates this issue, because the overlaps then happen sooner. So sometimes simplifying the input curves can help, but sometimes we might have sharp angles that we just need to keep.

Potentially we could start splitting and removing faces and merging things where these overlaps happen, but as the radius increases these merges can meet merges coming from the other end of the strut, or from other struts, nodes can get completely engulfed…, and at some point trying to reconnect it would become so complicated that this approach no longer makes sense, and it is better to just use a different approach, such as isosurfacing and remeshing. This also has its downsides though - generally a lot heavier and less editable.

I think there are maybe some small ways the issue could be improved, such as an option to clamp elbows from ever moving beyond the ends of the connected struts, even though it would cause radius shrinkage, but ultimately there will always be a limit that is reached with this approach as radius increases and angles and lengths decrease beyond some threshold.

5 Likes

multipipe_smooth_curves V2 .gh (67.1 KB)

Thank you very much for clarifying the reason!
Now I understand that it is something not that easy to solve.

Hard to say this is a good solution, but I found a simple way to get rid of those spikes in this case. Just offset the mesh after meeting the limit. In this case the radius 2.0 is the threshold, so I stop there, and get the rest of the radius by offsetting the underlying mesh.

7 Likes

Try to solve the Multipipe spikes v2.gh (1.1 MB)

Solved this problem by eliminating the spikes in the base mesh.

2 Likes