M0: docs (README, CLAUDE/AGENTS, ROADMAP, control protocol, NOTICE, attribution), example, parity and oracle reports
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
8a811f8eff
commit
0f3e7701a7
10 files changed
+446
No files matched your search
@@ -0,0 +1,46 @@
|
||||
# Control protocol
|
||||
|
||||
`solvecraft --control PORT` (or `SOLVECRAFT_CONTROL_PORT=PORT`) listens on `127.0.0.1:PORT` for
|
||||
JSON lines. Each request is one line `{"id": …, "method": "…", "params": {…}}`; each reply is one
|
||||
line `{"id": …, "ok": true, "result": …}` or `{"id": …, "ok": false, "error": "…"}`. Requests are
|
||||
handled on the UI thread between frames; pointer and keyboard input is injected as real egui
|
||||
events, one pointer event per frame.
|
||||
|
||||
## Engine
|
||||
|
||||
| Method | Params | Result |
|
||||
|---|---|---|
|
||||
| `engine.execute` | `command`: command id, `params`: JSON object | the command's result |
|
||||
| `engine.script` | `commands`: `[{command, params}, …]` | results, stops at the first error |
|
||||
| `engine.commands` | — | every command: id, label, tab, panel, icon, shortcut, params doc, enabled |
|
||||
| `document.inspect` | `measure?`: bool | parameters, timeline (errors, timings), bodies, sketches, selection |
|
||||
|
||||
Commands never open dialogs when run this way. `solvecraft-cli commands` prints the same registry.
|
||||
|
||||
## UI
|
||||
|
||||
| Method | Params | Notes |
|
||||
|---|---|---|
|
||||
| `ui.inspect` | — | UI state, viewport rect, camera, active tool/dialog, hover, renderer, timings |
|
||||
| `ui.set` | any `UiState` field (`tab`, `perspective`, `showGrid`, `hiddenBodies`, …) | |
|
||||
| `ui.view` | `view`: `front`, `back`, `top`, `bottom`, `left`, `right`, `iso`, `home`, `fit` | |
|
||||
| `ui.start` | `command` | like a toolbar click: starts the sketch tool or dialog for the command |
|
||||
| `ui.click` | `x`, `y` (screen points), `button?`: left/right/middle, `shift?` | real pointer input |
|
||||
| `ui.move` | `x`, `y` | |
|
||||
| `ui.scroll` | `x`, `y`, `delta?` | wheel zoom at the cursor |
|
||||
| `ui.key` | `key` (egui key name, `Enter`, `Escape`…), `cmd?`, `shift?` | |
|
||||
| `ui.text` | `text` | typed text |
|
||||
| `ui.screenshot` | `path?` | PNG of the window (needs a presented frame) |
|
||||
| `ui.render` | `path`, `width?`, `height?` | CPU render of the model with the current camera (no window needed) |
|
||||
| `ui.resize` | `width`, `height` | |
|
||||
| `app.quit` | — | |
|
||||
|
||||
## Example
|
||||
|
||||
```text
|
||||
{"id":1,"method":"engine.execute","params":{"command":"SketchCreate","params":{"plane":"XY"}}}
|
||||
{"id":2,"method":"engine.execute","params":{"command":"ShapeRectangleTwoPoint","params":{"p0":[0,0],"p1":[40,30]}}}
|
||||
{"id":3,"method":"engine.execute","params":{"command":"Extrude","params":{"distance":20}}}
|
||||
{"id":4,"method":"engine.execute","params":{"command":"FusionFilletEdgesCommand","params":{"edges":[[0,0,10]],"radius":3}}}
|
||||
{"id":5,"method":"ui.screenshot","params":{"path":"/tmp/part.png"}}
|
||||
```
|
||||
@@ -0,0 +1,37 @@
|
||||
# Fusion oracle
|
||||
|
||||
Generated by `cargo xtask oracle`. Each case is a part built in Fusion (recipe and measurements kept locally in `plan/fusion/oracle/`, not committed). SolveCraft replays the recipe through its command engine and compares body count, volume and area (relative tolerance 1e-3) and face/edge/vertex counts (exact).
|
||||
|
||||
**2 / 29 cases pass** (16 need features not implemented yet).
|
||||
|
||||
| Case | Result | Notes |
|
||||
|---|---|---|
|
||||
| 01-box | pass | |
|
||||
| 02-cylinder | pass | |
|
||||
| 03-box-through-hole | FAIL | step 11 (Extrude): invalid parameters for `Extrude`: `distance` must be a number or an expression |
|
||||
| 04-revolve-vase | not yet | recipe: sketch entity type `arc_three_point` is not supported yet |
|
||||
| 05-taper-extrude | FAIL | volume_mm3: got 48000.0 want 61814.82596; area_mm2: got 8000.0 want 9676.91517 |
|
||||
| 06-symmetric-extrude | FAIL | volume_mm3: got 15000.0 want 30000.0; area_mm2: got 4100.0 want 6200.0 |
|
||||
| 07-fillet-all-edges | FAIL | step 8 (FusionFilletEdgesCommand): not supported yet: the faces at the edge ends must be planar |
|
||||
| 08-chamfer | FAIL | step 8 (FusionChamferCommand): not supported yet: the faces at the edge ends must be perpendicular to the edge |
|
||||
| 09-shell | not yet | recipe: feature op `shell` is not supported yet |
|
||||
| 10-rect-pattern-holes | not yet | recipe: feature op `rectangular_pattern` is not supported yet |
|
||||
| 11-circular-pattern-flange | not yet | recipe: feature op `circular_pattern` is not supported yet |
|
||||
| 12-mirror-feature | not yet | recipe: feature op `mirror` is not supported yet |
|
||||
| 13-combine-join | not yet | recipe: feature op `combine` is not supported yet |
|
||||
| 14-combine-cut | not yet | recipe: sketch entity type `arc_three_point` is not supported yet |
|
||||
| 15-combine-intersect | not yet | recipe: sketch entity type `arc_three_point` is not supported yet |
|
||||
| 16-sweep | not yet | recipe: sketch entity type `arc_three_point` is not supported yet |
|
||||
| 17-loft | not yet | recipe: feature op `construction_plane` is not supported yet |
|
||||
| 18-hole-features | not yet | recipe: feature op `hole` is not supported yet |
|
||||
| 19-l-bracket-constrained | FAIL | step 8 (ConstraintHorizontalVertical): invalid parameters for `ConstraintHorizontalVertical`: `line` must be a curve id |
|
||||
| 20-slot-constrained | not yet | recipe: sketch entity type `arc_center_start_sweep` is not supported yet |
|
||||
| 21-draft | not yet | recipe: feature op `draft` is not supported yet |
|
||||
| 22-split-body | not yet | recipe: feature op `construction_plane` is not supported yet |
|
||||
| 23-bracket-multifeature | not yet | recipe: feature op `construction_plane` is not supported yet |
|
||||
| 24-user-parameters | FAIL | step 11 (ConstraintCoincident): invalid parameters for `ConstraintCoincident`: `a` must be a point reference |
|
||||
| 25-sketch-triangle | FAIL | step 5 (ConstraintCoincident): invalid parameters for `ConstraintCoincident`: `a` must be a point reference |
|
||||
| 26-sketch-belt | not yet | recipe: constraint `horizontal_points` is not supported yet |
|
||||
| 27-sketch-trapezoid | FAIL | step 9 (ConstraintHorizontalVertical): invalid parameters for `ConstraintHorizontalVertical`: `line` must be a curve id |
|
||||
| 28-blind-pocket-fillets | FAIL | step 15 (FusionFilletEdgesCommand): not supported yet: the blend is larger than the neighbouring faces |
|
||||
| 29-two-sided-and-partial-revolve | FAIL | step 7 (Extrude): invalid parameters for `Extrude`: `distance` must be a number or an expression |
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Reference in new issue
Block a user