Skip to content

Precision CAD#1

Merged
SkyeRangerDelta merged 11 commits into
mainfrom
precision-cad
Jun 10, 2026
Merged

Precision CAD#1
SkyeRangerDelta merged 11 commits into
mainfrom
precision-cad

Conversation

@SkyeRangerDelta

Copy link
Copy Markdown
Owner

This pull request introduces a major new feature: support for parametric (designer-made) tools using shape primitives, alongside enhancements for per-tool clearance overrides and related API/model changes. It also adds a new CI workflow and discloses AI assistance in the project. The most important changes are grouped below.

Parametric (Designer) Tool Support:

  • Introduced the ToolShape model and related logic, allowing tools to be defined as a set of parametric 2D primitives (rectangle, ellipse, line). Added endpoints to create and update tools with parametric shapes, and logic to materialize these shapes into polygon outlines. (backend/app/models/schemas.py, backend/app/api/routes.py, backend/app/services/shape_compiler.py) [1] [2] [3] [4] [5] [6] [7]
  • Updated endpoints and models to track whether a tool is parametric, and to ensure only valid operations are allowed (e.g., shape-based tools can't have points directly edited unless detached). (backend/app/models/schemas.py, backend/app/api/routes.py) [1] [2] [3] [4]

Per-Tool Clearance Override:

  • Added support for a per-tool clearance_override property, which takes precedence over the bin's default cutout clearance during STL generation and related operations. (backend/app/models/schemas.py, backend/app/api/routes.py, backend/app/services/bin_service.py) [1] [2] [3] [4]
  • Added tests to verify correct clearance resolution and application. (backend/tests/test_clearance_override.py)

Continuous Integration and Project Settings:

  • Added a GitHub Actions CI workflow to run backend and frontend tests, type checks, and linting on pushes and pull requests. (.github/workflows/ci.yml)
  • Updated local project settings to allow specific bash commands and enable all project MCP servers. (.claude/settings.local.json)

Documentation:

  • Added an AI Disclosure section to the README.md, noting the use of AI coding tools in the project. (README.md)

SkyeRangerDelta and others added 11 commits June 10, 2026 13:53
…r keystroke

Typing a value whose first digits fell below the field minimum (e.g. 37
into the 30-100 grid unit field) was clamped mid-typing and ended up at
the maximum. New shared NumberField keeps local text state and only
parses/clamps on commit, mirroring the existing DepthInput pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Shared MeasurementOverlay renders mm edge lengths along each edge and
interior angles at each vertex, with decimation for dense traces. Wired
into the trace-page PolygonEditor (via a new scaleFactor prop fed from
session.scale_factor) and the library ToolEditor (mm-native, includes
interior rings).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tools can now be authored from exact-mm shape primitives (rectangles,
ellipses, guide lines) instead of photo traces. New shape_compiler
materializes shapes via shapely (union of solids minus holes, chord-
error-bounded curve resolution, recentred on the bbox midpoint) into
the same points/interior_rings every downstream consumer already uses.

- POST /api/tools creates a parametric tool; PUT compiles shape edits
  and now returns the full Tool
- Guide-mode shapes are stored but excluded from the outline
- Per-tool clearance_override beats the bin cutout_clearance so
  precision shapes are not inflated by the default 1mm
- Parametric outlines skip the 0.3mm simplify (no visible faceting)
- STL cache hash includes parametric/clearance state

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New shape button on the dashboard creates a parametric tool opened in a
dedicated designer instead of the trace editor:

- Rectangle (with corner radius), circle/ellipse primitives with exact
  mm numeric inputs; solid / hole / guide mode per shape
- Live boolean preview via an SVG mask plus the authoritative compiled
  outline returned by the server on every autosave
- Snapping: point-to-point on shape corners/midpoints/centers/quadrants,
  projection onto guide lines and circles, single-axis center alignment,
  configurable mm grid, 15-degree rotation detents (Alt bypasses)
- Per-tool clearance override field and one-way convert-to-polygon
- Invalid geometry (disconnected outline) keeps the last good outline
  and shows a warning instead of saving

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Palletize cutouts top-down: shelf packing (FFDH) of each tool's padded
bounding box across candidate grids, picking the smallest grid footprint
that fits everything (squarer on ties, capped at the 10x10 grid limit).
Padding accounts for cutout clearance plus a printable web between
pockets and the wall margin.

- Auto-arrange toggle in the bin library strip re-packs on every add;
  Rotate toggle allows 90-degree orientation (both persisted in
  settings); Arrange button packs the current layout on demand
- Rotation follows the editor/sync convention: points/holes/rings turn
  about the bbox centre and the delta accumulates on placed rotation
- If not everything fits even at 10x10, the most items are placed, the
  rest keep their position, and a banner reports the overflow

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Holding Shift while dragging constrains the move to whichever axis
dominates the drag: trace-editor vertices, tool-editor vertices and
cutout holes, placed tools in the bin editor, and shapes in the
designer. The locked axis stays exactly where it started even when grid
snap would otherwise pull it; the free axis still snaps. The designer
shows an alignment guide along the locked axis.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ReadinessGate only dropped its full-screen overlay once /boot.json
reported ready, but boot.json is written by the container's nginx and
does not exist under `npm run dev` / from-source. The gate therefore
never lifted outside Docker, blocking all clicks behind the splash --
which broke the e2e suite (Continue button intercepted by the overlay)
and local from-source dev.

Use /api/ready as the authoritative signal (a 200 means uvicorn is
bound and tracers are preloaded, per the backend) and treat boot.json
as best-effort progress display only. Works with or without nginx.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SkyeRangerDelta SkyeRangerDelta merged commit 2a09933 into main Jun 10, 2026
3 checks passed
@SkyeRangerDelta SkyeRangerDelta deleted the precision-cad branch June 10, 2026 20:24
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.

1 participant