Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

F1 Style Cambered Aerofoil Feature Script

Dr_ND_MartinDr_ND_Martin Member Posts: 2 EDU
I've been using Onshape for a while now, I lecture in Aerodynamics at Northumbria University in Newcastle, UK and actively use Onshape as part of the modules I teach across different Engineering disciplines. Recently I've been working on a slightly larger project with students to design an open-wheeled F1 style car and quickly found that by using Feature Scripts, some of the more repetitive and complex geometries could be made in a much easier, more consistent way. So I thought I'd have a go at adding a generic aerofoil profile generator to Onshape.  :)

I spent a number of years designing F1 cars for real, working in the aerodynamics department at Williams F1 and the one thing common to the design of these vehicles is the number of wing elements you end up having to draw. In industry (certainly at Williams) we had a number of tools integrated into our workflow in order to help create aerodynamic wing profile. There are a number of important things a good tool profile should do:
  • Relatively few parameters to control the shape
  • Scale in a sensible way (from small winglets to rear wings)
  • Allow positive and negative camber (the direction the aerofoil curves)
  • Be flexible and easily extendable to multiple elements
The approach is to allow the user to draw a line representing the "chord" of the aerofoil. This defines the overall length and incidence angle of the profile as well as a plane (that the line should be coincident with) which defines the 2D extent that the profile will be "sketched" on, in the example I've created two lines arbitrarily on two planes offset from one another to create the "span" of the eventual wing:

Once the chord line and plane have been selected, the from the dialogue box a number of parameters are presented that can be changed to alter the shape of the aerofoil:
  • Thickness ratio: This controls how thick the profile is relative to its overall chord length
  • Thickness position ratio: Where the point of maximum thickness occurs relative to chord length (0 is at the leading edge...)
  • Leading edge (LE) angle: Controls the amount of overall camber for the profile
  • Trailing edge (TE) angle: Controls the amount of "curviness" at the trailing edge of the profile

The output of the custom feature script is a nice, tidy fill surface that can be quickly and easily lofted/extruded/swept into a wing. Here's one I made earlier:

Have a play around and feel free to post and comments/feedback/suggestions. Below is screenshot of one of the projects I'm currently using the profile generator for. All 26 of the profiles here are driven by the custom feature described above B). I'm glad I found out about Custom Features and I'll definitely be using them more in the future, thanks Onshape!


  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    As a fellow Aeronautical Engineer, I have to say - LOVE IT! 
    Thank you for posting!!!

    I do a bit of 'wing' design myself in Onshape ...

    Philip Thomas - Onshape
  • michael_bromleymichael_bromley Member Posts: 110 PRO
    Very well done! I don't do much (if any) aero design, but am an F1 enthusiast and love that last screenshot!  Looks like a well thought out and executed feature script.
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    Thank you @michael_bromley - There are indeed some very cool Custom Features (that's what we call features written with FeatureScript - mostly to convey the idea that you don't have to write a line of code to use them). The F1 airfoil generator shown here by Dr Martin is just one - on the CustomFeature page of the website (www.onshape.com/customfeatures), there is at least one more ("Profile Generator").

    Airfoil generation lends itself very nicely to CustomFeatures, but the design you see above, was actually done manually

    And in case you were wondering . . . 

    Philip Thomas - Onshape
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,156
    I think Michael was complimenting the OP, not you :smile:
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    @ilya_baran - I always assume it was for me!!! :)
    Philip Thomas - Onshape
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,025 EDU

     Do  you mind if I add this to my FeatureScripts website? ( https://featurescripts.bubbleapps.io/ )
    mb - draughtsman - also FS author: View FeatureScripts
  • Dr_ND_MartinDr_ND_Martin Member Posts: 2 EDU

     Do  you mind if I add this to my FeatureScripts website? ( https://featurescripts.bubbleapps.io/ )
    No problem, please go ahead.

    Thanks for the comments - I'll let you know when I've finished the rest of the project (probably via another post) it's coming on well now :smile:  
Sign In or Register to comment.