Commit Graph

3 Commits

Author SHA1 Message Date
rob 36d02fcb73 Material-aware pricing: oak ≠ pine
Resolves the v1 simplification where every species cost the same.

- CutItem/StockPiece gain `material`; build_cut_plan and reoptimize group by
  (stock, material) so each bought stick/sheet is a single species; pieces are
  stamped with their material (offcut seeds keep theirs).
- prices.estimate groups by (stock, species) and applies a per-species
  multiplier (DEFAULT_MATERIAL_MULTIPLIERS: SPF 1.0, oak 3.0, walnut 5.5, …),
  persisted to material_multipliers.json. CostLine shows "oak 1x4".
- PriceEditDialog gains a species-multiplier table; BOM Buy list shows species.
- Offcuts carry material so offcut reuse matches species.
- tests: multiplier scales price, default species at base, mixed species on the
  same stock priced separately, multiplier save/load.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:48:26 -03:00
rob 2ee4c56b3a Phase 7: shop Inventory window + stats
- gui/inventory_window.py: read-only management view over the event ledger —
  On-hand / Offcut bin / Build history / Stats tabs (shop-wide), with Refresh.
- Wired into the main window: new Shop ▸ Inventory… menu.
- Plan doc marked complete (all 7 phases; offcut reuse opt-in toggle, purchase
  price-book update opt-in).
- tests: window renders a populated ledger and an empty one.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:25:28 -03:00
rob c36ed3407e Phase 1: material + finish fields + color resolver
Parts now carry material/finish/finish_color instead of a finishes list.

- Part: material, finish (raw|sanded|clear|stain|paint), finish_color (hex).
  from_dict migrates the old finishes list; serialization additive.
- scene.set_material / set_finish / paint (finish() kept as alias); colors
  normalized via new colors.py (name->hex, lighten/darken/blend).
- part_color() resolves stock->material->finish->visual; viewer applies it with
  a subtle deterministic per-part tint (same-material boards stay distinct);
  sanded reads lighter, painted shows its color, stain/clear tint.
- lumber.MATERIAL_COLORS + default_material(stock).
- CLI: paint / finish / material subcommands; controller TOOL_CMD wood-paint/
  finish/material + group methods; Parts panel Paint…/Material… buttons +
  inspector shows material/finish.
- Updated instructions (sand + finish coats), cli status, estimate to new model.
- tests: set/paint/migrate/json-roundtrip, color priority + fallback, helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:01:28 -03:00