MoI discussion forum
MoI discussion forum

Full Version: Anyone wish to develop a custom script?

Show messages:  1-4  5-24  25-44  45-64  65-84  85-104  105-124  125-144  …  205-223

From: bemfarmer
28 Dec 2011   [#65] In reply to [#63]
Hi Anthony,
Need to rename either the narrow .htm menu name to match the the javascript .js name, (with different extensions of course.),
or vice versa. (With matching shortcut key of course.)

Variations of scripts and menu's, with modified, but matching names, can have different shortcut keys.


I have a few ideas of how to automate the top and bottom arcs, maybe using part of trim....
The bisector line script looks interesting. There is a wealth of information in Michaels scripts, which I'm trying to underestand...
From: bemfarmer
28 Dec 2011   [#66] In reply to [#65]
For example use rename...

PropDesignGeoCurve.js (Curve version)
PropDesignGeoCurve.htm (narrow version)
(with shortcut key command PropDesignGeoCurve)
From: bemfarmer
28 Dec 2011   [#67]
Creating radius arcs at leading edge & trailing edge using control points

Leading edge radius arc:
1. Calculate all AirFoil control points, as points only.
2. Using pt_ex1 as center, and pt_af1 as radius, form upper half of
semicircular arc_le.
3. Calculate pt_thales1, or locate it using midpoint of line segment from
pt_ex1 to pt_af2.
4. Using pt_thales1 as center, and pt_ex1 as radius, create upper
semicircular arc_thales1.
5. Find intersection of arc_le, and arc_thales1, which is point (pt_tan1).
6. Create new arc_le, using pt_ex1 as center, and pt_af1 as radius start, and
pt_tan1 as radius end.
7. Push arc_le into AirFoilfactories array.

8. Similarly, create arc_te at trailing edge, pt_thales2, and pt_tan2.

9. Starting at pt_tan1, create control points curve factory, using pt_af2...
pt_af24, and pt_tan2. and push into AirFoilfactories array.
10. Push arc_te int AirFoilfactories array.
11. Commit AirFoilfactories array.

12. Create Rails.
Done.





Image Attachments:
LeadingEdge2.PNG  TrailingEdge2.PNG 


From: bemfarmer
28 Dec 2011   [#68]
Also tried out a leading edge radius, using the upper NURBS control point ,of the interpcurve "spline",
in order to create the tangent point. (Don't know if this would be workable in practice.)

I think the leading edge should be a euler spiral curve. (spiro). ??


Image Attachments:
LeadingEdge3InterpNurbsControlPt.PNG 


From: Unknown user
28 Dec 2011   [#69] In reply to [#68]
Hi Brian,

I tried renaming them after I posted that message and it worked out. But glad to know that is what I was supposed to do. The first two pics you posted in your last message look good. I couldn't quite tell about the third pic. It really seems like you know what you are doing now though. Thanks again for all your hard work. I look forward to the next version. I will be away from the computer for most of the day.

Anthony

P.S. I played with some of the blade generation options this time and it seems like it is working. Didn't do a definitive check. But I tried counterclockwise rotation with forward sweep, and elliptical chord distribution, and a different chord, and it all recalculated fine. This is going to be a real time saver. Would it be possible to show the points on the rail lines. Also having the rail lines, rail points, in their own layer. And the airfoil curve(s) and airfoil points in their own layer.
From: bemfarmer
29 Dec 2011   [#70] In reply to [#69]
Scenebrowser Objects or Styles = "layers", and Hide/unHide. http://moi3d.com/forum/index.php?webtag=MOI&msg=4783.2

It would be possible to show the control points for the Rails, using 3 or so pointfactory script lines... (maybe in the
same loop that creates the Rails (?).

The script output should be compared with the fortran output to see if they match, to find errors.

What about using Fillet for the edges?

The top Rail has some portion of the curve in -Y area which seems wrong?
From: Unknown user
29 Dec 2011   [#71] In reply to [#70]
I think trying to fillet the rails won't work as its a chicken and egg thing. You need something to fillet in order to get the right geo. You can't get the right geo with the rest of the geometry defined. You really have to complete the airfoil curve first. I do use a lot of filleting in the models, just not at that step. This is the reason I'm looking for a good solid, otherwise the filleting doesn't work out. Or the boolean ops. To make the hub and so forth.

I plan on checking everything in detail once you get further along.
From: BurrMan
29 Dec 2011   [#72] In reply to [#71]
You cant have those curves continue up to a point instead of breaking away into a radius?
From: bemfarmer
29 Dec 2011   [#73] In reply to [#72]
I've assumed that the slope at the leading edge point would be zero, which the "control points curve" or "through points interpcurve" do not seem to accomplish.

Played around with creating multiple points on the leading edge radius, with array curve, and using them for "control points curve" or "through points interpcurve".
Blue = through points using the extra points.
Black = current method, control points starting at tangent point.
Red = control points starting with the extra radius array points.




Need to LEARN how to calculate MidPoint of a line, given the two endpoints, which should be easy.

There is already a MoI script, "DoArcCenter". Mainly need to LEARN how to substitute existing points, for PointPicker

There already exists a MoI script, "DoIntersect", just need LEARN how to substitute the two arcs for ObjectPicker list, somehow, which a good programmer could do easily. :-)

Image Attachments:
AlternativeMultipoint.PNG 


From: Michael Gibson
29 Dec 2011   [#74] In reply to [#73]
Hi Brian, to create your own object list from scratch call:

var mylist = moi.geometryDatabase.createObjectList();

You can then add an object to it by using the .addObject() method, like:

mylist.addObject( somecurve );

- Michael
From: Unknown user
29 Dec 2011   [#75]
hi burrman,

the naca points stop short of the leading edge radius. this is the problem really. if they extended out enough then you probably could have some sort of shape that you could then fillet after the fact. but you can't have a smooth continuous spline without a few extra steps. i have a screencast showing how i do it. you and michael actually helped me determine that process awhile back. it works great. i have no problem at all doing it manually. i just thought it would be nice for new users of prop_design and moi to have a script. its asking them to learn an aweful lot without it. you have to learn prop_design and moi and then figure out how to model the blade in moi otherwise. this way its a lot easier on a new user.

anthony
From: Unknown user
29 Dec 2011   [#76]
brian,

if the airfoil generation is a problem, I should be able to manually figure out where the missing points need to be and redefine the array so all you have to do is curve fit it. i would just need a few days to test it out and so forth. is this something you would want me to do or are you ok trying to do things another way.

anthony
From: Unknown user
29 Dec 2011   [#77]
hey brian,

i went ahead and found the tangent points needed. so this elimates that work for you. you can now just import the points and curve fit it. you still need to use them as control points rather than through points. going over it i noticed i took out one point for the same reason you have to use them as control points. the naca data points are just plain off some. so these two changes get them to work out nice. i moved the points to make the arcs at the end of the table for you. give this a shot. you should be able to directly make a spline from the data then just lay in the last four points. a simple mirror and two arc commands followed by a join and sweep will finish the model. same method as before, just don't have to find and add the tangent points.

anthony

edit; see updated version, in a later post.
From: bemfarmer
29 Dec 2011   [#78] In reply to [#74]
Thank you very much Michael.
That will really help in making some progress.
:-)
From: bemfarmer
29 Dec 2011   [#79] In reply to [#77]
Thank you Anthony, will take a look...
From: SteveMacc (STEVEH)
30 Dec 2011   [#80]
The leading edge is not a circle. Its radius is as specified only at point zero on the X. The curve has a constantly changing radius away from 0, which a circle or arc does not. It's a pity MoI does not have a curvature radius display then it would be more obvious what I am talking about. An ellipse is a better approximation than a circle. Indeed it is suggested that a tilted ellipse is the way to get the first section of the aerofoil. You do not want tangent connections either. They must be G2 curvature continous at the very least.
From: Unknown user
30 Dec 2011   [#81] In reply to [#80]
everything I have seen from naca shows the le as a circle, including the blue Bible. do you have naca documents or experience regarding your assertions. I have worked for two different propeller manufacturers and the le was a circle tangent to the rest of the data. I'm not interested in noncontructive information. Your free to model things however you like. I enjoy the same frerdom. Frankly I'm tired of responding to your posts.
From: SteveMacc (STEVEH)
30 Dec 2011   [#82]
Read this. www.pdas.com/refs/tm4741.pdf.

Feel free to be thick headed and insulting to boot.

The sections are parabolic by nature.

Image Attachments:
Leading edge.jpg 


From: BurrMan
30 Dec 2011   [#83] In reply to [#82]
MoI DOES have a Conic tool with the RHO value editable if you want to get old school. It's under points and others.
From: bemfarmer
30 Dec 2011   [#84] In reply to [#77]
Anthony, would you please confirm the AFXTAB and AFYTAB data, in particular, the last 6 points, in each array, as follows:

"X & Y" Elements 24: Leading Edge "tangent" point, end of arc radius, and also the starting control point, of the curve "spline".
"X & Y" Elements 25: Trailing Edge "tangent" point, end of arc radius, and also the ending control point, of the curve "spline".
"X & Y" Elements 26: Leading Edge "uppermost arc radius start" point.
"X & Y" Elements 27: Leading Edge "arc radius center" point.
"X & Y" Elements 28: Trailing Edge "lowermost arc radius start" point.
"X & Y" Elements 29: Trailing Edge "arc radius center" point.

I will enter the first and last points of the "spline", again, (a second time, in the order to be selected for spline), to simplify point selection in the for loop.

Show messages:  1-4  5-24  25-44  45-64  65-84  85-104  105-124  125-144  …  205-223