BOBCAD Model Airplane Wing Design Script


Results 1 to 7 of 7

Thread: BOBCAD Model Airplane Wing Design Script

  1. #1
    Registered cely's Avatar
    Join Date
    Nov 2003
    Location
    Horseshoe Bay, TX
    Posts
    49
    Downloads
    0
    Uploads
    0

    Lightbulb BOBCAD Model Airplane Wing Design Script

    The BOBCAD script "WING DESIGNER.bas" takes Eppler formatted airfoils (space separated XY pairs) and places them into your design. You get one airfoil everytime you run the script.

    You build up a wing by running the script several times, starting at the port wing tip and proceeding to the starboard wing tip. A wing requires at least two airfoils. After all the airfoils are placed, connect the trailing edges of each profile together with line or arc segments. I left the "points" in the design to make this easier. Then skin the design to create all the "ribs" (tool diameter=0, line spacing=1" and toolpath=perpendicular) in between the airfoils or the tool path (parameters as required) if you are making a mold.

    You can position the airfoils as required to make straight, swept (like a B-52) and even cranked wings (like an F4U Corsair).

    You can rotate the airfoils at a crank point to make the transition smoother and more realistic.

    You can scale the airfoils to make the wings taper from the root to the wing tip.

    You can use different airfoils at the root and tip to change the wing characteristics and make the wing look more realistic. If the airfoils do not have the same number of XY pairs, you will have to execute a 3D/Equalize before skinning the wing.

    Or you can do all of the above. The resulting ribs and/or tool paths will transition smoothly from airfoil to airfoil. Given a little thought, it's even possible to make the duct for a ducted fan.

    I've placed trans-sonic airfoils on a Stuka Dive Bomber. Not realistic, but fun.

    Before you start, you must open an NC Object window (the green tool) and PASTE an Eppler formatted airfoil into the NC Object window. Remember the rules, only spaces and XY pairs of numbers. No blank lines, tabs, commas or format characters. Beware, the script doesn't check for errors.

    To run the script, select SPECIAL/SCRIPT. Press FOLDER to tell BOBCAD where to find the script. Then SELECT "wing designer" and press EXECUTE. Set the scale, position and rotation paramters as required (or just use the defaults when comparing different airfoils) and BaDaBingBaDaBoom.

    To skin and face the wing,

    1. Connect the points on the trailing edges of all the airfoils, starting at the port wing tip and progressing to the starboard wing tip. If the profile is not closed, connect the points on the bottom surface airfoil. To connect with line segments, execute Line/Join. To connect with arcs, execute Other/Spline. Unselect this chain of line and/or arc segments.

    2. select the airfoils and execute a 3D/SetPath. Blank the airfoils.

    3. select the chain of line and/or arc segments connecting the trailing edges of all the airfoils (all arrows must go from port to starboard) and execute a 3D/Skin.

    4. Execute Change/Attributes and change the layer to "skin". It's easier if things are on seperate layers because you may want to skin the wing again and again and again.

    5. Execute OTHER/FACE. If the tool diameter was set to 0 when you skinned the wing, the surface will look like the wing.

    6. Execute Change/Attributes and change the layer to "face". Like I said, it's easier to keep things seperate.

    Airfoil coordinates can be found all over the internet. This site has several model airplane airfoils. These airfoils have lots of XY pairs. The result is a very smooth wing.

    http://www.mh-aerotools.de/airfoils/

    This site has a lot of realistic airfoils, however, you will have to change the tab character to a space before they can be used. These airfoils do not have as many XY pairs. The result is probably OK, but not as smooth.

    http://www.winfoil.com/airfoildb/airfoil.asp

    If your are into custom airfoils, most airfoil design programs will output Eppler formatted airfoils with an arbitrary number of XY pairs.

    I leave the addition of all the other structural members to the user. Since, they are mainly straight peices, it shouldn't be that hard, especially if you only used one airfoil. I left the points in the airfoils to help you add the rest of the structure.

    I want to acknowledge HUFLUNGDUNG for his advice on scripting and TRISTAR300 who got me thinking about airfoils and wing design. Thanks, guys.

    Happy Holidays,

    CELY

    PS If you think this script is useful (or just fun) please let me know....Especially if you create something that flies.

    NOTE: The attached file has a ".txt" extension. After you download the file, change the extension to ".bas" or BOBCAD can not execute the script.

    Similar Threads:
    Attached Files Attached Files
    Poor planning on your part does NOT constitute an emergency on my part!


  2. #2
    Registered cely's Avatar
    Join Date
    Nov 2003
    Location
    Horseshoe Bay, TX
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default MH 30 Airfoil

    Here is a file with an airfoil to try.

    Attached Files Attached Files
    Poor planning on your part does NOT constitute an emergency on my part!


  3. #3
    Member HuFlungDung's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    4826
    Downloads
    0
    Uploads
    0

    Default

    Chuck,

    You have my admiration

    One thing which you might want to try (yet ), is to write some of the repetitive CAD sequences into functions. The reason for this is, I believe (not 100% sure), that it makes it much quicker to undo in case a person makes a mistake (highly unlikely ) This may have just been something I dreamt, but back when I scripted, I think I found that everything that was done inside of a function call, was undone in one go, but, if every step is written out and executed in the main script itself, the undo is only one command at a time.

    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  4. #4
    Registered cely's Avatar
    Join Date
    Nov 2003
    Location
    Horseshoe Bay, TX
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default

    Hu,

    This script does not have any SUBS or FUNCTIONS. Just a
    FOR/NEXT to read the XY pairs from the NC Object and another FOR/NEXT to instantiate the points.

    Are you saying that if I put the instantiation loop inside a sub, that an UNDO would delete the entire set of points at once?

    That would be better. I'll think about that for my next script.

    Thanks. Without your good advice, I would be just "duffing" around.

    Poor planning on your part does NOT constitute an emergency on my part!


  5. #5
    Member HuFlungDung's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    4826
    Downloads
    0
    Uploads
    0

    Default

    Yes, an entire set could be deleted at one go, if they were created by one call to the function, which you will create.

    If you need any help to figure out how to call the functions, I can help you out. There may be examples in the script I sent to you. Its probably not difficult for someone like you to figure out anyways

    BTW, it may work better to force your routines into subs, rather than functions, because Bobcad scripting has some quirks about passing double vars back and forth

    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  6. #6
    Registered cely's Avatar
    Join Date
    Nov 2003
    Location
    Horseshoe Bay, TX
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default

    Nuts!

    The "wing desinger.bas" script escaped with a defect. Change the line containing "Z = Zpos" to "Z = 0" as shown below:

    For J = 1 To nl
    PointCoordinates \
    X = UserUnits*(X(J)-.5)*scale,\
    Y = UserUnits*Y(J)*scale,\
    Z = 0
    Next J

    To edit the script, select SPECIAL/SCRIPT. Select the script "wing designer" and press MODIFY.

    Sorry.

    Poor planning on your part does NOT constitute an emergency on my part!


  7. #7
    Registered
    Join Date
    Aug 2009
    Location
    US
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default

    Good post. I appreciate it:rainfro:

    demande simulation pret personnel en ligne - Pret personnel en ligne et de comparer les meilleurs taux afin de... La demande de prêt personnelen lignedemande simulation pret personnel en ligne



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

BOBCAD Model Airplane Wing Design Script

BOBCAD Model Airplane Wing Design Script