Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
* text=auto eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

*.gcode linguist-generated=true
*.gco linguist-generated=true
*.gcnc linguist-generated=true
*.ngc linguist-generated=true
*.log linguist-generated=true
*.log linguist-generated=true
15 changes: 11 additions & 4 deletions .github/workflows/gui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ jobs:
with:
install-linux-deps: "true"

- name: Run ESLint
- name: Run TypeScript type check
run: npm run lint

- name: Run TypeScript compiler
run: npx tsc --noEmit

- name: Run Stylelint (CSS)
run: npm run lint:css

Expand Down Expand Up @@ -69,6 +66,9 @@ jobs:
- name: Build Vite assets
run: npm run build

- name: Enforce bundle budget
run: npm run perf:bundle

- name: Verify build output
run: |
if [ ! -d "dist" ]; then
Expand All @@ -77,6 +77,13 @@ jobs:
fi
echo "Build successful - dist/ directory created"

- name: Upload bundle metrics artifact
uses: actions/upload-artifact@v4
with:
name: gui-bundle-metrics
path: fiberpath_gui/perf/reports/bundle-metrics.json
if-no-files-found: error

- name: Setup Rust environment
uses: ./.github/actions/setup-rust
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gui-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
# Windows: Verify actual installer files were created
MSI_COUNT=$(find src-tauri/target/release/bundle/msi -name "*.msi" 2>/dev/null | wc -l)
NSIS_COUNT=$(find src-tauri/target/release/bundle/nsis -name "*.exe" 2>/dev/null | wc -l)

if [ "$MSI_COUNT" -gt 0 ] || [ "$NSIS_COUNT" -gt 0 ]; then
echo "[OK] Windows installers created successfully:"
find src-tauri/target/release/bundle -type f \( -name "*.msi" -o -name "*.exe" \) -exec ls -lh {} \;
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,17 @@ jobs:
base: prevTag,
head: newTag
});

// Categorize commits
const added = [];
const fixed = [];
const changed = [];

comparison.commits.forEach(commit => {
const msg = commit.commit.message.split('\n')[0];
const sha = commit.sha.substring(0, 7);
const entry = `- ${msg} (\`${sha}\`)`;

const lower = msg.toLowerCase();
if (lower.startsWith('add') || lower.startsWith('feat')) {
added.push(entry);
Expand All @@ -195,7 +195,7 @@ jobs:
changed.push(entry);
}
});

if (added.length > 0) {
notes += `### Added\n${added.join('\n')}\n\n`;
}
Expand All @@ -205,7 +205,7 @@ jobs:
if (changed.length > 0) {
notes += `### Changed\n${changed.join('\n')}\n\n`;
}

notes += `**Full Changelog:** https://github.com/${repo.owner}/${repo.repo}/compare/${prevTag}...${newTag}\n`;
} else {
notes += `Initial release.\n`;
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ cython_debug/
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

Expand Down Expand Up @@ -218,4 +218,4 @@ __marimo__/
# temporary files
temp/
tmp/
.codex
.codex
36 changes: 36 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
minimum_pre_commit_version: "3.7.0"
default_stages: [pre-commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
hooks:
- id: ruff-check
args: [--fix]
files: ^(fiberpath|fiberpath_api|fiberpath_cli|tests)/.*\.py$
- id: ruff-format
files: ^(fiberpath|fiberpath_api|fiberpath_cli|tests)/.*\.py$

- repo: local
hooks:
- id: gui-typecheck
name: gui typecheck (tsc)
entry: npm --prefix fiberpath_gui run lint
language: system
pass_filenames: false
files: ^fiberpath_gui/src/.*\.(ts|tsx)$

- id: gui-css-lint
name: gui css lint (stylelint)
entry: npm --prefix fiberpath_gui run lint:css
language: system
pass_filenames: false
files: ^fiberpath_gui/src/.*\.css$
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
// CI/CD
"github.vscode-github-actions"
]
}
}
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "FiberPath GUI: Tauri Dev",
"type": "node-terminal",
"request": "launch",
"command": "cd fiberpath_gui && npm run tauri dev"
},
{
"name": "FiberPath GUI: Vite Dev Server",
"type": "node-terminal",
"request": "launch",
"command": "cd fiberpath_gui && npm run dev"
},
{
"name": "FiberPath GUI: Vitest (Watch)",
"type": "node-terminal",
"request": "launch",
"command": "cd fiberpath_gui && npm run test"
},
{
"name": "FiberPath GUI: Vitest (Coverage)",
"type": "node-terminal",
"request": "launch",
"command": "cd fiberpath_gui && npm run test:coverage"
},
{
"name": "FiberPath Rust Backend: cargo run",
"type": "node-terminal",
"request": "launch",
"command": "cd fiberpath_gui/src-tauri && cargo run"
}
]
}
32 changes: 25 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,33 @@ The format is based on Keep a Changelog, and this project follows semantic versi

