Forum Home | RFQwork | CNCauction | 3dxhobbies |Welderzone | Share Files | Site Map | Links |

CNCzone.com-The Largest Machinist Community on the net!


Welcome to the CNCzone.com-The Largest Machinist Community on the net! forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Home Page Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Mark Forums Read Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > CAM Software > BobCad-Cam

Notices

BobCad-Cam Discuss all BobCad software here.


Reply
 
Thread Tools Display Modes
  #1   Ban this user!
Old 12-12-2003, 02:05 PM
cely's Avatar
cely cely is offline
 
Join Date: Nov 2003
Location: Horseshoe Bay, TX
Posts: 49
cely is on a distinguished road
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.
Attached Files
File Type: txt wing designer.txt‎ (4.5 KB, 188 views)
__________________
Poor planning on your part does NOT constitute an emergency on my part!
Reply With Quote

  #2   Ban this user!
Old 12-12-2003, 02:10 PM
cely's Avatar
cely cely is offline
 
Join Date: Nov 2003
Location: Horseshoe Bay, TX
Posts: 49
cely is on a distinguished road
MH 30 Airfoil

Here is a file with an airfoil to try.
Attached Files
File Type: txt mh30 airfoil.txt‎ (1.9 KB, 163 views)
__________________
Poor planning on your part does NOT constitute an emergency on my part!
Reply With Quote

  #3  
Old 12-12-2003, 02:26 PM
HuFlungDung's Avatar
HuFlungDung HuFlungDung is offline
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,446
HuFlungDung is on a distinguished road
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)
Reply With Quote

  #4   Ban this user!
Old 12-12-2003, 02:52 PM
cely's Avatar
cely cely is offline
 
Join Date: Nov 2003
Location: Horseshoe Bay, TX
Posts: 49
cely is on a distinguished road
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!
Reply With Quote

  #5  
Old 12-12-2003, 03:18 PM
HuFlungDung's Avatar
HuFlungDung HuFlungDung is offline
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,446
HuFlungDung is on a distinguished road
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)
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 12-12-2003, 04:41 PM
cely's Avatar
cely cely is offline
 
Join Date: Nov 2003
Location: Horseshoe Bay, TX
Posts: 49
cely is on a distinguished road
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!
Reply With Quote

  #7   Ban this user!
Old 08-20-2009, 11:11 PM
forest1102 forest1102 is offline
 
Join Date: Aug 2009
Location: US
Posts: 1
forest1102 is on a distinguished road
Good post. I appreciate it

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
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT -5. The time now is 08:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.