Skip to content

v1.6.0 — pick_surface_point

Choose a tag to compare

@gsdali gsdali released this 12 Jun 10:58
· 16 commits to main since this release
d7c3636

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.recordPointSnapshot for free-point anchors.
  • Dispatch uses numberValue so 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