boat propeller customizable - OpenSCAD nSpline() library with show cases

by Parkinbot Dec 17, 2015
Download All Files

Thing Apps Enabled

Please Login to Comment

Hi, great library and I use it a lot!

However with the latest nightly build I get huge numbers of these warnings -

WARNING: pow() parameter could not be converted, in file ../../../../../.local/share/OpenSCAD/libraries/nSpline/splines.scad, line 261
WARNING: pow() parameter could not be converted, in file ../../../../../.local/share/OpenSCAD/libraries/nSpline/splines.scad, line 261
WARNING: pow() parameter could not be converted, in file ../../../../../.local/share/OpenSCAD/libraries/nSpline/splines.scad, line 267

Debugging recursive calls is great fun! Is this expected or am I somehow using your code incorrectly?

OK, I changed line 267 to -

let(t1  = (i==0) ? 0 : pow(lineT1(S,i,N-1), .25)) 

and the warnings went away and it still seems to work.

Thanks. Its the version you are using. The warnings they introduced in the new dev snaps do "break" a lot of old code. I'll have to revise it anyway.

Yeah, it took me half an hour to get rid of 100+ warnings in some of my code. Of course, maybe 50% were actually things not quite right. The "fix" in nSpline maybe counts as this, but the variable where the warning tripped wasn't ever used anyway.

Dear Parkinbot, a great package. I'm using it to make flower petals!
I did discover two usage restrictions for your library. Invalid polyhendrons are generated under some conditions. This results in error messages during Rendering. You can see the invalid polyhendrons using the OpenSCAD View-ThrownTogether option, together with Design-Preview.
The usage restrictions are
a) polygon generation in gen_dat must be clockwise around Z. Counter clockwise results in 100% bad polyhendrons.
b) the very first polygon and very last polygon must not be concave. Concave areas that I have tried result in funny invalid polyhendrons at the ends of the object.

You can see both of these problems easily in your horn.scad example. 1. reverse the gen_dat loop, i = len(S)-1 : -1 : 0

  1. tamper with your poly generation in circle() to create a concave surface, such as: ( i==0? 1.0 : r*cos(w))

Still a great tool!

Lovely design and thanks for your comment.
Using this library puts a lot of responsibility on the user:

  1. Choose the right orientation of your polygons
  2. Avoid any self-intersection of your polygons.
  3. Avoid any mutual intersection of your polygons
  4. Check each manifold created with sweep() using F12 and do a Boolean union with e.g. a cube(1) in F6 mode, to have your design checked by CGAL.

Using the interpolation scheme, which is a bit of magic of its own, will not shuffle the user out of this responsibiltiy.

Special thanks for letting me know that convex polygons lead to some funny behaviour. You can use convex polygons without any restrictions writing

sweep(dat, planar_caps = true); 

I had to change the default value of this parameter during a time period, when OpenSCAD had a serious bug leading to assert violations with non triangulated caps - and never found time to change it back. Did it now! Sorry about the frustration it may have caused you.

Comments deleted.

Is it possible to adjust it so that it's diameter is 20mm, shaft diameter 2mm and shaft height 7mm?

Can I do it myself in Blender?

In principle everything is possible. All the code for the design is written in OpenSCAD. Therefore I don't see any convenient way to alter design parameters in Blender.

I'm seriously a novice when it comes to OpenSCAD, but enjoy using it for simple models within my limited range of understanding. I've downloaded this amazing work of art and became immediately lost in the math.

Is there a way to identify the parameters that directly represent the diameter of the overall propeller as well as those that represent the pitch of the prop?

I have a friend who would like me to try to build a custom prop for his model boat and although I don't know the specifications, I expect he will provide a diameter of no more than 75 mm but I'm unsure of the desired pitch.

The code does not specify these items, although I did find the number of blades. That was just an easy and almost obvious guess.

The boat propreller is meant to give some example code for a quite sophisticated programming techique using interpolation. I never took the burden to 'translate' the code into a boat propreller construction set, having a customizable parameterset, including the parameters you ask. This would make the code more complex or give reason to compile another library.

As a OpenSCAD novice it might get bit challenging for you to understand in detail what is happening. As explained in the text, the approach just defines 4 airfoils (as 2D polygons) and puts them in 3D space. The rest is some Mathematical magic (spline interpolation that calculates intermediate airfoils in 3D space).

If you look into the code you'll find all parameters used in the matrix A. They describe the four airfoils (each row is one airfoil) and their placement in 3D space. The columns are commented. In detail they describe : TX, TY, TZ the translation, RX and RZ rotation, and L, X, XX the airfoil in Naca parameters.

The radius of the blade therefore is 660mm*sizing. To find out the pitch is not so easy and needs some more serious calculation for RX and RZ. To adopt the given pitch without this calculation you could try to scale the blade part (= for loop) in X and Z with some factor.

A good way to find out, what is going on in general, is to call boat_prop(1) and to carefully (!) play around with the numbers in A. You may also find it useful to put in more intermediate airfoils.

Hope this helps and you will have fun.

After a bit more digging, I found Prop-calc, an online calculator which provides blade angles based on pitch parameters. http://n-lemma.com/indoorrc/propcalc.htm

I'm hopeful I can make an association with pitch provided by the calculator and inject it into the OpenSCAD code.

It shouldn't be too difficult to give each of the four airfoils the pitch (angle) calculated for is radial position. But be prepared, there are many solutions and also a theoretical pitch is not a 'practical' pitch. Have a look at this. http://www.boats.com/how-to/understanding-propeller-pitch/

I read the first few episodes and videos and found it educational. It's easier when the boat is radio control and the propeller is made on a 3d printer! No need for adjustable pitch props, just make a slew of them with a wide range of pitch settings. I've yet to communicate with the friend, so I don't know how far this will go. It's a great brain exercise at the very least.

Thank you for your kind response. I very much appreciate your explanation, even though most of it escapes the confines of my alleged mind. I'm confident the friend who desires a prop for his model would have some problem with figuring out the development, despite having been a professional magician. "Any sufficiently advanced technology is indistinguishable from magic." (Arthur C. Clarke)

I understand that boat propeller pitch and aircraft propeller pitch are measured in the same manner, although the hydro- and aero-dynamics are different, obviously. I might be able to locate some reference material regarding blade angles at the stations of the blades, perhaps leading to a solution.

I found Matlab has OpenProp, but that's going from complex magic to complex magic tenfold for me.

I have another friend, our makerspace El Presidente who is quite good at OpenSCAD. Perhaps he can work his magic.

thanks again.


Wonderful job. I'm trying to find out how to make the prop left hand.
Any hint?

the easiest way is to use the mirror operator:

mirror([0, 0, 1])

Really COOL.
But please mind case in scad use < > links, Linux is case sensitive ;)

must be some time involved for these productions !