Metrology Check Scan
metrology_check_scanCompare a 3D scan point cloud with its STEP model to measure signed surface deviations, summarize RMS/tolerance statistics, and identify where clustered out-of-tolerance regions occur.
Instructions
Compare a 3D scan (point cloud) with its STEP model and report how far the part is from the model and where. Deviation is the signed distance from each scan point to the model surface, positive outside the material (unsigned if the model is not exactly one closed solid). Returns RMS, mean, standard deviation, maximum, 95th percentile, the fraction of points beyond 'tolerance', a histogram, the worst points, clustered out-of-tolerance regions (centroid, bounding box, worst deviation) and a deviations.csv artifact. registration 'icp' first refines the alignment with point-to-plane ICP (the scan must already be roughly aligned); 'none' trusts the scan frame. Needs the optional scan engines (uv sync --extra scan).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scan_path": "<scan_path>",
"scan_unit": "<scan_unit>",
"model_path": "<model_path>",
"tolerance": "<tolerance>"
},
"name": "metrology_check_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scan_path | Yes | Path to the point cloud: .ply .pcd .xyz .xyzn .xyzrgb or .pts | |
| scan_unit | Yes | Length unit of the point-cloud coordinates, which carry none, as a unit only with no number: 'mm', 'm', 'inch', 'um'. '2 mm' is rejected | |
| tolerance | Yes | Largest acceptable distance between a scan point and the model, with unit, e.g. '0.1 mm' | |
| max_points | No | Scans with more points are downsampled to this many (fixed seed), 1000 to 5000000 | |
| model_path | Yes | Path to the STEP model (.step or .stp); read in millimetres | |
| output_unit | No | Length unit of the results, e.g. 'mm', 'um', 'inch' | mm |
| registration | No | 'none' (default): the scan is already in the model frame. 'icp': refine with ICP first | none |
| mesh_deflection | No | Largest chord error allowed when the STEP model is tessellated, with unit, e.g. '0.01 mm'. Deviations smaller than this are not meaningful | 0.01 mm |
| icp_max_distance | No | ICP only: largest scan-to-model correspondence distance with unit, e.g. '5 mm' | 5 mm |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Non-quantity payload (reports, listings) | |
| error | No | ||
| value | No | Primary quantity result | |
| values | No | All named quantity results (includes the primary) | |
| warnings | No | ||
| artifacts | No | ||
| provenance | Yes | What produced the result and from which inputs. | |
| review_status | No | unreviewed |