Quick and dirty code with few protections.
Print in vase mode with some not to brittle plastic
Don't go crazy with radius and stick to steps even divisible to height.
As usually i appreciate reports of successful prints especially in flex type materials .
x = 25; // bellows inner measurement
y = 50; // bellows inner measurement
approx_z = 100; // bellows relaxed height without sleeves
steps = 10; // number of folds
step = round(aprox_z / steps);
z=step*steps; // exact height
ext = 1.5; // fold horizontal extension multipler
radi = 1; //
verticalsegment = 0.2; // vertical segment between folds
sleeve = 20; // Sleeve at ends
sleeve_ext = 0; // Sleeve horizontal extension (multiplied by sleeve value added to x/y)
Huge thanks to Elstak for Verification and this nice video https://youtu.be/jIlPBB8f2_I