Recently, I was trying to visualize some earmolds in Blender. For those who don’t know – Earmolds are like ear plugs that goes to ear and direct sound from hearing aid to ear canal. Often they made from transparent materials with sound tubes running through them. For those tubes, naturally i used beveled Bezier curves with solidify modifier. But there is a problem. For realistic results, earmolds must have bore, that exactly follows sound tube. And that is awful lot of actions to create that, like: duplicate curve, remove „solidify“ modifier, turn on „fill curve caps“, convert curve to mesh, select it in earmold boolean modifier for subtraction. Luckily there is solution to avoid that pointless clicking’s: to make custom modifier using Blender geometry nodes.
Ok, I am not an expert of that (and don’t even try to consult AI, since last time it wasn’t very helpful – constantly mixed Blender versions, and talk about nodes that don’t exist at all). But by some trial and error, and luck, my geometry node tree is somehow working as intended.

So the actions, that node tree must perform to automatically create a bore in earmold that follows Bezier curve (that represents tube) is something like this:
1. Input tubes geometry

Just simple „object info“ node.
2. Delete rim

The idea was to delete edges where the angle between the connected faces is close to 0 degrees (since all faces in rim are in one plain, unlike any others faces on tube sides).
However, I wasn’t able to get this working, so I began experimenting with various random values and eventually achieved good results. For some reason it is like: delete faces around edges that have angle between those faces greater than 0.78 rad (45 deg)?
Maybe this setup picking steep angles on rim sides, but than it should work with values close to 90 deg, but it won’t 🤔. Can someone explain me what is going on there?
3. Delete inner tube surface

This is easy now, since when rim is deleted inner and outer surfaces are in separate mesh islands, so just delete island by index.
4. Fill tube endings

Closed mesh is needed for boolean mesh operations later. For this – just extrude those edges that have only 1 surface attached, and merge new vertex’s to one by using large proximity distance (effectively creating triangle fan filling).
And from now on, i call this generated mesh „bore“ instead „tube“.
5. Subtract that newly created bore mesh from earmold mesh

Also before this – bore mesh gets same material as earmold, instead one that is inherited from tube.
And its done! Now we can move tube as we want and bore automatically follows it.
Also we can use this geometry node setup for other things, like for example, visualizing some pipes inside glacier, or something.

Some strange bug spotted, it seems, that when I rotate object with my geometry nodes tree, and some additional modifier in viewport and shading is set to „rendered“, sometimes, generated bore endings „explodes“? Maybe my geometry nodes tree is rubbish. But after restarting Blender they goes back to normal 🤔.

Besides, this node setup was crated in Blender version 4.5.3 LTS.