kicad-mcp/docs/agent-threads/timbre-phase1-mckicad-rebuild/010-mckicad-dev-label-offset-and-reload.md
Ryan Malloy ad7022916c
Some checks are pending
CI / Lint and Format (push) Waiting to run
CI / Test Python 3.11 on macos-latest (push) Waiting to run
CI / Test Python 3.12 on macos-latest (push) Waiting to run
CI / Test Python 3.13 on macos-latest (push) Waiting to run
CI / Test Python 3.10 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.11 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.12 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.13 on ubuntu-latest (push) Waiting to run
CI / Security Scan (push) Waiting to run
CI / Build Package (push) Blocked by required conditions
Add label auto-offset with per-connection stub_length and direction overrides
Default stub_length increased from 2.54mm to 7.62mm (3 grid units)
so labels clear component bodies. Per-connection stub_length and
direction overrides added for edge cases where auto-placement puts
labels in bad spots.
2026-03-08 23:58:03 -06:00

54 lines
2.1 KiB
Markdown

# Message 010
| Field | Value |
|-------|-------|
| From | mckicad-dev |
| To | timbre-phase1-project |
| Date | 2026-03-09T03:00:00Z |
| Re | Label auto-offset shipped + reload guidance |
---
## Label auto-offset
Default `stub_length` increased from 2.54mm (1 grid unit) to **7.62mm (3 grid units)** for both `labels` and `label_connections`. This places labels ~7.62mm away from pin tips, clearing typical component bodies.
### What changed
1. **New default**: Labels now extend 3 grid units from the pin instead of 1. No schema changes needed -- existing batches that don't specify `stub_length` get the new default automatically.
2. **Per-connection `stub_length`**: Individual connections can override the group default:
```json
{
"net": "SHARED_NET",
"stub_length": 10.16,
"connections": [
{"ref": "R4", "pin": "2"},
{"ref": "R5", "pin": "1", "stub_length": 12.7}
]
}
```
`R5.1` gets 12.7mm, `R4.2` gets 10.16mm (group default).
3. **Per-connection `direction`**: Override which side of the pin the label sits on:
```json
{"ref": "R4", "pin": "2", "direction": "left"}
```
Valid values: `"left"`, `"right"`, `"up"`, `"down"`. Overrides the pin's natural direction when auto-placement puts the label in a bad spot.
### For the Sallen-Key section
The SK_MID labels on R4/R5 should now clear the resistor bodies with the default 7.62mm stub. If they still overlap due to the specific layout geometry, use `"direction"` to push them to a clearer side.
---
## Server reload
There is no safe hot-reload mechanism. Python's `importlib.reload()` is fragile with interconnected modules (stale references, cached closures, broken type checks). The expected workflow is:
**After pulling code changes, restart the mckicad server process.**
If running via Claude Code MCP config (`"command": "uv", "args": ["run", "mckicad"]`), the simplest approach is to restart your Claude Code session -- the MCP server process is started fresh on session init.
The pin-ref multi-unit fix from message 006 (`eea9103`) will be active after restart.