## [Unreleased]

## [0.7.0] - 2026-04-08

### Added

- Documented critical helical coverage defect: `lockDegrees` compatibility with `patternNumber` is not fully validated and can allow partial mandrel coverage without a planner error for incompatible combinations (for example `lockDegrees=270`, `patternNumber=3`).
- Documented required compatibility rule for helical coverage safety: `(2 × lockDegrees) % (360 / patternNumber) == 0`.
- Documented planned validator hardening to reject `lockDegrees`/`patternNumber` combinations that produce overlapping or aliased in-pattern positions.
- Documented planned behavior fix where `skipIndex` is currently schema-validated but not yet applied to helical in-pattern visit order.
- Documented planned schema normalization for `skipInitialNearLock` from nullable boolean to `bool` with default `false`.
- Documented required docs correction scope for `lockDegrees`, `patternNumber`, and coverage-vs-ply-count semantics, including clarification that feed-rate clamping in planner math is planned, not currently implemented.
- Documented required example updates for compatibility: `examples/rocketry/AvBay(470mm).wind` layer 1 and `examples/rocketry/MainChute(585mm).wind` layer 1 should use `lockDegrees=540` instead of `270`.
- Added GUI bundle-budget enforcement (`npm run perf:bundle`) with CI gating and machine-readable report output.
- Added stricter repository hygiene checks through pre-commit integration for Python lint/format and GUI type/CSS validation.

### Changed

- Completed the XAB-only axis cutover across core planning, simulation, plotting, CLI, API, and GUI export workflows.
- Removed legacy XYZ axis-format options from built-in interfaces and aligned fixtures/examples with XAB defaults.
- Simplified GUI component/style surfaces by removing dead CSS/component paths and tightening shared editor/form boundaries.
- Hardened packaging/CI helper scripts for bundled CLI discovery and cross-platform release reliability.

### Fixed

- Fixed regression tests and fixtures that drifted during axis-format migration, including layer-strategy and plot-signature expectations.
- Fixed pre-commit Ruff hook compatibility by migrating from the legacy `ruff` alias to `ruff-check`.

### Documentation

- Updated release-facing docs to position v0.7.0 as current and reflect XAB-only behavior in user/developer guides.
- Documented helical coverage compatibility caveats and follow-up validation/schema hardening scope in roadmap/release notes.

### Internal

- Synchronized release version metadata across Python (`pyproject.toml`, `uv.lock`), npm (`package.json`, `package-lock.json`), and Tauri (`Cargo.toml`, `Cargo.lock`, `tauri.conf.json`).

## [0.6.2] - 2026-04-07

Expand Down
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Plan, simulate, and manufacture composite parts with precision fiber winding.**

