Repository navigation
feat(gui): round-trip Von Kármán profile + frictionLambda (#345) - #355
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #345.
What
The GUI plans/saves from a reserialized project model, so any
.windfield the model doesn't carry is silently dropped. The internal model never carried the mandrelprofile(Von Kármán nose, schemaVersion 1.2) or the helicalfrictionLambda(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 addedfrictionLambdato the Zod gate for validation parity but never threaded it through the converters — a latent silent-strip masked only by that guard.Change
profile(mandrel) andfrictionLambda(helical) through the internal model (project.ts) and both converter directions (converters.ts).frictionLambda→1.3,profile→1.2,endDiameter→1.1, else 1.0 (monotonic max; additive/backward-compatible).Scope
Data-fidelity only, mirroring #344 — no new form controls (
endDiameterhas no editor either). Authoring a profile/friction wind from scratch in the GUI is deferred to a follow-up mandrel-authoring editor.Tests
converters-document.test.ts): a VK-friction.windsurvives open→save withprofile+frictionLambdaintact; a geodesic VK nose stays 1.2; a plain cylinder gains no spurious fields; profile survives thevisibleLayerCountpreview slice.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.