Unfortunately, I no longer work at my job. So I stopped working on these scripts since then.
And as stated before, these scripts were for my personal use, and were not meant for general public release.
And I'm not very familiar with the coding style and langage, so you all have to excuse my poor and "draft" coding style
That being said !
It would be a pity to let go the unfold() function. I'll upload a light version the latest version of this function this afternoon.
Andrew, if you want to rewrite "just" the basics for this function with your coding style, it would be very appreciated.
The "academic" stuff can be found here : https://en.wikipedia.org/wiki/Ruled_sur ... e_surfaces
Basically :
-1- Find the two parametrics equations for the red and green shapes, whatever they are (polygons, circle, ellipse, oblong, spline...)
-2- Fill 2 arrays (one for each eq.) with values of these equations in the range [0...step...2*pi+c]
- This step can be tweaked depending on the shape of each function (see example below)
- c is a parameter to allow some overlap, so once the shape is folded/rolled, the overlap is used for welding...
-3- Apply unfold() with these 2 arrays as args
(In this example below, generatrix need to "stick" on every corner of the rectangle shape for a quarter turn of the circle shape)