diff --git a/CHANGELOG.md b/CHANGELOG.md index 7120bdc7..6c0dd77d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ All notable changes to Kromacut are documented in this file. - **Pull request CI and `test:e2e:all`** - Pull requests into `develop` and `main`, and pushes to them, now run lint, the build, unit tests, the desktop app's Rust tests (`cargo test` on Linux, macOS, and Windows), and every Playwright e2e suite in parallel jobs, with cached npm packages, Chromium, and cargo builds. One `CI passed` check summarizes the result. Fork pull requests get a read-only token and no secrets. `npm run test:e2e:all` runs the same suites locally one after another: the `@smoke` tests, then the docs, landing, privacy, terms, 404, i18n, and i18n build suites, each on a fresh server. It fails if any suite fails, if a Playwright config isn't in the suite list, or if a test isn't run by any suite; the long `@full` export matrix stays on demand. Area specs now refuse to run under the wrong Playwright config and name the script to use. Palette Proof, the Settings legal links, and the adaptive Stack Matrix round trip were not in any suite and now run with `@smoke`. - **Cats Exact benchmark reproducibility** - Audited the stale replay fingerprint against historical prediction changes while preserving captured observations and artifact hashes. Calibrated benchmarks capture provenance before optimization, pin archived source and provenance to one resolved commit, and save full results before golden assertions. CLI validation rejects invalid case/head/grouping selections and report paths that alias saved inputs, and checks replay results against preparation checksums; cached preparation requires an uncached Exact result and rejects mismatched physical/separation settings, repeat budgets, profiles, palettes, and model contexts. Fresh-stack multi-head measurements support warmed repeated samples, deterministic result checks, and separate fitting, optimization, analysis, and build-validation timing. The cats fixtures record the profile hash of the committed LF file instead of its Windows CRLF form, and `.kfil` and performance fixture JSON files are checked out byte-for-byte on every platform, so the immutability check passes on macOS and Linux; cached multi-head preparation still accepts results captured from CRLF checkouts of the same profile. - **Multi-head printing guide** - New in-app documentation page explaining Multi-head printing: prerequisites, how layers become color runs and windows, the Head Schedule, the combination search space, Color grouping, and what Fast, Balanced, and Thorough search depth change, with four explanatory diagrams. The guide, navigation metadata, and diagrams are available in all 12 languages, with measured translated labels and reciprocal Auto-paint links. Covers routed preview colors, 3MF head assignments and M600 checkpoints, single-head fallback, and cancellation when the image changes. Regression checks require matching guide metadata and complete diagram catalogs and label bounds; browser coverage loads the guide and all four illustrations in every language. -- **Multi-head printing** - Auto-paint can analyze per-pixel filament orders across 2–8 heads in a background worker. Successful builds route every color region through its per-layer filament path and scheduled physical head; the preview shows each region’s predicted blend, corrected by the same calibration evidence as single-head builds, and can display its physical filament instead. All smoothing strengths share conforming region boundaries and closed layer geometry, with chunked generation to keep builds responsive. Multi-head 3MFs retain that geometry and physical filament colors, use the selected head count and head assignments, and insert M600 pause markers at exactly the Head Schedule’s swap checkpoints. Selected heads beyond the filament count remain EMPTY, and Center/Edge priorities use the same weighted targets as normal Auto-paint; colors with zero regional weight retain printable surfaces through palette matching and finite routing groups without changing weighted centroids. Fast/Balanced/Thorough controls search effort with bounded deterministic sampling. A **Color grouping** control chooses the search targets: Layer-based merges colors sharing a printer layer; Color-based keeps hues separate within a bounded group budget while preserving every member’s original print layer. At least one group is retained per occupied layer, including visible regions with zero regional weight, so capped palettes keep every printable color assigned without changing scoring weights. Color-based can produce more printed colors, but does not guarantee lower color error. Fast fitted-optics simulation nominates a bounded shortlist; windows and final region paths are scored with the full appearance model and usage-weighted CIEDE2000 on the original grouped colors. Fully scored assignments are reused when their physical context is unchanged, avoiding repeated broad searches during reconciliation. The current order remains available during reconciliation, and calibrated preview colors and the 0.25 minimum predicted gain gate are retained. Head count, search depth, color grouping, and the mode toggle persist through fallback builds and retain edits made during analysis; Multi-head and Flat Paint are mutually exclusive. Worker errors, unusable or non-improving plans, and plans whose predicted usage-weighted mean CIEDE2000 gain over the normal stack is below 0.25 retain the normal single-head model, with a notice and its original start color and swaps. Instructions follow the built snapshot, and before the first multi-head build **Copy** gives the same build prompt the panel shows, not single-head swaps; fallback builds copy their single-head plan. Image changes cancel pending analysis and discard obsolete builds. Controls, notices, schedules, copied text, and usage guides are localized into all 12 languages. Added region/filament routing, head/extruder, pause, smoothing/topology, fallback, predicted gain, async lifecycle, worker failure, and browser settings-persistence regression coverage. Color-group regressions cover capped palettes crossing physical layer boundaries, and calibrated image measurements use final-stack surfaces with CIEDE2000. Added full-model shortlist, proof-anchor, weighted reconciliation, seeded corrected multi-window routing, and bounded-evaluation regressions plus reproducible measured-profile cats/Rocco benchmarks; removed unused LUT analyzers and test-only assignment bookkeeping. +- **Multi-head printing** - Auto-paint can analyze per-pixel filament orders across 2–8 heads in a background worker. Successful builds route every color region through its per-layer filament path and scheduled physical head; the preview shows each region’s predicted blend, corrected by the same calibration evidence as single-head builds, and can display its physical filament instead. All smoothing strengths share conforming region boundaries and closed layer geometry, with chunked generation to keep builds responsive. Multi-head 3MFs retain that geometry and physical filament colors, use the selected head count and head assignments, and insert M600 pause markers at exactly the Head Schedule’s swap checkpoints. The download menu offers only 3MF for multi-head builds, as it does for Flat Paint, because STL can't carry head routing. Single-head fallback builds still offer STL. Selected heads beyond the filament count remain EMPTY, and Center/Edge priorities use the same weighted targets as normal Auto-paint; colors with zero regional weight retain printable surfaces through palette matching and finite routing groups without changing weighted centroids. Fast/Balanced/Thorough controls search effort with bounded deterministic sampling. A **Color grouping** control chooses the search targets: Layer-based merges colors sharing a printer layer; Color-based keeps hues separate within a bounded group budget while preserving every member’s original print layer. At least one group is retained per occupied layer, including visible regions with zero regional weight, so capped palettes keep every printable color assigned without changing scoring weights. Color-based can produce more printed colors, but does not guarantee lower color error. Fast fitted-optics simulation nominates a bounded shortlist; windows and final region paths are scored with the full appearance model and usage-weighted CIEDE2000 on the original grouped colors. Fully scored assignments are reused when their physical context is unchanged, avoiding repeated broad searches during reconciliation. The current order remains available during reconciliation, and calibrated preview colors and the 0.25 minimum predicted gain gate are retained. Head count, search depth, color grouping, and the mode toggle persist through fallback builds and retain edits made during analysis; Multi-head and Flat Paint are mutually exclusive. Worker errors, unusable or non-improving plans, and plans whose predicted usage-weighted mean CIEDE2000 gain over the normal stack is below 0.25 retain the normal single-head model, with a notice and its original start color and swaps. Instructions follow the built snapshot, and before the first multi-head build **Copy** gives the same build prompt the panel shows, not single-head swaps; fallback builds copy their single-head plan. Image changes cancel pending analysis and discard obsolete builds. Controls, notices, schedules, copied text, and usage guides are localized into all 12 languages. Added region/filament routing, head/extruder, pause, smoothing/topology, fallback, predicted gain, async lifecycle, worker failure, browser settings-persistence, and 3MF-only download menu regression coverage. Color-group regressions cover capped palettes crossing physical layer boundaries, and calibrated image measurements use final-stack surfaces with CIEDE2000. Added full-model shortlist, proof-anchor, weighted reconciliation, seeded corrected multi-window routing, and bounded-evaluation regressions plus reproducible measured-profile cats/Rocco benchmarks; removed unused LUT analyzers and test-only assignment bookkeeping. - **Multi-head filament requirements** - Head schedules use final per-color paths only on layers those regions can print, avoiding reloads for abandoned filaments and unprinted suffixes while retaining zero-weight visible regions, useful preloads, and idle-head carryover. Height dithering resolves the actual filtered pixels on the preview's cropped block grid in the analysis worker; routing validation retains those printed surface limits. Added deterministic unused-load, active-layer head coverage, shared-block dithering, cropped-pixel scheduling, swap-count, copied-instruction, and physical 3MF regression coverage. - **Awards page and Snapmaker Innovation Fund winner badge** - A new Awards page shows Kromacut's Snapmaker Innovation Fund Winner medal, linked to the Snapmaker Innovation Fund page. It is available in all 12 languages, prerendered for search engines, and listed in the sitemap. The website footer and the Settings links open it; the desktop app opens it in the system browser. The website and the README each gain an Awards section near the bottom. The badges embed Snapmaker's official logo files unaltered. A maintenance script regenerates the badge SVGs and the PNGs rendered from them; pages show the PNGs because Safari and other WebKit views draw the SVG lettering at the wrong font weight. Added route, static-page, Settings-link, and landing browser coverage. Privacy and Terms browser tests now account for all eight footer links, with the Privacy suite checking keyboard focus from Support through Awards to Privacy, restoring both suites after the Awards link was added. diff --git a/src/App.tsx b/src/App.tsx index 4bce110b..4e9064c4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -502,6 +502,8 @@ function App(): React.ReactElement | null { () => getMultiHeadRoutingPlan(builtModelState), [builtModelState] ); + // Both models are built from parts that only 3MF keeps apart. + const builtModelStlUnavailable = builtFlatPaint || builtMultiHeadPlan !== undefined; const prevModeRef = useRef(mode); @@ -697,6 +699,7 @@ function App(): React.ReactElement | null { setExportStep, exportingSTL, threeDBuildBusy, + stlUnavailable: builtModelStlUnavailable, exportObjectToStlBlob, exportObjectTo3MFBlob: (obj, onProgress, onZipProgress) => exportObjectTo3MFBlob(obj, { @@ -1141,7 +1144,7 @@ function App(): React.ReactElement | null { : undefined } downloadMenuButtonRef={downloadMenuButtonRef} - flatPaintModel={builtFlatPaint} + stlUnavailable={builtModelStlUnavailable} modelExportDisabled={!builtModelValid || threeDBuildBusy} inert={mode === '3d' && threeDBuildBusy} isOrtho={isOrtho} diff --git a/src/components/PreviewActions.tsx b/src/components/PreviewActions.tsx index ce1755e6..e1adae10 100644 --- a/src/components/PreviewActions.tsx +++ b/src/components/PreviewActions.tsx @@ -65,8 +65,8 @@ export interface PreviewActionsProps { onChooseSlicer?: () => void; /** Receives the download menu button, so the slicer chooser can return focus to it. */ downloadMenuButtonRef?: React.Ref; - /** The currently built model is a Flat Paint slab — STL export is useless for it */ - flatPaintModel?: boolean; + /** The built model is a Flat Paint slab or a multi-head build, so STL can't represent it. */ + stlUnavailable?: boolean; /** No valid model exists for the selected 3D mode/settings, or a build is running. */ modelExportDisabled?: boolean; /** Covered by a build overlay: keep keyboard and screen-reader users out as well. */ @@ -117,7 +117,7 @@ export const PreviewActions: React.FC = ({ savedSlicerName, onChooseSlicer, downloadMenuButtonRef, - flatPaintModel = false, + stlUnavailable = false, modelExportDisabled = false, inert = false, isOrtho = false, @@ -453,9 +453,9 @@ export const PreviewActions: React.FC = ({ - {/* Flat Paint slabs carry their colors as per-filament 3MF - objects; a single-geometry STL of the slab is useless */} - {!flatPaintModel && ( + {/* Flat Paint slabs and multi-head builds need 3MF: one STL + can't carry their per-filament objects or head routing */} + {!stlUnavailable && (