Skip to content

feat: add Smoothie Board autoroute_settings and plane support - #526

Open
chfr19820610-cell wants to merge 1 commit into
tscircuit:mainfrom
chfr19820610-cell:main
Open

chfr19820610-cell wants to merge 1 commit into
tscircuit:mainfrom
chfr19820610-cell:main

Conversation

@chfr19820610-cell

Copy link
Copy Markdown

Summary

Implements parsing and stringification for two DSN structure features required to convert Smoothie Board DSN files to Circuit JSON:

autoroute_settings

  • Parses autoroute_settings block with fanout, autoroute, postroute, vias, start_ripup_costs, start_pass_no
  • Parses layer_rule entries with active, preferred_direction, trace cost settings
  • Full round-trip stringification back to DSN format

Plane support

  • Parses plane blocks with polygon (layer, width, coordinates)
  • Full round-trip stringification back to DSN format

Tests

  • 5 new tests in tests/dsn-pcb/autoroute-and-plane.test.ts:
    • Parse autoroute_settings from DSN
    • Round-trip autoroute_settings through stringify → parse
    • Parse plane from DSN structure
    • Round-trip plane through stringify → parse
    • Smoothie Board DSN round-trip preserves all structure fields (reads from fixture)

Closes #54

Add autoroute_settings (fanout, autoroute, postroute, vias, layer_rules)
and plane (polygon with layer/width/coordinates) parsing and
stringification to the DSN converter.

- types.ts: Add Plane, AutorouteSettings, AutorouteLayerRule interfaces
- parse-dsn-to-dsn-json.ts: Add processAutorouteSettings(),
  processAutorouteLayerRule(), processPlane() parsers
- stringify-dsn-json.ts: Add stringification for autoroute_settings
  and planes
- Add 5 tests covering parse, stringify, and round-trip

Closes tscircuit#54
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.

We can't convert Smoothie Board to Circuit JSON

1 participant