ECAD family: passives, semiconductors, power and logic symbols

Overview

Base Control: ECADControl : MaterialControl
Namespace: Beep.Skia.ECAD

The ECADControl is the root control for this diagram family. It inherits MaterialControl and provides shared port management, styling, and template methods for all nodes in the family.

This family contains 17 node types.

Node Types

Node ClassShapeDescription
ECADResistorNodeZigzag lineResistor with value and tolerance.
ECADCapacitorNodeParallel platesCapacitor (polarized or non-polarized).
ECADDiodeNodeTriangle with barDiode including LED, Zener, Schottky variants.
ECADFuseNodeWire with breakFuse/circuit breaker.
ECADICNodeRectangle with pin gridIntegrated circuit with configurable pin count.
ECADInductorNodeCoil loopsInductor/coil with inductance value.
ECADOpAmpNodeTriangle with +/- inputsOperational amplifier with inverting/non-inverting inputs.
ECADTransistorNodeCircle with 3 legsBJT (NPN/PNP) with collector, base, emitter.
ECADGroundNodeGround symbolGround/reference point.
ECADBatteryNodeLong/short line pairDC power source.
ECADPowerSupplyNodeCircle with +/-Power supply unit with voltage/current output.
ECADVoltageRegulatorNodeRectangle with VoutLinear/switching voltage regulator.
ECADTransformerNodeTwo coilsTransformer with primary/secondary windings.
ECADLogicGateNodeAND/OR/NOT gate symbolLogic gate (AND, OR, NOT, NAND, NOR, XOR).
ECADMicrocontrollerNodeRectangle with pinsMicrocontroller/MCU with GPIO, ADC, UART, I2C.
ECADMemoryNodeRectangle with address/dataMemory chip (RAM, ROM, EEPROM, Flash).
ECADTraceNodeLine with widthPCB trace/routing line with configurable width.

ECADResistorNode

Resistor with value and tolerance.

ShapeZigzag line
Input Ports1
Output Ports1

ECADCapacitorNode

Capacitor (polarized or non-polarized).

ShapeParallel plates
Input Ports1
Output Ports1

ECADDiodeNode

Diode including LED, Zener, Schottky variants.

ShapeTriangle with bar
Input Ports1
Output Ports1

ECADFuseNode

Fuse/circuit breaker.

ShapeWire with break
Input Ports1
Output Ports1

ECADICNode

Integrated circuit with configurable pin count.

ShapeRectangle with pin grid
Input Ports4+ (left)
Output Ports4+ (right)

ECADInductorNode

Inductor/coil with inductance value.

ShapeCoil loops
Input Ports1
Output Ports1

ECADOpAmpNode

Operational amplifier with inverting/non-inverting inputs.

ShapeTriangle with +/- inputs
Input Ports2
Output Ports1

ECADTransistorNode

BJT (NPN/PNP) with collector, base, emitter.

ShapeCircle with 3 legs
Input Ports1
Output Ports1

ECADGroundNode

Ground/reference point.

ShapeGround symbol
Input Ports1
Output Ports0

ECADBatteryNode

DC power source.

ShapeLong/short line pair
Input Ports0
Output Ports1

ECADPowerSupplyNode

Power supply unit with voltage/current output.

ShapeCircle with +/-
Input Ports0
Output Ports1+

ECADVoltageRegulatorNode

Linear/switching voltage regulator.

ShapeRectangle with Vout
Input Ports1
Output Ports1

ECADTransformerNode

Transformer with primary/secondary windings.

ShapeTwo coils
Input Ports2
Output Ports2

ECADLogicGateNode

Logic gate (AND, OR, NOT, NAND, NOR, XOR).

ShapeAND/OR/NOT gate symbol
Input Ports2+
Output Ports1

ECADMicrocontrollerNode

Microcontroller/MCU with GPIO, ADC, UART, I2C.

ShapeRectangle with pins
Input Ports8+
Output Ports8+

ECADMemoryNode

Memory chip (RAM, ROM, EEPROM, Flash).

ShapeRectangle with address/data
Input Ports4+
Output Ports4+

ECADTraceNode

PCB trace/routing line with configurable width.

ShapeLine with width
Input Ports0
Output Ports0

Connection Points

Every node in this family exposes connection points (ports) for linking to other nodes. Port positions are computed lazily by LayoutPorts(), which runs when MarkPortsDirty() flags the layout as stale after a move or resize.

Node ClassInput PortsOutput PortsExtra
ECADResistorNode11—
ECADCapacitorNode11—
ECADDiodeNode11—
ECADFuseNode11—
ECADICNode4+ (left)4+ (right)—
ECADInductorNode11—
ECADOpAmpNode21—
ECADTransistorNode11—
ECADGroundNode10—
ECADBatteryNode01—
ECADPowerSupplyNode01+—
ECADVoltageRegulatorNode11—
ECADTransformerNode22—
ECADLogicGateNode2+1—
ECADMicrocontrollerNode8+8+—
ECADMemoryNode4+4+—
ECADTraceNode00—

Connection Conventions

When building diagrams with this family, follow these conventions:

  • Components follow IEEE/ANSI standard symbols
  • IC pins are configurable via NodeProperties
  • Ground and power are global reference nodes
  • Traces connect component ports

Usage Example

Complete example showing creation, node placement, and connection:

C# Example

var ecad = new ECADControl
{
    X = 50, Y = 50,
    Width = 700, Height = 500
};
drawingManager.AddComponent(ecad);

var bat = new ECADBatteryNode { X = 100, Y = 200, Voltage = "9V" };
var res = new ECADResistorNode { X = 250, Y = 150, Resistance = "1kΩ" };
var led = new ECADDiodeNode { X = 400, Y = 150, ForwardVoltage = "2.1V" };
var gnd = new ECADGroundNode { X = 400, Y = 300 };

drawingManager.AddComponent(bat);
drawingManager.AddComponent(res);
drawingManager.AddComponent(led);
drawingManager.AddComponent(gnd);

drawingManager.ConnectComponents(bat.OutPoints[0], res.InPoints[0]);
drawingManager.ConnectComponents(res.OutPoints[0], led.InPoints[0]);
drawingManager.ConnectComponents(led.OutPoints[0], gnd.InPoints[0]);

Electrical Rules Check

ElectricalRulesChecker validates the electrical consistency of the diagram: floating inputs, conflicting drivers, missing power or ground, and pin-type mismatches. Violations are data, not exceptions:

MemberTypeDescription
RunChecks(components, lines)voidRuns every rule and fills Violations.
ViolationsList<ElectricalRuleViolation>One entry per problem found.
ElectricalRuleViolation.MessagestringHuman-readable description.
ElectricalRuleViolation.SeverityElectricalViolationSeverityWarning or error.
ElectricalRuleViolation.CategorystringRule family that produced the violation.
ElectricalRuleViolation.FixSuggestionstringSuggested remedy, when known.
ElectricalRuleViolation.Component / Port / Linemodel refsWhat the violation is attached to, for selection and highlighting.
var checker = new ElectricalRulesChecker();
checker.RunChecks(drawingManager.GetComponents().ToList(), drawingManager.GetLines());

int errors = checker.Violations.Count(v => v.Severity == ElectricalViolationSeverity.Error);
foreach (var violation in checker.Violations)
    Console.WriteLine($"[{violation.Severity}] {violation.Category}: {violation.Message}");