I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and radiuses for
each path point. This will create a polyhedron with multi_sections like the
example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
Long ago I wrote something similar, in order to generate a Klein bottle, and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic curve, where a discrete set of points defines the actual path (center curve passes through points) or the points serve as "control points". I forget the technical name for these sorts of curve, I only remember that there are several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve could also be a smooth curve, following a similar strategy. Control points or actual radii at sample points could determine the radius along every point of the center curve.
So in essence what I'm proposing are two "smooth" functions in terms of 't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1] to a point in 3-space and the smooth curve defined such is the center of your "tube".
Second function D:[0,1] -> R maps every point in the interval [0,1] to a real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace the circle at every point, based on some simple vector calculations, to determine perpendiculars etc. Simple vector calculations, dot products, cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and radiuses for each path point. This will create a polyhedron with multi_sections like the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[Screenshot 2022-10-15 at 10.14.37 PM.png]