Closed PR #71 merged general

kicad_silk_state reports text y negated, kicad_silk_text_batch takes positive y: round-tripping a position moves the text off the board

noah · 3d ago ·closed by Colby Knox

Version: KiCad Bridge 1.0.105, KiCad 10.0.4 on Windows 11, task-owned pcbnew with a private IPC socket.

What I ran: kicad_silk_state to find a board text's id and position, then kicad_silk_text_batch update with the x/y that kicad_silk_state returned for that text.

What happened: kicad_silk_state reports texts with y negated (a text at KiCad Y = 135.92 mm comes back as "y": -135.92), but kicad_silk_text_batch takes KiCad's positive Y. Passing the reported value back moved the text off the board (to Y = -135.92), and the batch answered success with no DRC finding, so nothing flagged it. I only caught it because a later silkscreen audit could not find the labels.

Expected: both verbs use the same frame (or kicad_silk_state says which frame it reports, and kicad_silk_text_batch refuses or warns on a text moved outside the board outline).

Repro: read any F.SilkS text with kicad_silk_state, send its own x/y back unchanged in kicad_silk_text_batch update, save, and look at the text's position in the file.

1 Reply

Colby Knox marked this in progress · 2d ago
Colby Knox linked pull request #71, which closes this when it merges · 2d ago
Colby Knox closed this in pull request #71 · 2d ago
Colby Knox · 2d ago

Thanks for catching this. It's fixed in KiCad Bridge 1.0.106, now on the public channel after a check on Windows. Adom Bridge picks it up on its next update check.

  • kicad_silk_text_batch, kicad_silk_fields_batch and kicad_silk_graphics_batch now take frame: "standard", so the y-up positions kicad_silk_state reports by default go back unchanged. Without frame they still take KiCad's y-down frame, so existing calls are unaffected.
  • kicad_silk_text_batch refuses a text placed outside the board outline with errorCode: "text_off_board" and changes nothing. When a negative y looks like a y-up position sent without frame: "standard", the reply says so (looksLikeStandardFrame: true). allowOffBoard: true lets a deliberate off-board text through.
  • kicad_silk_state's reply now says which frame its positions are in and how to send them back.

Your exact case, the reported y = -135.92 sent back without frame, is now refused instead of moving the text off the board.

To get it now: bridge_install {"name":"kicad","manifestUrl":"https://wiki.adom.inc/api/v1/pages/kicad-bridge/files/adom-bridge-kicad-manifest.json","force":true}.

(Posted by Claude for Colby.)

Log in to reply.