-
Notifications
You must be signed in to change notification settings - Fork 0
NACA 5 Digit Airfoil Generator
File: Shape_Generation_Scripts/NACA_5_Digit_Airfoil_Generator.py
Version: 1.0
Document Type: Part
Generates a NACA 5-digit series airfoil profile in the active CATPart using GSD geometry. The user specifies a NACA designation (e.g. 23012), chord length, point resolution, and output plane. Supports the five standard non-reflexed (Q=0) camber line configurations (P = 1–5). Cosine spacing is used to cluster points near the leading and trailing edges where surface curvature is highest.
The script creates a geometric set containing:
- A Points sub-set with all upper and lower surface points
- A closed GSD spline (
Airfoil_Spline) looping from LE → TE along the upper surface, then TE → LE along the lower surface
Settings are saved between sessions.
| Requirement | Value |
|---|---|
| Python | >= 3.10 |
| pycatia | >= 0.8.3 |
| wxPython | Required |
| Open document | Part |
- Open a CATPart document
- Run the script
- Enter the NACA code, chord length, resolution, and output plane in the dialog
- Click OK — a progress bar shows while geometry is created
- A new geometric set is added to the part containing the point set and closed spline
| Parameter | Description | Default |
|---|---|---|
| NACA code | 5-digit NACA designation (e.g. 23012). Third digit must be 0. |
23012 |
| Chord | Chord length in mm | 1000.0 |
| Points / side | Number of sample points per surface (upper and lower). Minimum 5. | 50 |
| Plane | Output plane: XY, XZ, or YZ | XY |
The 5-digit designation has the form L P Q T T:
| Digit(s) | Meaning | Example |
|---|---|---|
| L (1st) | Design lift coefficient digit. Design CL = L × 3/20 |
2 = CL 0.3 |
| P (2nd) | Position of max camber. Max camber at P/20 × chord. Range: 1–5 |
3 = 15% chord |
| Q (3rd) | Camber line type. Must be 0 (standard non-reflexed). Q=1 not supported. |
0 |
| TT (4th+5th) | Maximum thickness as % of chord |
12 = 12% thick |
Supported P values and their camber positions:
| P digit | Max camber position |
|---|---|
| 1 | 5% chord |
| 2 | 10% chord |
| 3 | 15% chord (most common — 23xxx family) |
| 4 | 20% chord |
| 5 | 25% chord |
Common examples:
-
23012→ CL 0.3, max camber at 15%, 12% thick (classic transport wing section) -
23015→ CL 0.3, max camber at 15%, 15% thick -
24012→ CL 0.3, max camber at 20%, 12% thick
| Button | Action |
|---|---|
| OK | Validates inputs and generates the airfoil |
| Cancel | Exits without generating |
| Reset Defaults | Restores factory default values |
| Clear Saved | Deletes the saved user presets file |
| Help | Opens the full in-script user manual |
A geometric set named NACA_XXXXX_Chord_YYYmm is created at the top level of the part tree containing:
NACA_23012_Chord_1000mm
├── Points
│ ├── Upper_001 (leading edge)
│ ├── Upper_002
│ │ ...
│ ├── Upper_050 (trailing edge)
│ ├── Lower_001
│ │ ...
│ └── Lower_048 (back to leading edge)
└── Airfoil_Spline (closed)
The spline passes through all upper points (LE → TE), then all lower points (TE → LE), forming a single closed loop ready to use as a pad or pocket profile.
Settings are saved automatically to:
%APPDATA%\pycatia_scripts\NACA_5_Digit_Airfoil_Generator\user_presets.json
The next time the script runs, your last-used values are pre-filled in the dialog.
- The leading edge is placed at the origin; the trailing edge is at (chord, 0, 0) for XY and XZ planes
- Cosine spacing: 50 points per side gives very smooth geometry; use 20–30 for lightweight models, 100+ for CFD/analysis work
- Only Q=0 (standard non-reflexed) camber lines are supported; Q=1 (reflexed) will be rejected
- The geometric set name encodes the NACA code and chord length for easy identification
Getting Started
Contributing
- Copy Name and Colour
- Export Properties To CSV
- Find And Select By Name
- Hide Planes And Axis Systems
- Rename Hybrid Shapes
- Replace Name Hybrid Shapes
- Reset Visual Properties
- Screenshot White Background
- Swap Names
- Toggle Show Hide Geometric Set
- Add Border And Title Block
- Add Border And Title Block With Values
- Batch CATDrawing To DXF
- Batch CATDrawing To PDF
- Create Drawing Border And Title Block
- Create Drawing Border And Title Block With Values
- Export Drawing Dimensions To CSV
- Update All Drawing Views
- Update Title Block From Properties
- Update Title Block Headings
- Axis To Axis Keep History
- Axis To Axis Keep History And Structure
- Axis To Axis Keep Name
- Axis To Axis Keep Name And Structure
- Batch Isolate Geometric Set
- Check Duplicate Names In Geometric Set
- Check Open Bodies
- Colour Code By Geometric Set
- Copy Geometric Set To New Part
- Copy Parameters Between Parts
- Create Construction Planes
- Create Spline From Coordinates
- Create ISM OSM STEP Files
- Delete Deactivated Features
- Delete Hidden Elements In Geometric Set
- Export 3D Annotations To CSV
- Export All Parameters To CSV
- Export Curve Lengths Surface Areas To CSV
- Export Geometric Set Structure To CSV
- Export Holes To CSV
- Export Mass CoG Inertia To CSV
- Export Parameter Dependencies To CSV
- Export Points Axis and Geo Set To CSV
- Export Points Axis and Geo Set To XYZ
- Export Points Geo Set To CSV
- Export Points Geo Set To XYZ
- Export Sketch Constraints To CSV
- Extract Boundary Curves
- IGES Export Curve Axis
- Insert Points Catia
- Insert Points Catia Keep History
- Insert Points Catia With Names
- Insert Points Catia With Names Keep History
- Join Explicit No Connect
- Join Explicit No Connect Curve
- Join Explicit No Connect Surface
- List Properties To CSV
- Match Properties In Geometric Set
- Measure Curve With 3 Points As Circle
- Measure Curve With 3 Points As Circle Keep Con
- Measure Radius Surface
- Measure Radius Surface Keep Con
- Measure Radius Surface Keep Con Auto Edge
- Mirror Keep History
- Mirror Keep History And Structure
- Mirror Keep Name
- Mirror Keep Name And Structure
- Publish Hybrid Shapes In Geometric Set
- Reorder Geometric Set Alphabetically
- Rotate Angle Keep History
- Rotate Angle Keep History And Structure
- Rotate Angle Keep Name
- Rotate Angle Keep Name And Structure
- Rotate Three Points Keep History
- Rotate Three Points Keep History And Structure
- Rotate Three Points Keep Name
- Rotate Three Points Keep Name And Structure
- Scale Keep History
- Scale Keep History And Structure
- Scale Keep Name
- Scale Keep Name And Structure
- Select By Colour
- Spline Through Points In Geometric Set
- Translate Direction Distance Keep History
- Translate Direction Distance Keep History And Structure
- Translate Direction Distance Keep Name
- Translate Direction Distance Keep Name And Structure
- Custom Coordinate Airfoil Generator
- Ellipse Generator
- Hole Size Test Plate Generator
- Involute Gear Generator
- NACA 4 Digit Airfoil Generator
- NACA 5 Digit Airfoil Generator
- Plot 2D Function
- Plot 3D Parametric Curve
- Regular Polygon Generator
- Sine Wave Curve Generator
- Spring Generator
- Check Operation Parameters Against Limits
- Export NC Program Names To CSV
- Export Process Table Parameters
- Export Resource List
- Export Tool List From Process
- Manage Program Names And Comments
- Manage Tooling Catalog
- Rename Operations From Tool Name
- Batch Instance Name Equal Part Number
- Batch Rename Instances
- BOM Export To CSV
- BOM Export With Materials
- Check Missing Files
- Clash Detection Export
- Export Assembly As STEP
- Export Component Positions To CSV
- Save Child Parts To STEP
- Save Child Parts To STL
- Backup CATIA Settings
- Clear Script Settings
- Clear CATIA Temp Files
- Configure CATIA Version Settings
- Kill CATIA Processes
- Open CATIA Settings Folder
- Reset CATIA Settings
- Restore CATIA Settings
- Set CATIA Environment Variable
- Toggle CATIA No Start Document
Legal