GN Distance between splines

Hello everyone

I have like 100 splines, each in a spiral form (1 loop). They are random generated (with random positions and rotations) and close to each other.
If I make them to tubes, by giving them a profile, some of them overlap, because the distance between the splines is too narrow.

Is there a way to rearrange the splines/tubes, so that none of the tubes strongly overlaps with another?

My approach would be, to delete all splines that posess 1 point that is too close to a point of another spline.

Another approach I thought of, is a simulation as rigid bodies, to make the coil “relax” and push overlapping mesh parts out of each other

I need this to create a “semi realistic” coil of snakes, where the snakes obviously cant go through the same portions of space as other snakes.

Thanks for ideas and solutions.

Greetings, Mech

I think it would be better to generate them in a non-overlapping way… you said the are all in a spiral form… so how about following a spiral and generating all the individual spline control points randomly on the go but checking the distance between them ?? Or even havning some distance between already and the randomness “does not cross” this values…

You may have to elaborate this to get a more suited answer. For example with a general sketch of the overal form you are up to ??

I want them to be close, like a coil of snakes, not distanced “far” in general. I even want them to touch each other, but only touch, not overlap in an unrealistic way.

Sounds like you want to watch a couple of circle packing tut’s.
Like this perhaps…

Or look at the Demo Files on the blender site. Try the Simulation > Index Of Nearest file.

I assume this logic can be applied to the curves either of the snakes, or the curves they are following. If you can get the radius at a position the simulation should be able to keep that distance between.

A simpler method may be to activate the Curve: Extra Objects Add-on, and add a few knot curves for the snakes to follow.

I think i understood you… some main curve and some “children” with an offset but also with some randomness… but not greater than the wanted distance between themem like so:

I found a semi-solution.

Set the rigid bodies to “mesh”, so that the spiral tube shape is respected.
And then use a force field with negative force, to pull the spirals in.

The only problem is, that then, the force fields define the shape of the resulting coil, when i wanted to keep the initial setting points and in the best case, only wiggle the snakes to not overlap.