UNPKG

@typecad/schematic

Version:

Generate KiCAD schematics from your typeCAD project

62 lines (57 loc) 1.36 kB
import { randomUUID, UUID as CryptoUUID } from "node:crypto"; // Type Definitions export type PinType = | 'passive' | 'input' | 'output' | 'bidirectional' | 'tri_state' | 'power_in' | 'unspecified' | 'power_out' | 'free' | 'open_collector' | 'open_emitter' | 'no_connect'; export interface Schematic { Sheetname: string; Components: Component[]; Nodes: Node[]; uuid: string; } export interface Component { reference: string; constructor?: { name?: string }; footprint: string; symbol?: string; value?: string; datasheet?: string; description?: string; voltage?: string; wattage?: string; mpn?: string; pcb?: { x: number; y: number; rotation?: number }; dnp?: boolean; uuid?: string; pins?: Pin[]; via?: boolean; simulation?: { include: boolean; model: string }; sch?: { x: number, y: number, rotation?: number } } export interface Node { name: string; code: number; nodes: Array<{ number: number | string; name?: string; reference: string; type: PinType; owner: Component | null; }>; } export interface Pin { number: number | string; reference: string; type: PinType; owner: Component | null; }