Skip to content

Fix missing refdes and thick strokes in custom symbols - #496

Open
seveibar wants to merge 1 commit into
tscircuit:mainfrom
seveibar:fix/custom-symbol-refdes-stroke-width
Open

Fix missing refdes and thick strokes in custom symbols#496
seveibar wants to merge 1 commit into
tscircuit:mainfrom
seveibar:fix/custom-symbol-refdes-stroke-width

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Summary

  • Add a {NAME} schematic text element to generated custom symbols unless the source already contains a reference placeholder.
  • Preserve EasyEDA RECT lineWidth after converting it to schematic units.
  • Add real JLCPCB reproduction fixtures for C354900 and C1527439 with circuit JSON and visual assertions.

Reproduction

The JLCPCB imports for fuse C354900 and MOV C1527439 emit custom symbol elements. Custom symbols do not receive the automatic chip-box designator, so their names were absent. Their EasyEDA rectangle line width was also omitted, causing tscircuit to use its 0.12 default instead of the imported 1 x 0.02 = 0.02 width.

The regression test renders both parts with realistic F1 and RV1 names and verifies the resolved schematic text and 0.02 rectangle stroke. Existing custom-symbol snapshots are refreshed to document the general behavior.

Verification

  • bun test: 188 pass, 0 fail, 63 snapshots
  • bun run build
  • bun run format:check
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant