Skip to content

feat(gui): round-trip Von Kármán profile + frictionLambda (#345) - #355

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/gui-vk-profile-roundtrip
Aug 9, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/gui-vk-profile-roundtrip

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Closes #345.

What

The GUI plans/saves from a reserialized project model, so any .wind field the model doesn't carry is silently dropped. The internal model never carried the mandrel profile (Von Kármán nose, schemaVersion 1.2) or the helical frictionLambda (non-geodesic friction ratio, 1.3): a VK file was blocked on open by a guard, and — once the guard was lifted — would lose both fields on save (planned/exported as a plain cylinder). #352 added frictionLambda to the Zod gate for validation parity but never threaded it through the converters — a latent silent-strip masked only by that guard.

Change

  • Thread profile (mandrel) and frictionLambda (helical) through the internal model (project.ts) and both converter directions (converters.ts).
  • Emit the highest schemaVersion the content requires: frictionLambda→1.3, profile→1.2, endDiameter→1.1, else 1.0 (monotonic max; additive/backward-compatible).
  • Remove the load guard — a VK file now opens, edits, saves, and plans losslessly, at parity with how cone files round-trip (gui: cone endDiameter silently stripped on open/plan/save (.wind 1.1 data loss) #344).
  • Fields are omitted when absent, so plain cylinder / geodesic files stay byte-identical.

Scope

Data-fidelity only, mirroring #344 — no new form controls (endDiameter has no editor either). Authoring a profile/friction wind from scratch in the GUI is deferred to a follow-up mandrel-authoring editor.

Tests

  • New round-trip regression block (converters-document.test.ts): a VK-friction .wind survives open→save with profile + frictionLambda intact; a geodesic VK nose stays 1.2; a plain cylinder gains no spurious fields; profile survives the visibleLayerCount preview slice.
  • The open-guard test flips to assert a successful load of a VK file.
  • 339 GUI tests pass; tsc + svelte-check + stylelint clean. Backend plans the emitted shape end-to-end (verified against examples/vk_nosecone_friction/input.wind).

Review

Adversarial review: SHIP, no blocking defects, no silent-data-loss path across all four serialization paths (save/export/preview/plan). Three minor comment nits folded in.

The GUI plans/saves from a reserialized project model. That model never
carried the mandrel `profile` (Von Kármán nose, schemaVersion 1.2) or the
helical `frictionLambda` (non-geodesic friction ratio, 1.3), so a VK file
was blocked on open by a guard, and — once the guard was lifted — would
lose both fields on save (planned/exported as a plain cylinder). #352 added
frictionLambda to the Zod gate for validation parity but never threaded it
through the converters, a latent silent-strip masked only by that guard.

Thread both through the internal model and both converter directions, and
emit the highest schemaVersion the content requires (frictionLambda -> 1.3,
profile -> 1.2, endDiameter -> 1.1, else 1.0). Remove the load guard: a VK
file now opens, edits, saves, and plans losslessly, at parity with how cone
files already round-trip (#344). Fields are omitted when absent so plain
cylinder/geodesic files stay byte-identical.

Data-fidelity only, mirroring #344 — no new form controls (endDiameter has
no editor either). Authoring a profile/friction wind from scratch in the
GUI is deferred to a follow-up mandrel-authoring editor.

Regression tests: a VK-friction .wind survives open -> save with profile
and frictionLambda intact; a geodesic VK nose stays 1.2; a plain cylinder
gains no spurious fields. The open guard's test flips to assert a load.
@CameronBrooks11
CameronBrooks11 merged commit 01f28a5 into main Aug 9, 2026
18 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/gui-vk-profile-roundtrip branch August 9, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gui: edit/round-trip mandrelParameters.profile (Von Kármán) in the project model

1 participant