Repository navigation
Conversation
Try several piece orders and split rules and keep the layout with the fewest sheets. Add a layout strategy setting (fewest sheets, rip first, largest offcut) and an edge trim margin for sheet goods, both in the cut dialog and saved with the other layout settings.
Show the cut tables, sheet layouts with grain and joinery, oversized cuts and sheet costs in the cutting plan dialog. The preview and the time estimates share one layout view.
|
I see what you're trying to achieve with this change, and I agree with the vision. Since generating the PDF isn't computationally expensive, perhaps we could use a two-column layout, with the settings on the left and an embedded PDF preview on the right that updates automatically as settings change. This would allow users to see the results in real time while avoiding the need to maintain a separate layer of code that essentially duplicates what the PDF already does. |
|
Thanks for taking a look! I agree the cutting plan UI/UX needs more work, and a two-column layout with live-updating results sounds like a good direction. I'd prefer to get there in smaller steps though, rather than one very large change, so I'd keep this PR scoped as it is and do the layout rework as a separate follow-up PR. On using the PDF as the preview: I don't think the PDF should be the main presentation layer. PDFs are awkward to work with inside an app: hard to make interactive, hard to style and limited in how they can respond to the rest of the UI. I see the PDF as a separate export, something you print and keep on hand in the workshop, while the in-app preview is its own thing. That does mean two rendering paths, but with LLM-assisted development, maintaining both is not much of a burden. Beyond the UI, the material stock and cut list are currently very sheet-goods oriented. They need to support dimensional lumber as well. Right now the feature doesn't really work if you use BenchUp to design something like a shed. I think that's a bigger gap than the layout, and another reason to keep the changes incremental. |
One-line description
Show the cutting plan and its sheet costs in the cutting plan dialog, before the PDF is generated.
Stacked on #47. Only the second commit is new here; the first is #47 and drops out of this diff once that is merged.
Changes in detail
CuttingPlan::view()returns the plan as data (material sections, cut rows, sheets, oversized cuts, net area). The preview and the time estimates use it. This is also the data an agent tool for the cutting plan would need (Next tools for agents (CLI and MCP) #42).time_estimates.rsnow call oneSettings::wood_price()with the same rule as before.en,pt_BRandzh_CN.Testing
cutting_view_tests.rs: cost totals, a price of 0, stock missing from the catalog, stock without area, cache invalidation on revision, scope, selection and settings, and a late layout for an older key not replacing the current one.cutting_plan_tests.rsthat the view agrees with the PDF and the estimates. The existing grain and joinery tests pass unchanged.sidebar.rs.benchup-applibrary tests on this commit: the branch adds no failures compared withmain.cargo checkforwasm32-unknown-unknownis free of warnings.