Hi,
Playing with the sweep demo
https://github.com/openscad/list-comprehension-demos/blob/master/sweep-test.scad,
I've tried transitions based on Robert Penner's easing equations from
the Flash/ActionScript days
http://robertpenner.com/easing/penner_easing_as1.txt
Now with a single parameter, k between 0 and 1 as in:
https://github.com/tweenjs/tween.js/blob/master/src/Tween.js
(instead of t:current time, b:beginning value, c:change in value,
d:duration)
for scaling in "path_transform".
I use that to make fillet on airfoils.
Maybe it could be useful for someone else.
Benjamin
2017-01-13 20:20 GMT-02:00 Benjamin benjamin@chaaawa.com:
I use that to make fillet on airfoils.
Maybe it could be useful for someone else.
Benjamin
Nice done. How do you make airfoil fillets with that technique?
On 14/01/17 01:48, Ronaldo Persiano wrote:
Nice done. How do you make airfoil fillets with that technique?
Thank you.
I make an outCubic scaling on the profile (.scad file attached).
Previous versions of my toy propellers were breaking at the junction
between hub and airfoil. They do not any more.
Benjamin
Thank you for your answer. You have illustrated that in the first code and I
missed. Sorry.
The issue in the use of a cubic to make fillets is that it has geometric
concordance in the top but not in the base. You could use another blending
function that has concordance in bottom too:
translate([-spacing/2, 0, 0]) {
sweep(airfoil_points, path_outCubic);
translate([0, 0, height - 0.01])
straight_airfoil();
}
translate([spacing/2, 0, 0]) {
sweep(airfoil_points, path_fillet);
translate([0, 0, height - 0.01])
straight_airfoil();
}
translate([0, 0, -1.5])
cube([80, 50, 3], center=true);
//---------------------------------------------------------------------
path_fillet = [for(i=[0:steps])
translation([0,0,heightii/steps/steps])*
scaling([bottom_w+deltfillet(pow(i/steps,2)),bottom_w+deltfillet(pow(i/steps,2)),1])];
function fillet(k) = sqrt(k*(2-k));
This code fragment should replace an appropriate fragment of your last code.
Then you will get the following preview image:
http://forum.openscad.org/file/n20080/airfoilFillet.png
Behind you see your cubic blending and in the first plane my proposed
blending.
--
View this message in context: http://forum.openscad.org/Sweep-with-easing-equations-tp20075p20080.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
This is a simpler form for the same blending:
path_fillet = [for(i=[0:steps])
translation([0,0,heightii/steps/steps])*
scaling([bottom_w+deltfillet(i/steps),bottom_w+deltfillet(i/steps),1])];
function fillet(k) = ksqrt(2-kk);
--
View this message in context: http://forum.openscad.org/Sweep-with-easing-equations-tp20075p20081.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo:
Trying to follow along here...
What is "straight_airfoil()"?
I am also unclear why there is a "*" on the right side of the line that
says "translation". I guess I'm also confused about what "translate"
is: I looked in the files that are Used, but could not find it. Same
comment for "scaling".
Sure would be nice if you could right-click on the name of a Used file
and pop it up, even in Notepad.
Jon
On 1/14/2017 10:36 AM, Ronaldo wrote:
Thank you for your answer. You have illustrated that in the first code and I
missed. Sorry.
The issue in the use of a cubic to make fillets is that it has geometric
concordance in the top but not in the base. You could use another blending
function that has concordance in bottom too:
translate([-spacing/2, 0, 0]) {
sweep(airfoil_points, path_outCubic);
translate([0, 0, height - 0.01])
straight_airfoil();
}
translate([spacing/2, 0, 0]) {
sweep(airfoil_points, path_fillet);
translate([0, 0, height - 0.01])
straight_airfoil();
}
translate([0, 0, -1.5])
cube([80, 50, 3], center=true);
//---------------------------------------------------------------------
path_fillet = [for(i=[0:steps])
translation([0,0,heightii/steps/steps])*
scaling([bottom_w+deltfillet(pow(i/steps,2)),bottom_w+deltfillet(pow(i/steps,2)),1])];
function fillet(k) = sqrt(k*(2-k));
This code fragment should replace an appropriate fragment of your last code.
Then you will get the following preview image:
http://forum.openscad.org/file/n20080/airfoilFillet.png
Behind you see your cubic blending and in the first plane my proposed
blending.
--
View this message in context: http://forum.openscad.org/Sweep-with-easing-equations-tp20075p20080.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7996 / Virus Database: 4749/13766 - Release Date: 01/14/17
On 14/01/17 16:41, Ronaldo wrote:
This is a simpler form for the same blending:
path_fillet = [for(i=[0:steps])
translation([0,0,heightii/steps/steps])*
scaling([bottom_w+deltfillet(i/steps),bottom_w+deltfillet(i/steps),1])];
function fillet(k) = ksqrt(2-kk);
Perfect!
An outCirc function in my example would have been better than an outQuad
but still behind your solution:
My toy propeller use only part of the round transition.
Thanks again.
Benjamin
--
View this message in context: http://forum.openscad.org/Sweep-with-easing-equations-tp20075p20081.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
jon_bondy wrote
What is "straight_airfoil()"?
I am also unclear why there is a "*" on the right side of the line that
says "translation". I guess I'm also confused about what "translate"
is: I looked in the files that are Used, but could not find it. Same
comment for "scaling".
My code was not complete. It was supposed to be inserted/substitute part of
Benjamin's original code. The module straight_airfoil() , defined in the
original code, makes a sweep of the airfoil profile along a straight
segment.
translation() and scaling() are functions defined in
scad-utils/transformations.scad that is used in the Benjamin's code. Those
functions returns 4x4 matrices to provide affine transformations of points;
so the '*' is a matrix multiplication operator.
scad-utils may be found in Github
https://github.com/OskarLinde/scad-utils .
--
View this message in context: http://forum.openscad.org/Sweep-with-easing-equations-tp20075p20084.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ah. I must have grabbed a bad copy of his code. No definition of
straight_airfoil() in the source code that I used (and which both
compiled and produced the visual output as expected, which is why I did
not suspect something missing). I just checked, again, and the source
code that he specifies at the start of this thread does not have
"straight_airfoil()". Did you get different source code somewhere?
And there was more than one "transformations.scad", so of course I
choose the wrong one to inspect.
Thank you!
Jon
On 1/14/2017 7:27 PM, Ronaldo wrote:
jon_bondy wrote
What is "straight_airfoil()"?
I am also unclear why there is a "*" on the right side of the line that
says "translation". I guess I'm also confused about what "translate"
is: I looked in the files that are Used, but could not find it. Same
comment for "scaling".
My code was not complete. It was supposed to be inserted/substitute part of
Benjamin's original code. The module straight_airfoil() , defined in the
original code, makes a sweep of the airfoil profile along a straight
segment.
translation() and scaling() are functions defined in
scad-utils/transformations.scad that is used in the Benjamin's code. Those
functions returns 4x4 matrices to provide affine transformations of points;
so the '*' is a matrix multiplication operator.
scad-utils may be found in Github
https://github.com/OskarLinde/scad-utils .
--
View this message in context: http://forum.openscad.org/Sweep-with-easing-equations-tp20075p20084.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7996 / Virus Database: 4749/13769 - Release Date: 01/14/17
2017-01-14 22:35 GMT-02:00 jon jon@jonbondy.com:
Ah. I must have grabbed a bad copy of his code. No definition of
straight_airfoil() in the source code that I used (and which both compiled
and produced the visual output as expected, which is why I did not suspect
something missing). I just checked, again, and the source code that he
specifies at the start of this thread does not have "straight_airfoil()".
Did you get different source code somewhere?
You are right: straight_airfoil() is defined not in the first but in the
second Benjamin's code: airfoil_filleted.scad. And my code should be
inserted in that code and not in the first one.