Skip to content

add support for kicad footprints and schematic symbols#2

Closed
LokiMetaSmith wants to merge 7 commits intoholg:mainfrom
LokiMetaSmith:main
Closed

add support for kicad footprints and schematic symbols#2
LokiMetaSmith wants to merge 7 commits intoholg:mainfrom
LokiMetaSmith:main

Conversation

@LokiMetaSmith
Copy link
Copy Markdown

should allow for defining autolisp files and export them for use in kicad

google-labs-jules bot and others added 7 commits December 26, 2025 17:57
This commit creates a TODO.md file that outlines the plan for extending
acadlisp to support generating KiCad symbols and footprints. It breaks
down the work into research, symbol export, footprint export, and 3D
model support sub-tasks.
This commit implements the first phase of KiCad support: exporting schematic
symbols (.kicad_sym).

Changes:
- Added `DrawEntity::Pin` and `DrawEntity::Property` to the interpreter's drawing model.
- Added `kicad-pin` and `kicad-prop` AutoLISP functions.
- Created `src/kicad.rs` to handle serialization to KiCad S-expression format.
- Updated `src/lib.rs` and `src/main.rs` to handle the new entity types in existing exporters (SVG, JSON, DXF).
- Exposed `get_kicad_sym` via the WASM API.
- Added unit tests for symbol generation.
- Updated TODO.md.
This commit completes the implementation of KiCad export features by adding
support for .kicad_mod footprint files.

Changes:
- Added `DrawEntity::Pad` to represent footprint pads.
- Added `kicad-pad` AutoLISP function.
- Implemented `to_kicad_mod` in `src/kicad.rs` to generate footprint S-expressions.
- Implemented `simulate_layer_command` in the interpreter to allow switching layers via `(command "LAYER" ...)` which is crucial for defining footprint geometry on specific layers (F.SilkS, F.Cu, etc.).
- Updated all exporters (DXF, SVG, JSON) to safely handle the new Pad entity (ignoring or simple rendering).
- Added unit tests for footprint generation.
- Updated TODO.md.
This commit completes the implementation of KiCad export features by adding
support for .kicad_mod footprint files.

Changes:
- Added `DrawEntity::Pad` to represent footprint pads.
- Added `kicad-pad` AutoLISP function.
- Implemented `to_kicad_mod` in `src/kicad.rs` to generate footprint S-expressions.
- Implemented `simulate_layer_command` in the interpreter to allow switching layers via `(command "LAYER" ...)` which is crucial for defining footprint geometry on specific layers (F.SilkS, F.Cu, etc.).
- Updated all exporters (DXF, SVG, JSON) to safely handle the new Pad entity (ignoring or simple rendering).
- Added unit tests for footprint generation.
- Updated TODO.md.
…10567944346788693545

Add TODO.md with KiCad export roadmap
This commit completes the implementation of KiCad export features, adding support for
both schematic symbols (.kicad_sym) and footprint modules (.kicad_mod).

Key Changes:
- **Core Interpreter**: Added `DrawEntity::Pin`, `DrawEntity::Pad`, and `DrawEntity::Property`
  to represent KiCad-specific primitives.
- **Lisp Extensions**: Added `kicad-pin`, `kicad-pad`, and `kicad-prop` AutoLISP functions.
  Implemented `(command "LAYER" ...)` simulation to allow layer switching (crucial for footprints).
- **Export Module**: Created `src/kicad.rs` to serialize entities into KiCad S-expression format.
- **API**: Exposed `get_kicad_sym` and `get_kicad_mod` in the Rust/WASM API.
- **Existing Exporters**: Updated SVG, DXF, and JSON exporters to safely handle new entities
  (ignoring them or rendering simple placeholders where appropriate).
- **Documentation**: Updated `README.md` with usage examples for KiCad export.
- **Tests**: Added comprehensive unit tests in `src/kicad_tests.rs`.
- **Roadmap**: Updated `TODO.md` to reflect completed tasks.

Tests passed successfully. Temporary files removed.
…10567944346788693545

Implement KiCad Export (Symbols & Footprints)
holg added a commit that referenced this pull request Dec 27, 2025
…-todo-10567944346788693545, needed some fixes for the different display systems
@holg
Copy link
Copy Markdown
Owner

holg commented Dec 27, 2025

Merged it into branch kicad-export, and some addson

@holg holg closed this Dec 27, 2025
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.

2 participants