From a5c71bc5b060354fe56b523d574c8edb34b55ff2 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Fri, 16 Oct 2026 14:10:12 -0400 Subject: [PATCH] skills: meshing skill fixes from its corpus run (#482) Plan before geometry.check (its size), mesh.plan.apply's own symmetry and the plan's saved name, the fallback order, touching bodies, tet aspect ratio, undoing a relaxation that leaves its region worse, and merging the cells of a split part. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo --- skills/fieldcraft-meshing/SKILL.md | 39 ++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/skills/fieldcraft-meshing/SKILL.md b/skills/fieldcraft-meshing/SKILL.md index 14aafa5..66f2526 100644 --- a/skills/fieldcraft-meshing/SKILL.md +++ b/skills/fieldcraft-meshing/SKILL.md @@ -17,7 +17,8 @@ pictures → report.** Never skip a step because the last mesh looked fine. 1. `inspect_model` / `geometry.bodies`: bodies, volumes, bounding boxes, faces, holes, fillets. For a `.solidcraft` design also `geometry.features {"body"}`: how each body was built (profiles, extrude directions, holes, shells, fillets, patterns, mirrors). -2. `geometry.check {"body", "size"}` at the size you intend: short edges, small and sliver faces, +2. `geometry.check {"body", "size"}` at the size you intend (run `mesh.plan` first and take its + `size`): short edges, small and sliver faces, near faces (gaps, overlaps, walls thinner than the gap). Each finding names its faces and a point `at`, and is marked in pictures. Defeature or resize before meshing; never mesh over a finding you have not explained. @@ -32,8 +33,13 @@ pictures → report.** Never skip a step because the last mesh looked fine. ## 2. Symmetry first -Test symmetry geometrically (mirror the bounding box and the key faces). If the part and its -loads are symmetric, mesh one half or quarter and mirror the mesh: `mesh.mirror {"plane": | {point, normal}}`. Nodes on the plane are merged, so the result is conforming. Never mesh a symmetric part whole. If the halves come out unequal (one corner good, its mirror image bad), keep the good half and mirror it. @@ -56,7 +62,8 @@ keep the good half and mirror it. lofts). - `size` and `layers` against the thinnest wall (§5). Fix what is wrong by editing the plan object and applying the edit. -3. `mesh.plan.apply {"plan": "Plan-" | edited object}`. Read `skipped_cuts`, `all_hex`, +3. `mesh.plan.apply {"plan": | edited object}`. The saved name is not + always `Plan-`: names with spaces or punctuation are made safe (`Plan-Clamp_body`). Read `skipped_cuts`, `all_hex`, `conforming`, `min_scaled_jacobian`, `layout`, `blend_layers`. A skipped cut is a defect to explain. 4. When the plan does not fit, mesh regions by hand and keep the plan's cuts that work: @@ -65,6 +72,13 @@ keep the good half and mirror it. `sides`); `mesh.hex.project` for a block topology projected on the part (`template` `sphere` or `butterfly`, ops `o_grid`, `split`, `extrude`, `connect`; `preview: true` lists block indices). Tet (`tet10` for stress) only for cells not worth blocking, far from the region of interest. + In that order: `mesh.hex.generate` (it picks extrude, sweep, revolve or mapped), then + `mesh.hex.project` with the template the shape asks for (`sphere` for a ball), then tet10. + Name each failure in the report. +5. Mesh touching bodies one at a time and read the error: `mesh.plan.apply` on a body that + touches one already meshed must meet that mesh face to face, and fails ("must meet the mesh + face to face") when the divisions differ. Plan both with the same size, or mesh the second + with `mesh.hex.generate` and tie them (§4). Shapes without a timeline (STEP, 3MF) skip `mesh.plan` and go to step 4. @@ -102,7 +116,8 @@ Shapes without a timeline (STEP, 3MF) skip `mesh.plan` and go to step 4. ## 6. Quality, mark, relax 1. `mesh.quality`: all valid; volume equal to the geometry's (a mismatch means missing or orphan - cells). + cells, or elements too coarse for the curvature: a 1 mm tube wall swept at the default size + loses 17 %). A tet mesh has no `edge_ratio`: judge it by `aspect_ratio`. 2. `mesh.quality.mark {"limits": {"scaled_jacobian": 0.3, "edge_ratio": 10}}`: failing elements become the set `quality_marked`, drawn red in pictures, each with `label`, `at`, `failed`. Acceptance limits: @@ -113,10 +128,15 @@ Shapes without a timeline (STEP, 3MF) skip `mesh.plan` and go to step 4. Clustered marks mean the blocks are wrong: back to §3/§4. Isolated spikes only: `mesh.node.relax {"around_element":