/** * Unified EasyEDA shape parser * Parses both symbol and footprint shapes from EasyEDA format * * Shape format reference (from easyeda2kicad): * - All shapes use tilde (~) as field delimiter * - Coordinates are in 10mil units (0.254mm per unit) * - Symbol shapes have Y-axis flipped relative to footprint */ import type { EasyEDAPin, EasyEDASymbolRect, EasyEDASymbolCircle, EasyEDASymbolEllipse, EasyEDASymbolArc, EasyEDASymbolPolyline, EasyEDASymbolPolygon, EasyEDASymbolPath, EasyEDASymbolText, ParsedSymbolData, EasyEDAPad, EasyEDATrack, EasyEDAHole, EasyEDACircle, EasyEDAArc, EasyEDARect, EasyEDAVia, EasyEDAText, EasyEDASolidRegion, ParsedFootprintData } from '../types/easyeda.js'; /** * Parse EasyEDA symbol pin format * Format: P~show~type~number~x~y~rotation~id~locked^^dotData^^pathData^^nameData^^numData^^dot^^clock * * Segments: * [0] = P~show~type~number~x~y~rotation~id~locked (main settings) * [1] = dot display data (visual dot, not inversion) * [2] = SVG path for pin line (M x y h LENGTH or v LENGTH) * [3] = name text data (1~x~y~rotation~name~fontSize~...) * [4] = number text data * [5] = inverted bubble indicator - "1" if inverted * [6] = clock triangle indicator - non-empty if clock */ export declare function parseSymbolPin(pinData: string): EasyEDAPin | null; /** * Parse symbol Rectangle shape * Format: R~x~y~rx~ry~width~height~strokeColor~strokeWidth~strokeStyle~fillColor~id~locked */ export declare function parseSymbolRect(data: string): EasyEDASymbolRect | null; /** * Parse symbol Circle shape * Format: C~cx~cy~radius~strokeColor~strokeWidth~strokeStyle~fillColor~id~locked */ export declare function parseSymbolCircle(data: string): EasyEDASymbolCircle | null; /** * Parse symbol Ellipse shape * Format: E~cx~cy~rx~ry~strokeColor~strokeWidth~strokeStyle~fillColor~id~locked */ export declare function parseSymbolEllipse(data: string): EasyEDASymbolEllipse | null; /** * Parse symbol Arc shape (SVG path format) * Format: A~path~strokeColor~strokeWidth~strokeStyle~fillColor~id~locked */ export declare function parseSymbolArc(data: string): EasyEDASymbolArc | null; /** * Parse symbol Polyline shape (open path) * Format: PL~points~strokeColor~strokeWidth~strokeStyle~fillColor~id~locked */ export declare function parseSymbolPolyline(data: string): EasyEDASymbolPolyline | null; /** * Parse symbol Polygon shape (closed filled path) * Format: PG~points~strokeColor~strokeWidth~strokeStyle~fillColor~id~locked */ export declare function parseSymbolPolygon(data: string): EasyEDASymbolPolygon | null; /** * Parse symbol SVG Path shape * Format: PT~path~strokeColor~strokeWidth~strokeStyle~fillColor~id~locked */ export declare function parseSymbolPath(data: string): EasyEDASymbolPath | null; /** * Parse symbol Text element * Format: T~alignment~x~y~rotation~color~~fontSize~...~type~text~...~id~...~pinpart * * Example: T~L~485~283~0~#8D2323~~7~ ~ ~ ~comment~J1/T+~1~start~gge40~0~pinpart * Fields: * [0]: T - marker * [1]: L - alignment (L=left, R=right, C=center) * [2]: x position * [3]: y position * [4]: rotation * [5]: color * [6]: (empty) * [7]: fontSize * [8-10]: spacers * [11]: type ("comment", "N" for name, etc.) * [12]: actual text content * [13-14]: display flags * [15]: id * [16]: locked * [17]: "pinpart" if this is a pin-related label */ export declare function parseSymbolText(data: string): EasyEDASymbolText | null; /** * Parse PAD element - 18 fields * Format: PAD~shape~cx~cy~width~height~layerId~net~number~holeRadius~points~rotation~id~holeLength~holePoint~isPlated~isLocked */ export declare function parsePad(data: string): EasyEDAPad | null; /** * Parse TRACK element - silkscreen/fab lines * Format: TRACK~strokeWidth~layerId~net~points~id~isLocked */ export declare function parseTrack(data: string): EasyEDATrack | null; /** * Parse HOLE element - NPTH * Format: HOLE~cx~cy~radius~id~isLocked */ export declare function parseHole(data: string): EasyEDAHole | null; /** * Parse CIRCLE element (footprint) * Format: CIRCLE~cx~cy~radius~strokeWidth~layerId~id~isLocked */ export declare function parseCircle(data: string): EasyEDACircle | null; /** * Parse ARC element (footprint) with SVG path * Format: ARC~strokeWidth~layerId~net~path~helperDots~id~isLocked */ export declare function parseArc(data: string): EasyEDAArc | null; /** * Parse RECT element (footprint) * Format: RECT~x~y~width~height~strokeWidth~id~layerId~isLocked */ export declare function parseRect(data: string): EasyEDARect | null; /** * Parse VIA element * Format: VIA~cx~cy~diameter~net~radius~id~isLocked */ export declare function parseVia(data: string): EasyEDAVia | null; /** * Parse TEXT element * Format: TEXT~type~cx~cy~strokeWidth~rotation~mirror~layerId~net~fontSize~text~textPath~isDisplayed~id~isLocked */ export declare function parseText(data: string): EasyEDAText | null; /** * Parse SOLIDREGION element - filled polygon region * Format: SOLIDREGION~layerId~~path~fillType~id~~~~ */ export declare function parseSolidRegion(data: string): EasyEDASolidRegion | null; /** * Parse all symbol shapes from raw shape strings * Returns parsed data without origin - origin is added by client after parsing. */ export declare function parseSymbolShapes(shapes: string[]): ParsedSymbolData; /** * Parse all footprint shapes from raw shape strings * Returns parsed data without origin - origin is added by client after parsing. */ export declare function parseFootprintShapes(shapes: string[]): ParsedFootprintData; //# sourceMappingURL=easyeda-shapes.d.ts.map