Skip to content

david-days/wingwalker-pypi

Repository files navigation

Wingwalker Python Module

This Python module provides core functions and scripts to create useful airfoil models and files from engineering specifications. These base models can then be used to create useful designs and implementations (VR and 3D models, 3D printer components, etc).

Philosophy

Wing selection and design can be very complex. From the choice of starting airfoil specs (custom or existing), to cost analysis, and finally to construction, the spectrum of both choices and pitfalls at each stage can become overwhelming pretty quickly, especially to someone whose primary interest is what comes after the wings are bolted on.

The goal behind this software is very straightforward: To give everyone, from the basic hobbyist to the serious (semi)professional, the ability to go quickly from theory and specs to design to real- or virtual-world production of airfoils and wings.

Installation

$ pip install wingwalker

Usage

Examples of performing various operations are included in the examples directory. Each example is a self-contained demonstration of that feature, from reading the input specification to generating the targe or displaying the products.

The process too generate an STL file for processing or sending to a 3D printer is very simple. This script, located in the examples directory, shows the entire process.

In this example, the requirements for the wing STL file are stored in elliptical_left_wing_256mm.json. This python script parses the request, parses the designated airfoil specs, and then steps through the process to generate an elliptical wing of the given dimensions.

import os

from wingwalker.build_params.wing_request import WingRequest
from wingwalker.generators.wing import get_airfoil_specs, get_lambdas, generate_wing
from wingwalker.io.exports import export_stl

config_file = 'elliptical_left_wing_256mm.json'

# Read the values from the file
wing_req: WingRequest
with open(config_file, 'r', encoding='utf-8') as fin:
    json_str = fin.read()
    wing_req = WingRequest.from_json(json_str)

# Retrieve the specs from the request path
af_specs = get_airfoil_specs(wing_req)

# Get lambdas (dimension functions for the given parameters)
c_func, t_func, z_func, area_func = get_lambdas(wing_req)

# Generate the actual wing model
model = generate_wing(wing_req, af_specs, c_func, t_func, z_func, area_func)

f_name = f'{wing_req.name}_geometric_wing.stl'
if os.path.exists(f_name):
    os.remove(f_name)

export_stl(model, f_name)

print('Aircraft wing STL file generated.')

print(model.__repr__())

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

This software is distributed freely under the MIT license. You are free to use, abuse, modify, or ridicule the software, its products, and its processes in any way you see fit.

Output generated by the original software is published under the Create Commons license, and may also be used for any purpose, commercial or not. Users of this software may freely apply or replace the CC license with their own license or restrictions, as they desire.

Credits

wingwalker was created with cookiecutter and the py-pkgs-cookiecutter template.

About

Airfoil and wing design utilities

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •