Here's the first release of the NACA Airfoil Generating script :)
Release notes copied here for convenience:
REVISION HISTORY
DATE CHANGES
2015-02-21 Initial ALPHA release.
RELEASE NOTE:
This version only generates a NACA five-digit series airfoil and
the associated airfoil mean chord line. Output has NOT YET BEEN VERIFIED
against official NACA ordinates available in the pdf documents below.
KNOWN LIMITATIONS:
- T.E. currently only created as in the 'open' style (as described by NACA).
A line segment closes the otherwise open T.E., however it and the airfoil
profile are not joined by the script, (for want of MoI geometry database
method knowledge); do it manually for the meantime if required.
- If coefficient A4 were to be edited to generate a closed T.E., the
T.E. shape is incorrect. (as permitted by NACA documentation)
TODO: make closed T.E. curve start(?) and endpoints corner points.
TODO: make T.E. thickness user variable (var A4).
- Reflex camber lines are not yet implemented.
- TODO: Implement four-digit series, 43012A, six-digit series; in roughly
that order.
I got a little distracted playing with hiding/unhiding divs in the UI (to enable separate four-digit and five-digit series UIs). It only partially worked, so I returned the htm to an earlier version for the moment.
I also played with joining a line segment to a curve, before each is committed - it's not working yet - I just don't have a grasp on the construct of a GeometryFactory vs a GeometryDatabase.
I got stuck trying to get (convert?) the ObjectList objects from an interpcurve factory into a GeomObject object for the join factory. I'm not sure it's even possible, or a correct approach.
Brian - you experienced similar problems with your prop generating script:
http://moi3d.com/forum/index.php?webtag=MOI&msg=4801.159 - but I can't see how you implemented the methods from the SpurGearProfile in PropDesignGeoThru_1_7_2012.7z - if that even is the version in which you got the join working.
The ideal solution would actually be to forget about a join and simply make the first and last points corner points. Is it even possible to specify that points in a GeometryFactory are corner points? I need the last point of the airfoil curve to be a corner point in any case, if the airfoil profile is to be a closed one. Equally, there would be two corner points if I was to close the otherwise open, (NACA terminology for a trailing edge (T.E.) edge with finite thickness) trailing edge with a line segment.
I also found some potentially useful extra methods not yet documented in David Morrill's 'Moment of Inspiration Javascript Documentation' in the moi.idl file:
[GeometryFactory].getInputObjects() and [GeometryFactory].getCreatedObjects() - are these of any use or am I barking up the wrong tree? Where might they be used anyway?
Thanks for any further help or comments - and please tell me about any bugs (I expect many).
BTW, if you're not into building wings, some of the thicker profiles this script generates make a good budgerigar-like profile for further lofting.
Cheers,
Hamish