From d6b336538aa39e73d6dae8a18cb49be34bfedb55 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 15 Oct 2026 16:14:56 -0400 Subject: [PATCH] docs: start hex meshing from the provenance graph (#402) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo --- docs/mcp.md | 13 +++++++++++++ skills/fieldcraft-meshing/SKILL.md | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/docs/mcp.md b/docs/mcp.md index 12d672e..c67c4ba 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -184,6 +184,19 @@ edges of partition cells matching counts. 4. `mesh.seed.list` lists the seeds and the edges they reach (`stale` when the design has no such edge); `mesh.seed.clear {edges?}` removes them. Seeds are saved with the model. +## Meshing from the feature graph + +A design opened from `.solidcraft` is rebuilt from its timeline, so how each body was made is +known. `execute` `geometry.features {"body"?}` lists, per body, the features that built it in +order: type, operation, evaluated values, placement and direction, the sketch profiles (lines, +arcs, circles), pattern and mirror transforms, targets and tools, and the persistent faces and +edges each one made. `mesh.plan {"body"}` turns that into a saved, editable hex-meshing plan +(templates per feature, O-grid and butterfly rings round circles, the partition cuts their frames +and imprints need, the copies a pattern or mirror made, and the features not mapped yet with why); +`mesh.plan.apply {"plan"}` cuts and meshes the body (and its copies) with the structured meshers +and reports `all_hex`, `conforming`, the smallest scaled Jacobian and what still needs the +projection mesher (`pending`). + ## Relaxing a few bad elements When `mesh.quality` shows a handful of spikes in an otherwise good mesh: diff --git a/skills/fieldcraft-meshing/SKILL.md b/skills/fieldcraft-meshing/SKILL.md index f1a81cb..d283b40 100644 --- a/skills/fieldcraft-meshing/SKILL.md +++ b/skills/fieldcraft-meshing/SKILL.md @@ -9,6 +9,28 @@ You mesh like an experienced analyst: you look first, plan the blocks, and only A mesh is judged by its worst elements, not its count. A fast mesh with fans, slivers or collapsed corners is a failed mesh, even when every element is "valid". +## 0. Start from the provenance graph (SolidCraft designs) + +A `.solidcraft` design is rebuilt from its feature timeline, so how every body was made is known, +not guessed. Read it before you plan anything: +1. `geometry.features {"body": ""}`: the features that built the body, in order, with their + evaluated parameters (sketch profiles with circles and arcs, extrude direction and extent, + primitive placement, hole axis and diameter, shell thickness, pattern/mirror transforms, + join/cut targets and tools) and the persistent faces and edges each one made. +2. `mesh.plan {"body": ""}`: the block plan the features give — the sweep direction, a + template per feature (`sweep`, `block`, `butterfly`, `o_grid`, `layers`, `imprint`, `copy`, + `partition`), the `rings` round circles, the partition `cuts` that frame them, the element size + (layers through the thinnest wall) and the `copies` of a pattern or mirror. Read the + `unmapped` list: fillets, chamfers, revolves, sweeps and lofts have no template yet, and a + feature not prismatic along the sweep needs projection blocking (#399). +3. Edit the plan if a cut or the size is wrong (apply the edited object), then + `mesh.plan.apply {"plan": "Plan-"}`. Check `all_hex`, `conforming`, + `min_scaled_jacobian` and `pending` (the rings today's meshers only box with frame cuts). +4. Then verify as in §4. When the plan does not fit (unmapped primary features, a failed cell), + fall back to the manual process below, keeping the plan's cuts that work. + +Shapes without a timeline (STEP, 3MF) start at §1. + ## 1. Look before you mesh (always) Before the first mesh command: