Skip to content

Generate Powder Doser CAD via full CADSmith workflow with Opus base model#6

Draft
sgbaird with Copilot wants to merge 6 commits into
mainfrom
copilot/design-powder-dispensing-system
Draft

Generate Powder Doser CAD via full CADSmith workflow with Opus base model#6
sgbaird with Copilot wants to merge 6 commits into
mainfrom
copilot/design-powder-dispensing-system

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown

Runs the full CADSmith pipeline (Planner → Coder → Executor → Validator → Refiner) over the self-contained Powder Doser engineering spec, with Claude Opus as the base model for every agent, producing each printed part and a tilt-0° assembly as manifold STEP solids.

Agent model configuration (autofab/agents.py)

  • Models are now selectable via AUTOFAB_BASE_MODEL (Planner/Coder/Error-Refiner/Refiner) and AUTOFAB_JUDGE_MODEL (Validator); defaults preserve prior behavior.
  • Fixes a latent break: the Judge model was hardcoded to claude-opus-4-20250514, which now returns 404. Judge falls back to the base model when it is Opus-class.
export AUTOFAB_BASE_MODEL=claude-opus-4-5
xvfb-run -a python scripts/run_powder_doser.py

Part-by-part runner (scripts/run_powder_doser.py)

  • Decomposes the §2 assembly into focused, datum/tolerance-faithful sub-prompts (§1/§6/§7 context shared), runs the agentic loop per part, and writes model.py + part.step + render.png + result.json.
  • Resumable (skips parts with an existing result.json); tolerates per-part failures to keep the loop going.

Full-assembly colored isometric renders (scripts/render_assembly_isos.py)

  • New render_colored_iso_views (plus ISO_AZIMUTH_SWEEP and a contact-sheet helper) in autofab/render.py renders multiple STL solids together, each as its own colored Phong-shaded actor, from an arbitrary set of (name, elevation, azimuth) viewpoints.
  • scripts/render_assembly_isos.py execs the assembly model.py, reuses its individual component solids (skipping the union bridges), and colors each by role — brass auger + gear band, grey plates/brackets/hinge pin, black NEMA 11 & MG996R bodies, green pinions. It renders a full isometric azimuth sweep — assembly_iso_az000.pngassembly_iso_az315.png (45° steps at a ~30° iso elevation), matching the reference assembly-render convention — plus a tiled assembly_iso_contact_sheet.png, into cad/powder-doser/powder_doser_assembly/iso/.
xvfb-run -a python scripts/render_assembly_isos.py

Inputs & outputs

  • data/prompts/powder-doser-assembly-prompt.md — the verbatim self-contained prompt.
  • cad/powder-doser/ — 10 printed parts + bench-test auger + threaded cap + assembly (with an iso/ folder of multi-angle, per-part-colored assembly renders), plus summary.json and README.md.
  • .gitignore — keeps STEP/source/renders/logs; excludes regenerable STL meshes (one tessellated thread exceeded 80 MB) and per-iteration scratch.

Results

12/12 solids are valid and round-trip through STEP; 11/12 fully converged on the kernel + vision Judge. auger_cap (printed internal-thread fit) is a valid solid but not Judge-signed within the 3-refinement budget — re-runnable with a larger --max-refinements.

Notes

  • The issue's "Opus 4.8" has no released build; the newest available Opus (claude-opus-4-5) was used and noted in the README.
  • The assembly is a representative single solid: off-the-shelf parts (NEMA 11, MG996R) are envelopes and gear teeth are simplified to bands for the assembly view; printed gears elsewhere are involute approximations.

Copilot AI changed the title [WIP] Design powder dispensing system based on engineering specifications Generate Powder Doser CAD via full CADSmith workflow with Opus base model Jun 22, 2026
Copilot AI requested a review from sgbaird June 22, 2026 19:55
@sgbaird

sgbaird commented Jun 22, 2026

Copy link
Copy Markdown

@copilot I need full assembly renders at various iso angles

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Author

@copilot I need full assembly renders at various iso angles

Added full-assembly renders at several isometric angles in cad/powder-doser/powder_doser_assembly/iso/ — four corner views (front_right, back_right, back_left, front_left) plus top_down and low_front, with a tiled assembly_iso_contact_sheet.png. They're produced by a new scripts/render_assembly_isos.py (STEP → STL → multi-iso PNGs via the new render_stl_iso_views helper in autofab/render.py); regenerate with xvfb-run -a python scripts/render_assembly_isos.py.

@sgbaird

sgbaird commented Jun 22, 2026

Copy link
Copy Markdown

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Author

@copilot use different colors for various parts, similar to what's shown in: https://github.com/vertical-cloud-lab/powder-doser/blob/8feb6a6cfd06c3c46d6f89f779d419f792a8f00d/cad/mounti...

Done. The assembly is now rendered with per-part colors by reusing the individual components from the assembly model.py (brass auger + gear band, grey plates/brackets/hinge pin, black NEMA & MG996R bodies, green pinions). They're rendered across the same isometric azimuth sweep as the reference: assembly_iso_az000.pngassembly_iso_az315.png (45° steps at a ~30° iso elevation), plus a tiled assembly_iso_contact_sheet.png, in cad/powder-doser/powder_doser_assembly/iso/. Regenerate with xvfb-run -a python scripts/render_assembly_isos.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants