v1.6.0 — pick_surface_point
New: pick_surface_point
Repins OCCTSwiftViewport 1.0.4 → 1.1.20 (tap-to-measure, SecondMouseAU/OCCTSwiftViewport#68) and adds an MCP tool that surfaces the viewport's ray→surface-point pick math headlessly.
Cast a ray through pixel (screenX, screenY) of a render_preview-framed view (pass the same options you render with) and get back the nearest world-space surface point on a body: hit, bodyId, point [x,y,z], distance, and a selectionId.
The selectionId is a valid add_dimension anchor, so you can pick two arbitrary surface points and dimension between them — not just topology centroids. Implemented with Ray.fromCamera + SceneRaycast.cast.
Details
- New
RayPickTool;SelectionRegistry.recordPointSnapshotfor free-point anchors. - Dispatch uses
numberValueso integer pixels survive the JSON int/double round-trip. - New integration test (pick ×2 → add_dimension). 35 tests pass.
- README: 57 tools.
🤖 Generated with Claude Code