Oh, thx. Yeah, that’s not too bad… https://www.babylonjs-playground.com/#19ERV9#1 Impossible to bend in a flexible tube-like manner, though. In Gijs’s “kinky” playground, look at the 3rd cylinder (camera end). It has 2 bends in it (how did he do that?). Others have a single bend, and we never know if bend is located in center of “tube run”, or nearer to one end or the other. And, all his cyls are the same height, and that’s also a limitation of has-rings-like ops.
Let’s pretend each of Gijs’s cylinder are the same radius/diameter… and that we try to move a sphere of appropriate diameter… down thru his tube-o-cylinders. At every bend-point, the sphere would protrude thru the sides of the cylinder, because the diameter of the tube SHRINKS at every bend-point, right?
A stack manager would be more powerful. Let’s pretend we wish to turn the hasRings cylinder-tube… 90 degrees, toward +x (in the middle of the tube-run). To do that turn, as tight as possible, and as gradual as possible, (don’t allow the tubing to change diameter during the turn)… then one could imagine that it would take 88 (super-low-height) cylinders to make a smooth 90-degree turn that maintained diameter as best it could. 180 degree turns (hair-pins) would require 178 cylinders… each performing 1 degree of angle change. This is probably the BEST chance to get a sphere to travel the tube… without protruding thru tube walls at corners.
This tube-assembling manager would essentially need a scripting language of its own.
tube.turn(startingAtTubeRunPercentage (50% = middle), newDirection (+x), steps (88));
A command like that… would generate the 88 (89?) slanted-top cylinders needed to make a no-diameter-change 90-degree turn… either automatically parenting them into perfect positions, or… some other way (tube builder code).
Me, working in the petroleum industry (not)… we need to get those pipe-inspection-gauges (pigs) to go around pipe-corners properly, without binding the pig. That means, no diameter changes allowed on pipe turns.
I can’t get THIS playground to run anymore, but it has a real nice tube bend… the best I have ever seen, and that’s why I bookmarked it. It is a tube “brancher”, too, rare/difficult.
Probably coded by you, Jerome. When working, it does two 45-degree turns in a very small space, and appears to NOT screw-up (shrink) its tube diameter during the turn. I drooled. Certainly better than my early attempts at consistent tube diameter during turns.
I think I talked about all this before… how path-points need to be close-together on turns… but can be far-apart on straight-runs. BUT, if you have a camera or “car” following a path3d… that has path-points with variable spacing (many around corners, less on straight runs)… the car/cam moves much faster on straight runs… than around tight corners.
This is the reason why ONE of the cylinders in Gijs’s PG… has TWO bends in it. It needed to make a “tight” corner during its “run”… and therefore added more subdivs/bend-points (more rings).
This is all difficult to explain… and I confuse myself while I talk about it. Since the manager is able to “look ahead” (it knows the user wants to do a 90-degree turn to the right in 1-degree ring-turn increments), then it knows it will need to add 88/89 slant-top cylinders DURING the turn… and that would be automated by the manager. Maybe not possible, and maybe low use-case… not sure. Also, I’m off-topic a bit, sorry.