[![Version](https://img.shields.io/badge/version-0.6.2-4c7284)](https://github.com/CameronBrooks11/fiberpath/releases)
[![Version](https://img.shields.io/badge/version-0.7.0-4c7284)](https://github.com/CameronBrooks11/fiberpath/releases)
[![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-00695C.svg)](LICENSE)
[![Backend CI](https://img.shields.io/github/actions/workflow/status/CameronBrooks11/fiberpath/backend-ci.yml?branch=main&label=Backend%20CI&logo=python&logoColor=white)](https://github.com/CameronBrooks11/fiberpath/actions/workflows/backend-ci.yml)
[![GUI CI](https://img.shields.io/github/actions/workflow/status/CameronBrooks11/fiberpath/gui-ci.yml?branch=main&label=GUI%20CI&logo=react&logoColor=white)](https://github.com/CameronBrooks11/fiberpath/actions/workflows/gui-ci.yml)
Expand Down Expand Up @@ -33,7 +33,7 @@ Design multi-layer winding patterns in a visual interface, simulate the full man
- **Geodesic Path Planning** – Automatic computation of stable fiber trajectories
- **Hardware Simulation** – Validate motion before manufacturing
- **Direct Machine Control** – Stream G-code to Marlin controllers with pause/resume
- **Flexible Axis Mapping** – Support for XAB rotational or XYZ linear axis configurations
- **XAB-Native Axis Output** – Standardized rotational-axis output with clear logical axis mapping
- **Cross-Platform Desktop GUI** – Native Windows, macOS, and Linux applications
- **Command-Line Tools** – Scriptable workflows for automation and CI/CD
- **Comprehensive Documentation** – Architecture guides, examples, and API reference
Expand Down Expand Up @@ -115,9 +115,6 @@ pytest
```sh
# Generate G-code from a .wind configuration
fiberpath plan examples/simple_cylinder/input.wind -o output.gcode

# Specify axis format for your machine
fiberpath plan input.wind -o output.gcode --axis-format xab
```

### Visualizing Toolpaths
Expand Down Expand Up @@ -223,21 +220,13 @@ See [Architecture Documentation](https://cameronbrooks11.github.io/fiberpath/arc

## Axis Configuration

FiberPath supports two axis mapping formats:

**XAB (Rotational) - Default**:
FiberPath uses XAB rotational-axis output in built-in workflows:

- `X` = Carriage position (linear, mm)
- `A` = Mandrel rotation (rotational, degrees)
- `B` = Delivery head rotation (rotational, degrees)

**XYZ (Legacy)**:

- `X` = Carriage position (linear, mm)
- `Y` = Mandrel rotation (treated as linear, degrees)
- `Z` = Delivery head rotation (treated as linear, degrees)

Use `--axis-format xab` (default) for new projects. The XYZ format maintains compatibility with legacy systems like Cyclone.
Legacy XYZ programs should be re-generated under current versions. Simulation and plotting reject auto-detected XYZ files with an explicit error so stale programs are surfaced early.

## Documentation

Expand Down
6 changes: 1 addition & 5 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# TODO

Tasks for Cam todo:

- [ ] Remove untracked links and references to old files through out the docs.

- [ ] Add reprapdiscount smart graphics display to our machine and then document the process of connecting it to Marlin. More importantly, create documentation (need to think thru the best format for this) for the Marlin configuration itself for the machine as well as the physical wiring of everything.

- [ ] Review logic of how the various patterns are constructing and give tool tips or tables or aids or something or other to help users understand what the patterns are doing and how to use them effectively. The only relevant one right now is helical where it often gives circuit mismatch errors but its unclear where the raised number values come from / derive from their inputs in the properties panel.
Expand All @@ -20,6 +16,6 @@ Tasks for Cam todo:

- [ ] Fix zooming behavior in the plot viewer so it expands the entire image not within the image bounds since this becomes an issue for larger (exceeds bounds) or smaller (impossible to look at properly) images

- [ ] Track Dependabot moderate alert #3 (GHSA-wrw7-89jp-8q8g / glib). Current Tauri GTK stack pins `glib` 0.18.x (`^0.18` via `gtk`), so patched `glib` 0.20.0 cannot be adopted yet. Do not cut v0.6.2 solely for this; re-check after upstream Tauri/GTK dependency line moves to non-vulnerable glib.
- [ ] Track Dependabot moderate alert #3 (GHSA-wrw7-89jp-8q8g / glib). Current Tauri GTK stack pins `glib` 0.18.x (`^0.18` via `gtk`), so patched `glib` 0.20.0 cannot be adopted yet. Do not block a release solely for this; re-check after upstream Tauri/GTK dependency line moves to non-vulnerable glib.

- [ ] Manual cross-platform validation (waived for v0.6.0, required before v1.0 or first public release): Linux `.deb`/`.AppImage` (Ubuntu 22.04, Debian 12, Fedora 39) and macOS `.dmg` (Intel + Apple Silicon) install, bundled CLI discovery, full workflow (validate → plan → simulate → visualize), serial port, file ops, upgrade, and uninstall. See `planning/roadmap-v6.md` Phases 1 & 2 for the full checklist.
39 changes: 5 additions & 34 deletions docs/architecture/axis-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This document provides a technical deep dive into FiberPath's axis mapping syste
FiberPath uses a **logical-to-physical axis mapping** approach:

1. **Planner operates on logical axes:** Carriage, Mandrel, Delivery Head
2. **Dialect converts to physical axes:** X/A/B or X/Y/Z depending on configuration
2. **Dialect converts to physical axes:** Built-in output uses X/A/B; custom mappings are optional
3. **Planning logic remains unchanged:** Same algorithms work for all output formats

This design allows:
Expand Down Expand Up @@ -72,24 +72,6 @@ Maps logical axes to Marlin's native rotational axes:
- Mandrel → A (rotational)
- Delivery → B (rotational)

### XYZ Mapping (Legacy)

```python
MARLIN_XYZ_LEGACY = AxisMapping(
carriage="X",
mandrel="Y",
delivery="Z",
is_rotational_mandrel=False,
is_rotational_delivery=False
)
```

Maps rotational logical axes to linear physical axes:

- Carriage → X (linear)
- Mandrel → Y (linear, but represents degrees)
- Delivery → Z (linear, but represents degrees)

## MarlinDialect Class

The `MarlinDialect` class wraps an `AxisMapping` with Marlin-specific features:
Expand Down Expand Up @@ -129,12 +111,6 @@ carriage=50.0, mandrel=180.0, delivery=90.0, feed=2000
G1 X50.0 A180.0 B90.0 F2000
```

**Output XYZ:**

```text
G1 X50.0 Y180.0 Z90.0 F2000
```

## Planning Flow

### 1. Wind Definition Parsed
Expand All @@ -160,7 +136,7 @@ commands = [
The G-code writer (`fiberpath.gcode.generator`) uses the selected dialect:

```python
dialect = MARLIN_XAB_STANDARD # or MARLIN_XYZ_LEGACY
dialect = MARLIN_XAB_STANDARD
gcode = dialect.format_move(carriage, mandrel, delivery, feed)
```

Expand Down Expand Up @@ -206,14 +182,9 @@ To support a new controller (e.g., FANUC):
]
```

3. **Register in CLI/API:**

Add to `fiberpath_cli/plan.py` and `fiberpath_api/routes/plan.py`:
3. **Use in core integration:**

```python
if axis_format == "fanuc":
dialect = FANUC_STANDARD
```
Pass it through `PlanOptions(dialect=...)` in direct Python integrations.

### Custom Axis Configurations

Expand Down Expand Up @@ -292,7 +263,7 @@ gcode = dialect.format_move(carriage_pos, mandrel_angle, delivery_angle, feed)

- ⚠️ Adds abstraction layer (slight complexity)
- ⚠️ Dialect-specific optimizations require care
- ⚠️ Must ensure all code paths use dialect correctly
- ⚠️ Must ensure advanced/custom integrations pass dialects consistently

## Future Enhancements

Expand Down
Loading
Loading