Planner Math Notes¶
This document summarizes the key formulas and constraints used by the FiberPath planner so new strategies can be implemented consistently.
Coordinate Frames¶
- Mandrel axis (Z): All axial movement is measured along Z. Helical layers convert desired fiber angle into simultaneous Z + rotational moves.
- Head rotation (Θ): Circumferential movement expressed in radians. Conversion between wind angle
α(degrees) and feed rates usestan(α) = v_z / (r * ω). - Tow width (w): Linear coverage per wrap; used to compute the number of passes per layer.
Hoop Layers¶
For hoop-only layers (pure circumferential wraps):
- Number of commands =
ceil(length / w)wherelengthis the mandrel axial span. - Feed rate uses the configured surface speed:
F = rpm * 2πrconverted to mm/min. - Layer time is
(commands * 2πr) / F.
Helical Layers¶
Given mandrel radius r, target angle α, and carriage speed limit v_max:
- Axial advance per revolution:
Δz = 2πr * tan(α). - Required carriage velocity:
v_z = v_surface * tan(α)withv_surface = ω * r. - Clamp
v_zto machine limits. If clamped, recompute the achievable angleα' = arctan(v_z / v_surface). - Number of passes to cover the mandrel:
passes = ceil(length / (w * cos(α'))). Skip-layers adjust this by introducing an integer stride to satisfy coverage without overlap.
Skip / Bias Patterns¶
Skip or bias patterns use a divisor d to skip every nth groove:
- Ensure
gcd(passes, d) == 1to prevent repeating the same groove. - Validate
d < passesand that the resulting pattern still covers the surface. - When computing commands, store the skip index so the simulator can reconstruct coverage.
Layer Metrics¶
Each planned layer records:
time_s = total_distance / feed_ratetow_m = commands * w / 1000commandsemitted and the layer type (hoop,helical,skip)
These metrics roll up into the planner summary surfaced by the CLI/API/GUI and power the simulation estimates.
Numerical Guardrails¶
- Mandrel radius and tow width must be > 0.
- Wind angles constrained to
(0°, 90°]for helical layers. - Machine feed rates validated against per-axis maxima; exceeding them raises
fiberpath.planning.exceptions.FeedRateExceeded. - Pattern divisibility checks ensure skip layers align with mandrel symmetry.
Refer to fiberpath/planning/calculations.py and fiberpath/planning/validators.py for the exact
implementations. This note serves as a human-readable summary for future contributors.