schematic module#
Schematic generation and templates#
This module provides classes for schematic templates, author tables, title pages, and schematic markings.
- class SchematicTemplate[source]#
Bases:
StructuralTemplate for schematic author table.
>>> class MySchematicTemplate(SchematicTemplate): ... width = 108 ... height = 32 ... table = AuthorTable( ... rows=[ ... AuthorRow( ... cells=[ ... DataCell(value=">TITLE", width=0.7), ... TableCell( ... table=AuthorTable( ... rows=[ ... AuthorRow(cells=[DataCell(value="JITX Inc.")]), ... AuthorRow( ... cells=[DataCell(value="sheet >SHEET/>NUMSHEETS")], ... height=0.3, ... ), ... ] ... ), ... ), ... ], ... ), ... AuthorRow( ... cells=[DataCell(value="May 18, 2026")], ... height=0.2, ... ), ... ] ... )
- name: str | None = None#
Optional name for the template.
- table: AuthorTable#
Author table for the schematic.
- width: int#
Width of the schematic page, in grid units.
- height: int#
Height of the schematic page, in grid units.
- class AuthorRow(cells, height=None)[source]#
Bases:
CriticalRow in an author table.
- Parameters:
cells (Sequence[AuthorCell])
height (float | None)
-
cells:
Sequence[AuthorCell]# Cells in this row.
- class DataCell(value, width=None)[source]#
Bases:
AuthorCellCell containing text data.
- class TableCell(table, width=None)[source]#
Bases:
AuthorCellCell containing a nested table.
- Parameters:
table (AuthorTable)
width (float | None)
-
table:
AuthorTable# Nested table within this cell.
- class SchematicTitlePage(title)[source]#
A title page for a schematic.
>>> class MyDesign(Design): ... schematic_title_page = SchematicTitlePage( ... """<svg width="279" height="216" viewBox="0 0 279 216" xmlns="http://www.w3.org/2000/svg"> ... <defs> ... <linearGradient id="bgGradient" x1="0%" y1="0%" x2="0%" y2="100%"> ... <stop offset="0%" stop-color="#667EEA" /> ... <stop offset="100%" stop-color="#764BA2" /> ... </linearGradient> ... </defs> ... <rect x="0" y="0" width="279" height="216" rx="12" fill="url(#bgGradient)" /> ... <text x="139" y="120" font-family="Arial, Helvetica, sans-serif" font-size="36" fill="white" font-weight="bold" text-anchor="middle">Title Page</text> ... </svg>""", ... )
- Parameters:
title (str)