Topic: MeseconEdit - Version 1.6 (7/7/12)
An external 2D layout and design environment for Mesecon circuits.
Infinite grid management and drawing.
Smooth panning and zooming, drawing only visible grid elements.
Power source connectivity counting mechanism allows fast circuit recalculation after adding/removing power sources or mesecon.
Custom drawing for each node type - mesecon connects to adjacent mesecon, and every node can have its own shape and behavior.
Save and open Mesecon schematics (*.mesecon)
Import/export WorldEdit schematics (*.we)
This program is written in AutoHotkey; you may download the latest AutoHotkey interpreter here. As a Windows-only language, I'm afraid this program is not available for users of other platforms, until I can get familiar enough with something like PyGame to do a port, or someone else does it.
So far the power source connectivity count mechanism works as follows:
Mesecon has a state, which is a positive number or 0. Any positive number means that the mesecon is on; 0 means the mesecon is off.
On placement, mesecon will find the sum of the states of all neighbor nodes, and then increment the states of the neighbor nodes such that they are all equal to the calculated sum. This means that the mesecon "conducts" power source connectivity counts when it connects two active power sources.
On incrementing or decrementing the current node's state, also increment the states of neighbor nodes to match. This means that mesecon "propagates" charges across to neighbors.
Whenever changing another node's state, to prevent infinite recursion, keep an "open set" of nodes that have already been operated on. Don't process any neighbors that are already in the open set.
On removal, a full recalculation is done.
This mechanism is powerful because it is localized: only nodes that need to be changed will be processed, otherwise no recalculation is needed. Although it means that more data needs to be stored with each node, it also allows faster circuit calculation.
Latest article: Mesecons Basics.