design module#
Design definition#
This module provides the Design class, which is the root of a JITX design.
- class Design[source]#
Bases:
StructuralTo create a JITX design, create a subclass of this class. It will need a
Board, aSubstrate, and aCircuitassigned to the fields board, substrate, and circuit respectively.Schematic settings can optionally be provided by adding fields of type
Paper,SchematicTemplate,SchematicMarking, andSchematicTitlePage. By default, the design uses the ANSI A paper size.>>> class MyDesign(Design): ... board = MyBoard() ... substrate = MySubstrate() ... circuit = MyCircuit() ... paper = Paper.ANSI_B
- class Initialized(design)[source]#
Bases:
EventEvent that is fired once the entire design has been gone through the initial construction and initialization. The design has not yet been dispatched for processing, and can still be modified if needed.
>>> class MyComponent(Component): @Design.Initialized.on def on_initialized(self, init: Design.Initialized): ... # do something after initialization
- Parameters:
design (Design)
- setup = <function Design.setup>#
- finalize = <function Design.finalize>#
- class DesignContext(design)[source]#
Bases:
ContextContext object representing the currently active design. Should not be used directly, but rather accessed through
jitx.current’sdesigninstead.>>> def design_elements() -> tuple[Board, Substrate, Circuit]: ... design = jitx.current.design ... return (design.board, design.substrate, design.circuit)
- Parameters:
design (Design)