SkillPedia Skills Encyclopedia
中文 EN

Skills 2026-04-22 07:19 UTC

jarvis-onshape-mcpv1.2.0

Version [1.2.0] committed by ReshefElisha. Update Category: Routine Updates & Maintenance. Commit details: v1.2.0: constraint-first sketches + sketch inspection + sketch render. This update performs routine maintenance and minor adjustments.

ReshefElisha b0e7258 ReshefElisha/jarvis-onshape-mcp

CommitRaw commit message

v1.2.0: constraint-first sketches + sketch inspection + sketch render

Sketches graduate from coordinate-first plumbing to the surface Onshape's
solver actually speaks. Drawings transcribe as "entities with ids +
constraints between them" instead of hand-computed coordinates, and a
new read side (inspect / render / list) closes the feedback loop.

## What ships in 1.2.0

### Constraint-first sketches (merged sketch-constraints branch)

- create_sketch grows a constraint-first surface: entities carry
  user-supplied `id`s and top-level `constraints[]` drive positions
  through the solver. Coordinate-first surface still works unchanged for
  simple cases.
- 14 constraint types + 3 aliases: HORIZONTAL, VERTICAL, COINCIDENT,
  TANGENT, CONCENTRIC, PARALLEL, PERPENDICULAR, EQUAL, MIDPOINT,
  DIAMETER, RADIUS, DISTANCE, ANGLE, OFFSET; LENGTH /
  HORIZONTAL_DISTANCE / VERTICAL_DISTANCE route to DISTANCE with a
  DimensionDirection enum. Entity refs support sub-points
  (`line.start`, `circle.center`).
- edit_sketch: iterate on an existing sketch. addEntities /
  addConstraints / removeIds in one call. ID-collision detection,
  same-call retarget (remove + add the same id), cascade-remove of
  constraints whose referenced entity disappears (surfaced as
  `cascaded_removals`).
- Single-entity circles via BTMSketchCurve-4 replace the old
  two-semicircle hack.
- short_arc default matches the Onshape UI: CCW sweeps > 180° silently
  swap endpoints so the arc goes the short way. `short_arc: false`
  forces the long-way case.
- SKETCH_SOLVE_FAILED hints point the caller at client-side bisection.
- 47 unit tests (34 constraint serializer + 13 edit_sketch merge) on
  top of existing coverage.
- Dogfood-validated against clevis and bracket sketches.

### Sketch inspection + render (new)

- inspect_sketch: compact structured view of a BTMSketch-151 — per
  entity kind / id / endpoints / center in mm, per constraint type /
  refs / dimension. Returns both machine-readable lists and a
  ready-to-display text block. Handles both the new single-entity
  circle topology and swept-arc topology.
- list_sketches: Part Studio sketch index (featureId, name, status,
  entity/constraint counts). Pick-the-right-one helper.
- render_sketch: 2D PNG of a sketch in sketch-local mm. Onshape's
  /shadedviews doesn't render sketches; this plots lines / arcs /
  circles / points directly and overlays constraint badges — FIX as
  red squares, LENGTH / DIAMETER / RADIUS / DISTANCE as green labels,
  HORIZONTAL / VERTICAL as H / V tags. Entity id labels sit on the
  opposite side of each line from its dimension label. image_id
  cached via the same store crop_image reads.

## Upgrading

No breaking changes. Existing create_sketch callers work unchanged;
the constraint-first path is opt-in (triggered by entities carrying an
`id`). edit_sketch is new; inspect / render / list_sketches are new.