Repository navigation
Rough print estimates (F31): ~time, ~grams PLA, ~cost on the Print plan card - #155
Merged
Merged
Conversation
✅ Deploy Preview for gridfinity-drawer-planner ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…an card The card shows one estimate line from the analytic volumes of the generated parts (default 15x12in layout: ~4 h 2 min, ~144 g PLA, ~$2.88), with the fixed assumptions stated on the card (PLA 1.24 g/cm3, $20/kg, ~8 mm3/s effective). Test-fit pieces count when the switch is on, via the same merged parts list the copy list uses. The analytic volume formulas move out of the mesh tests into src/utils/partVolumes.ts (unitMath throughout) and the mesh tests now import them, so the mesh still verifies the formula. Profile constants (POCKET_PROFILE, FOOT_PROFILE, binWallProfile, ARC_SEGMENTS) move into a light shared module, src/utils/export/gridfinityProfiles.ts, so the mesh builders stay in the lazy export chunk: index chunk +1.6%, export chunk unchanged. Feature map F31 -> ✅, parity 45.0% -> 47.0% (harness-confirmed).
ntindle
force-pushed
the
poteto/print-estimates-20261027-0710
branch
from
October 27, 2026 12:34
b8e888d to
418b313
Compare
PR Quality Report 📊
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #155 +/- ##
=======================================
Coverage ? 93.79%
=======================================
Files ? 70
Lines ? 3499
Branches ? 1030
=======================================
Hits ? 3282
Misses ? 196
Partials ? 21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What
Print plan card shows one estimate line —
~4 h 2 min · ~144 g PLA · ~$2.88for the default 15×12in layout — with a footnote stating the fixed assumptions (PLA 1.24 g/cm³, $20/kg, ~8 mm³/s effective print speed). Filament grams come from the analytic volumes of the generated parts (baseplates, bins, spacers); test-fit pieces count when the switch is on, via the same merged parts list the copy list uses.src/utils/partVolumes.ts(unitMath throughout): analytic baseplate/bin/spacer volumes,estimatePrint, formatters. The analytic formulas move out of the mesh tests into it; the mesh tests now import them, so the mesh still verifies the formula against real triangles.POCKET_PROFILE,FOOT_PROFILE,binWallProfile,ARC_SEGMENTS, …) move into a light shared modulesrc/utils/export/gridfinityProfiles.ts, so the mesh builders stay in the lazy export chunk.Evidence
printEstimates.test.ts, incl. analytic-vs-mesh volume agreement to 1e-6 across baseplate/bin/spacer sizes; 2 card tests for the estimate line and test-fit inclusion).measure.mjs --n=15 --lh=3): Lighthouse 67 vs 68, TTI 3990 vs 3907 ms, layout 535 vs 502 ms, share 97 vs 87 ms. The n=15 input-to-preview gap (111.4 vs 39.0 ms) did not reproduce in a reversed-order--n=30 --lh=1pair (36.4 vs 35.3 ms) — box noise, same pattern as PR One-click test-piece download (F32): test-fit pieces in the Download files zip #154.print-and-export.mdupdated.Notes (non-blocking follow-ups)
shapes.tsnow re-exportsARC_SEGMENTS(definition moved to the profiles module; gridfinityMesh/binMesh import it from shapes — caught by the mesh tests during the move).