sch-rnd modularization

Why bother...

I believe good software should be modular. This is especially important in the context of large software, such as CAD applications. There should be a thin core that can model the world and provide the basic operations defined on it but anything else should go in separate modules.

Sch-rnd is built up from scratch with modularity in mind.

I believe such modularization has benefits on multiple levels:

Code size in charts

Overall distribution

All numbers are in SLOC and are acquired running sloccount on the given directory. While lines of code alone is not a true measure of complexity, it's a good estimation. The slices of pie charts are the major components of the sch-rnd executable.

Main components

The main components are:

Zooming on to the plugins

total size per class
IO plugins
feature plugins
export plugins
GUI plugins
engine plugins

(Red means the plugin doesn't really work).

Progress in numbers

Below is a table with the summary of core plugins.
module size [sloc] status configure
default
class description
act_draw278 works buildin feature Actions for drawing objects on a graphical sheet or symbol
act_read333 works buildin feature Data access related API as actions
backann1128 works buildin feature interactive back annotation
construct465 works buildin feature construct complex objects from atoms, break up groups
diag71 works buildin feature Actions for sch-rnd core diagnostics, intended for developers. These are not in core because end users normally don't need these. As a plugin, due to dynamic loading, it can be dropped on an existing sch-rnd installation with minimal risk of scaring away a reproducible bug.
export_abst194 works buildin export export project's abstract model to text
export_bom254 works buildin export export a BoM based on the components of the abstract model, using configurable templates
export_lpr14 works buildin export Export to lpr (using export_ps to generate postscript)
export_png267 works buildin export png, jpeg and gif render
export_ps576 works buildin export PostScript, Encapsulated PostScript exporter
export_spice474 works buildin export SPICE netlist exporter for circuit simulation
export_svg219 works buildin export Scalable Vector Graphics exporter
export_tedax259 works buildin export export netlist as a tEDAx netlist block
gui1415 works buildin gui sch-rnd-specific GUI elements
io_altium2444 works buildin io Load schematics from altium schdoc
io_geda1236 works buildin io Load schematics and symbols from gEDA format.
io_lihata1576 works buildin io Load and save the schematics and symbols in the native lihata format.
io_ngrp_fawk259 works buildin io non-graphical schematic sheets in form of fawk scripts.
io_ngrp_tedax393 works buildin io Load non-graphical schematic sheets in tEDAx format.
io_tinycad1511 works buildin io Load schematics from TinyCAD .dsn xml format.
lib_alien623 works buildin io Format-independent helper functions for reading alien files
lib_netlist_exp62 works buildin export Helper functions for exporting netlists
lib_ngrp241 works buildin io Helper functions for handling non-graphical sheets
lib_plot639 works disable-all gui subdialog for plotting and navigating graphs
lib_target133 works buildin export Helper functions for implementing target plugins
place137 works buildin feature place complex objects such as terminals from template
propedit2203 works buildin feature List and edit properties of a group of objects.
query4245 works buildin feature sch-rnd query language: execute expressions on objects and rules for the programmed drc.
renumber333 works buildin feature Systematically change the name of selected symbols
sch_dialogs6545 works buildin gui Standard schematics editor dialog boxes
sim1695 works buildin feature abstract differences of circuit simiulation implementations, provide an unified interface (infrastructure, CLI and actions)
sim_gui2138 works buildin feature GUI for the the a unified high level simulation interface
sim_ngspice438 works buildin feature ngspice specific execution glue (for the GUI)
std_cschem342 works buildin engine Handles: component connect
std_devmap1007 works buildin engine Handles slotting, device mapping and port mapping
std_forge2088 works buildin engine Handles: attribute forging
std_tools1461 works buildin feature Tools for drawing standard cschem concrete primitives
symlib_fs119 works buildin symlib access symbol libraries stored on the local file system
symlib_local696 works buildin symlib access symbol library stored within the sheet
target_none46 works buildin engine Display original names
target_pcb176 works buildin engine Attribute transformations for the PCB workflow
target_spice1096 works buildin engine Attribute transformations for the SPICE workflow

Classes

Each plugin implements a class (rarely a set of classes). Classes are:
name description
feature random features directly accessible for the user, usually actions
lib support code library for other plugins (core doesn't depend on these); functionality not directly accessible for the user but other plugins may depend on it
import load alien formats into the design space
export save (parts of) the design space in alien formats
io native file format (save & load) implementation

Status

Common status column values mean:
name description
works production quality code - configures, compiles, tested
WIP work in progress: the plugin may be avaialble for testing but is not yet production quality
abandoned unmaintained plugin; may be in working condition but there is no developer supporting it
deprecated legacy plugin scheduled for removal; may still work but will soon be removed; if your workflow depends on it, please report ASAP

Plugin dependency map

sch-rnd plugin dependency graph