Find the thinnest wall
measure_wall_thicknessFind the thinnest material anywhere in the part, and where it is. Use this before saying a part is ready to print, cast or mill, and any time you cut a pocket, a bore or a shell into something — it is the check that catches a wall you thinned without meaning to. Unlike probe_part it needs no guess about where to look: it reads every edge, searches every pair of faces for thin material between them, and measures from thousands of points over the whole surface, and reports the worst.
The thickness at a point is the diameter of the largest ball that fits inside the material touching the surface there — the wall thickness a moulder or a print check means. Through a slanted wall it is the distance across the wall, not along any line: a 2 mm slab tilted 30° reads 2.0 here and 2.31 straight down with probe_part. Use this for how thick a wall is, probe_part for how much material a particular line crosses.
Reports thinnest — the thickness in mm, the point, and surface_of and opposite_surface_of, the tags of the two faces the material lies between, which is what tells you which wall is thin. Pass threshold_mm (the process minimum, e.g. 1.2 for a print) and it also reports below_threshold, how many samples failed it, plus thin_spots: every thin sample grouped into the place it belongs to, with its kind, samples and extent_mm, so a pocket floor thin all over and one thin corner are different entries.
Read kind first. feather is a sliver: real material that thins to a knife edge where two faces meet at a shallow angle, what a cut leaves when it grazes another feature. Its thickness_mm is 0 because the material really does run out to nothing along that edge — it is the thinnest material in the part, not a measuring artefact and not an edge reading — with wedge_deg the angle and extent_mm the stretch that sharp. It will not print or cast cleanly and is almost never intended, so fix it or say why it stays. wall is two faces that do not meet — a floor, a wall, a web between holes — and is thin because a dimension made it so. edge is a ball wedged into a corner — beside every sharp edge, and on every round, which reads twice its radius — so it comes last and is not a wall. surface and opposite_surface say what each face is, which names the feature when no tag does.
Measured on the exact solid with every fillet and chamfer in it: a rounded edge is in the number, not a caveat beside it. What is certain, at any max_samples: every feather is found, however short, and every wall thinner than threshold_mm between two faces that do not meet is found and measured exactly where it is thinnest. Only a thin place of another shape — across a single curved face, like a thin pin — rests on the samples, which are never more than sample_spacing_mm apart; raise max_samples to narrow that. A minimum that tapers toward zero at a groove rim or a run-off blend is real material geometry, not a defect: docs/GOTCHAS.md, in read_docs, has the two shipped parts it happens on. A surface has no material to be thick and is refused here, naming .thicken(t); in a part that mixes solids and surfaces the surfaces are left out and listed in surfaces_skipped.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "measure_wall_thickness"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | No | Changes to make before building, in order, each { old, new } replacing text that appears exactly once; nothing is written back. | |
| script | No | A parcad DSL script ending in a returned shape. Give this or `project`, not both. | |
| project | No | The part to build instead of sending it, as list_projects spells it, or "@session" for the script on the user's screen. | |
| timeout_s | No | Seconds the kernel may take to build and sweep the part, 1 to 600. Defaults to 20, or PARCAD_OCCT_TIMEOUT. | |
| max_samples | No | How many surface points the sweep measures from, 200 to 100000; the default, 6000, puts one at most about every hundredth of the part's diagonal, and the reply's `sample_spacing_mm` says how far apart they came out. Feathers and walls between faces that do not meet are found at any count; more samples narrow what else can fall between them. | |
| threshold_mm | No | What counts as too thin, in mm — the process minimum, such as 1.2 for a typical print or 2.5 for a casting. Without it only the thinnest place is reported and nothing is counted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| more | No | ||
| note | Yes | ||
| units | Yes | ||
| samples | Yes | ||
| thinnest | No | ||
| discarded | Yes | ||
| thin_spots | No | ||
| threshold_mm | No | ||
| script_sha256 | Yes | ||
| below_threshold | Yes | ||
| matched_loosely | No | ||
| surfaces_skipped | No | ||
| sample_spacing_mm | Yes | ||
| unlisted_thin_spots | No | ||
| below_threshold_at_edges | Yes |