Skip to content
FlywheelCAD

Examples

Glider

A 4.4 m sailplane assembled from three components. One parametric wing function builds a NACA 4412 wing, placed twice with one mirrored. The fuselage is a single loft through 17 sections.

The glider seen from above and to the side: long tapered wings, a slender lofted fuselage and a T-tail.
Fuselage, two wing instances and a T-tail.
Top view of the glider showing the wing planform tapering toward both tips.
Planform: both wings come from one function call.

What it shows

  • Multi-section lofts: the wing sweeps seven cosine-spaced NACA 4412 sections into one seamless solid, with non-linear taper and washout. The fuselage lofts nose, cockpit and tail boom through 17.
  • A parametric component: wing(...) wraps cad.parametric, so each distinct set of arguments builds one component that every instance reuses.
  • Instances with transforms: the same wing placed right and left, the left one mirrored across zx. Every size comes from one knob, MODEL_SCALE, in config.py.

The code

def wing(span=2200.0, root_chord=260.0, tip_chord=110.0,
         root_aoa=3.0, tip_aoa=-1.5, taper_exp=1.7, twist_exp=1.6,
         dihedral_deg=2.5, n_stations=7, samples=10, te_thickness=3.0,
         quality=None):
import fuselage           # defines the "fuselage" component (sized by MODEL_SCALE)
import tail               # defines the "tail" component (fin + stab)
from wing import wing     # parametric wing factory

# One wing shape (built to size), placed on both sides. Chords/span are scaled;
# angles (twist, dihedral) are not.
WING = wing(span=2200.0 * S, root_chord=260.0 * S, tip_chord=110.0 * S,
            root_aoa=3.0, tip_aoa=-1.5, dihedral_deg=2.5, te_thickness=3.0 * S)

# Wing seat: mid-high on the pod, just behind the cockpit.
WING_X, WING_Z = 640.0 * S, 95.0 * S

# --- Placement (components are already built to size; just position them) ---
fus = cad.instance("fuselage")                                    # nose at origin
wing_r = cad.instance(WING, translate=(WING_X, 0, WING_Z))        # right wing (+Y)
wing_l = cad.instance(WING, mirror_plane="zx", translate=(WING_X, 0, WING_Z))  # left wing (-Y)
emp = cad.instance("tail")                                        # T-tail on the boom

One wing function, two wings (one with mirror_plane="zx"). Change the taper and both follow. The signature is from wing.py, the assembly from main.py; each component lives in its own file next to it.

Open Glider.fwcad from the Sample Assemblies bundle.