Hull together steps to prevent gaps
I was having issues with seams between each step in the model. It really messed with my slicer when I tried to 3D print the thing.
Here's a naive refactor that hulls together each step with the previous step. This fixes the gap issue, and my models come out with clean geometry. There is some unintended subtle change in shape though, which looks good on my model but may not be for everyone. Further testing is needed.
Oh, I only did this for cylindric_bend, because that's what I'm using. I bet it would work for the parabolic version though, if this behavior is desirable.
Yeah, you can't just throw hulls around segments in the general case - think about how that would affect the example model, for instance (not to mention the perf impact described in #1).
Can you upload the model you were having issues with? I've had thoughts about how to potentially improve the geometry generated by this module, but I'd want a more robust suite of test cases to develop against.
(The main fix I've conceptualized would be to do the intersections against a properly-computed frustum/prism for each segment instead of a straight cube - with a bit of trig, this should be simple enough to calculate with one 2D polygon and a linear_extrude)
Edited to add: you'd also want to transform the model for perspective within that frustum, which I think is actually not possible with OpenSCAD's forced-uniform last row for multmatrix - see openscad/openscad#749.
I was trying to remember why I didn't go for this before...
Oh, did I really never respond to this? I can still upload the model if that would be useful. I totally get why this approach would not work for many cases...