How tcherditkothir/vikicad works
VikiCAD is a Linux CAD and PCB-fabrication editor: users create and edit 2D drawings, build and modify 3D solids, inspect or edit Gerber/Excellon data, then save native projects or export interoperable files. The GUI and headless CLI provide separate interaction modes; the CLI and GUI IPC also expose command-driven automation and JSON queries. The graph preserves the README’s major CAD, fabrication, interoperability, and agent-facing capabilities. Source excerpts were partial, so uncertain internal call wiring is omitted; paths for unsampled subsystems use existing tree entries.
Main entry points: Commands3D.cpp CAD commands · main.cpp Headless CLI · RpcServer.cpp JSON-RPC server · MainWindow.cpp Desktop GUI
Components 23
Interaction
- Desktop GUI
gui/MainWindow.cpp - 2D canvas
gui/canvas/CanvasWidget.cpp - 3D view
gui/occview/OcctViewWidget.cpp
CAD Editing
- Command processor
core/cmd/CommandProcessor.cpp - CAD commands
core/cmd/Commands3D.cpp - Document model
- 2D geometry
core/geom/GeomUtil.cpp - Object snaps
core/snap/SnapEngine.cpp - Solid operations
core/solid/SolidOps.cpp - Feature history
core/solid/FeatureTree.cpp
PCB Fabrication
- Gerber and Excellon
core/io/GerberIo.cpp - CAM exporters
core/io/GerberWriter.cpp
File Interchange
- Native project store
core/io/NativeStore.cpp - DXF interchange
core/io/DxfImporter.cpp - STEP interchange
core/io/StepIo.cpp - Other CAD formats
core/io/ObjIo.cpp - PDF plotting
core/io/PdfPlotter.cpp - Animation export
core/anim/GlbExporter.cpp - Offscreen renderer
offscreen/OffscreenRenderer.cpp
Automation
- Headless CLI
cli/main.cpp - JSON-RPC server
gui/ipc/RpcServer.cpp - JSON queries
core/io/QueryJson.cpp
Other components
- CAD user
Connections 26
- CAD user → Desktop GUI: interacts with
- CAD user → Headless CLI: runs commands
- CAD user → 2D canvas: draws and edits
- CAD user → 3D view: navigates and picks
- Desktop GUI → JSON-RPC server: serves requests
- Headless CLI → JSON-RPC server: connects to
- Headless CLI → Native project store: loads and saves
- Headless CLI → JSON queries: requests JSON views
- Headless CLI → Command processor: executes commands
- JSON-RPC server → JSON queries: serves queries
- Command processor → CAD commands: dispatches
- CAD commands → Document model: edits
- CAD commands → Solid operations: performs 3D operations
- CAD commands → Feature history: edits feature history
- CAD commands → 2D geometry: uses geometry
- 2D canvas → Object snaps: queries snap points
- Object snaps → Document model: reads entities
- 3D view → Document model: displays solids
- Native project store → Document model: reads and writes
- Gerber and Excellon → Document model: imports fabrication data
- Document model → CAM exporters: exports fabrication data
- DXF interchange → Document model: imports drawing data
- Document model → STEP interchange: reads and writes STEP
- Document model → Other CAD formats: imports or exports
- Document model → PDF plotting: plots layouts
- Animation export → Offscreen renderer: renders frames