place_component builds Reference and Value fields without the library's layer, thickness or keep-upright

Open
#157 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli, tooling

Research direction

The bug is in KiCadIpcClient::build_footprint_item and its text_field closure in crates/konnect-ipc/src/client.rs, which set only position, size and angle and leave the rest of TextAttributes at defaults. Compare against the sync path the issue cites (mixelpixx/Konnect#820) for how layer, visibility, thickness, line spacing and keep-upright are set. Done when a place_component result saved with KiCad 10 shows the library's Reference and Value field attributes.

Written by the indexing model from the issue text.

Description

bug

Imported from mixelpixx/Konnect#971, opened by pauliuszaleckas on 2026-10-24. The original repository is archived.

Summary

place_component (live IPC path) builds a footprint's Reference and Value fields without the library's text. On a stock Capacitor_SMD:C_0603_1608Metric, KiCad saves the placed fields with (unlocked yes), no font thickness and (line_spacing 0). The Value field is also hidden and on F.SilkS, though the library has it visible on F.Fab.

mixelpixx/Konnect#789 noted this in a comment ("place_component builds footprints the same way and has the same field defects … I'll keep the function shared and leave adopting it there as a follow-up"), and mixelpixx/Konnect#820 fixes the sync only. This issue tracks that follow-up.

Reproduction

main @ 9488e5f plus the stroke fix for mixelpixx/Konnect#970 (it doesn't touch fields), KiCad 10.0.6 pcbnew under a headless Weston, on a 2-layer scratch board:

  1. place_component {board, footprint: "Capacitor_SMD:C_0603_1608Metric", reference: "C11", x: 20, y: 30, rotation: 180} → source: "ipc".
  2. save_project.

The saved fields (UUIDs removed):

(property "Reference" "C11"
	(at 0 -1.43 0)
	(unlocked yes)
	(layer "F.SilkS")
	(effects (font (size 1 1) (line_spacing 0)))
)
(property "Value" "C_0603_1608Metric"
	(at 0 1.43 0)
	(unlocked yes)
	(layer "F.SilkS")
	(hide yes)
	(effects (font (size 1 1) (line_spacing 0)))
)

The library's (/usr/share/kicad/footprints/Capacitor_SMD.pretty/C_0603_1608Metric.kicad_mod):

(property "Reference" "REF**" (at 0 -1.43 0) (layer "F.SilkS")
	(effects (font (size 1 1) (thickness 0.15))))
(property "Value" "C_0603_1608Metric" (at 0 1.43 0) (layer "F.Fab")
	(effects (font (size 1 1) (thickness 0.15))))

Cause

KiCadIpcClient::build_footprint_item's text_field closure (crates/konnect-ipc/src/client.rs) sets only position, a fixed size of 1 mm and the angle. The rest of TextAttributes comes from ..Default::default(): keep_upright: false (saved as (unlocked yes)), no stroke_width, line_spacing: 0. The layer is forced to F.SilkS/B.SilkS, and the Value field is created invisible. IpcFieldPlacement carries only each field's at.

Ask

Give place_component's Reference and Value fields the library's layer, visibility, font size, thickness, line spacing, justification and keep-upright, as mixelpixx/Konnect#820 does for the sync. A thin-stroke Reference also fails a min_text_thickness DRC rule (see mixelpixx/Konnect#967).

Dominant language
Rust
Stars
34
Forks
9
Avg merge
9h 26m
Merged PRs (30d)
226

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Copperpour/Copperpour

All issues in Copperpour/Copperpour

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.