Maybe you can take something from it?
Multi Form Geometry Curved2Geometry - a twofold curved geometry How to update tubeGeometry geometry based in lineCurve modifications? - #14 by hofk Pino - a procedurally generated and moved skeleton figure