# thesourcerer8/altium2kicad architecture

> Architecture diagram of the GitHub repository thesourcerer8/altium2kicad, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thesourcerer8/altium2kicad
- Repository: https://github.com/thesourcerer8/altium2kicad

## Overview

Altium2KiCad converts Altium PCB and schematic documents into KiCad files. The documented workflow is to unpack the source documents, then run separate schematic and PCB converters; STEP models may optionally be converted to VRML with an external tool. The README does not describe the internals of the Perl modules or batch script, so their relationships to conversion stages are not inferred.

Main entry points: [`unpack.pl`](https://github.com/thesourcerer8/altium2kicad/blob/master/unpack.pl) (Document unpacker), [`convertschema.pl`](https://github.com/thesourcerer8/altium2kicad/blob/master/convertschema.pl) (Schematic converter), [`convertpcb.pl`](https://github.com/thesourcerer8/altium2kicad/blob/master/convertpcb.pl) (PCB converter), [`step2wrl.FCMacro`](https://github.com/thesourcerer8/altium2kicad/blob/master/step2wrl.FCMacro) (STEP-to-VRML macro)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Input preparation"]
  node_unpack["Document unpacker<br/>[unpack.pl]"]
  node_stepmacro["STEP-to-VRML macro<br/>[step2wrl.FCMacro]"]
end

subgraph group_conversion["KiCad conversion"]
  node_schematic["Schematic converter<br/>[convertschema.pl]"]
  node_pcb["PCB converter<br/>[convertpcb.pl]"]
  node_batch["Batch converter<br/>[convertall.pl]"]
  node_launcher["Converter entry point"]
end

subgraph group_geometry["Geometry utilities"]
  node_bezier["Bezier geometry<br/>[Bezier.pm]"]
  node_planar["Planar geometry<br/>[Planar.pm]"]
end

node_user(("User"))
node_altium["Altium documents"]
node_kicad["KiCad files"]
node_step["STEP models"]
node_step_tool["STEP conversion tools"]
node_vrml["VRML models"]

node_user -->|"runs"| node_unpack
node_altium -->|"unpacks"| node_unpack
node_user -->|"runs"| node_schematic
node_user -->|"runs"| node_pcb
node_unpack -->|"prepares inputs"| node_schematic
node_unpack -->|"prepares inputs"| node_pcb
node_schematic -->|"writes schematic files"| node_kicad
node_pcb -->|"writes PCB files"| node_kicad
node_user -.->|"runs optionally"| node_step_tool
node_step -.->|"converts"| node_step_tool
node_step -.->|"converts with FreeCAD"| node_stepmacro
node_stepmacro -.->|"writes"| node_vrml

click node_unpack "https://github.com/thesourcerer8/altium2kicad/blob/master/unpack.pl"
click node_schematic "https://github.com/thesourcerer8/altium2kicad/blob/master/convertschema.pl"
click node_pcb "https://github.com/thesourcerer8/altium2kicad/blob/master/convertpcb.pl"
click node_batch "https://github.com/thesourcerer8/altium2kicad/blob/master/convertall.pl"
click node_stepmacro "https://github.com/thesourcerer8/altium2kicad/blob/master/step2wrl.FCMacro"
click node_bezier "https://github.com/thesourcerer8/altium2kicad/blob/master/Math/Bezier.pm"
click node_planar "https://github.com/thesourcerer8/altium2kicad/blob/master/Math/Geometry/Planar.pm"
click node_launcher "https://github.com/thesourcerer8/altium2kicad/blob/master/altium2kicad"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_unpack,node_stepmacro,node_user toneBlue
class node_schematic,node_pcb,node_batch,node_launcher toneAmber
class node_bezier,node_planar toneMint
class node_altium,node_kicad,node_step,node_step_tool,node_vrml toneIndigo
```

## Components

### Input preparation

- [Document unpacker](https://github.com/thesourcerer8/altium2kicad/blob/master/unpack.pl): `unpack.pl`
- [STEP-to-VRML macro](https://github.com/thesourcerer8/altium2kicad/blob/master/step2wrl.FCMacro): `step2wrl.FCMacro`

### KiCad conversion

- [Schematic converter](https://github.com/thesourcerer8/altium2kicad/blob/master/convertschema.pl): `convertschema.pl`
- [PCB converter](https://github.com/thesourcerer8/altium2kicad/blob/master/convertpcb.pl): `convertpcb.pl`
- [Batch converter](https://github.com/thesourcerer8/altium2kicad/blob/master/convertall.pl): `convertall.pl`
- [Converter entry point](https://github.com/thesourcerer8/altium2kicad/blob/master/altium2kicad): `altium2kicad`

### Geometry utilities

- [Bezier geometry](https://github.com/thesourcerer8/altium2kicad/blob/master/Math/Bezier.pm): `Math/Bezier.pm`
- [Planar geometry](https://github.com/thesourcerer8/altium2kicad/blob/master/Math/Geometry/Planar.pm): `Math/Geometry/Planar.pm`

### Other components

- **User**
- **Altium documents**
- **KiCad files**
- **STEP models**
- **STEP conversion tools**
- **VRML models**

## Connections

- User → Document unpacker: runs (evidence: `README.md`)
- Altium documents → Document unpacker: unpacks (evidence: `README.md`)
- User → Schematic converter: runs (evidence: `README.md`)
- User → PCB converter: runs (evidence: `README.md`)
- Document unpacker → Schematic converter: prepares inputs (evidence: `README.md`)
- Document unpacker → PCB converter: prepares inputs (evidence: `README.md`)
- Schematic converter → KiCad files: writes schematic files (evidence: `README.md`)
- PCB converter → KiCad files: writes PCB files (evidence: `README.md`)
- User → STEP conversion tools: runs optionally (evidence: `README.md`)
- STEP models → STEP conversion tools: converts (evidence: `README.md`)
- STEP models → STEP-to-VRML macro: converts with FreeCAD (evidence: `README.md`)
- STEP-to-VRML macro → VRML models: writes (evidence: `README.md`)
