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



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


BobCad-Cam Discuss all BobCad software here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 12-12-2003, 01:05 PM
cely's Avatar  
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, 312 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, 01:10 PM
cely's Avatar  
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, 282 views)
__________________
Poor planning on your part does NOT constitute an emergency on my part!
Reply With Quote

  #3  
Old 12-12-2003, 01:26 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
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, 01:52 PM
cely's Avatar  
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, 02:18 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
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, 03:41 PM
cely's Avatar  
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, 10:11 PM
 
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 Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 07:37 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361