multisim2kicad 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -2
- package/dist/cli.js +2044 -39
- package/dist/db/symbols.d.ts +6 -2
- package/dist/emit/kicad-sch.d.ts +18 -1
- package/dist/index.js +2044 -39
- package/dist/ir/types.d.ts +24 -0
- package/dist/parse/dchip.d.ts +110 -0
- package/dist/parse/ms-hierarchy.d.ts +5 -1
- package/dist/parse/sim-settings.d.ts +35 -0
- package/dist/parse/spice.d.ts +303 -0
- package/package.json +1 -1
package/dist/db/symbols.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type LibrarySymbolSpec } from "../emit/kicad-sch.ts";
|
|
2
2
|
import type { SchGraphic, SchPoint } from "../ir/types.ts";
|
|
3
3
|
import type { EwDatabase } from "./ewdb.ts";
|
|
4
4
|
/**
|
|
@@ -22,6 +22,8 @@ export declare function parseSymbolPicture(xml: string): SymbolPicture;
|
|
|
22
22
|
export interface DatabaseSymbols {
|
|
23
23
|
specs: LibrarySymbolSpec[];
|
|
24
24
|
warnings: string[];
|
|
25
|
+
/** SPICE library text per family (only families with simulated parts). */
|
|
26
|
+
spice: Map<string, string>;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* One library symbol per database component: sections as units, pin
|
|
@@ -30,4 +32,6 @@ export interface DatabaseSymbols {
|
|
|
30
32
|
* package name to a KiCad footprint id when the footprint is in this
|
|
31
33
|
* database.
|
|
32
34
|
*/
|
|
33
|
-
export declare function databaseSymbols(db: EwDatabase, footprintFor: (pkg: string) => string | undefined
|
|
35
|
+
export declare function databaseSymbols(db: EwDatabase, footprintFor: (pkg: string) => string | undefined,
|
|
36
|
+
/** `Sim.Library` path for a family's SPICE library. */
|
|
37
|
+
spicePath?: (family: string) => string): DatabaseSymbols;
|
package/dist/emit/kicad-sch.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Schematic, SchGraphic, SymbolPin } from "../ir/types.ts";
|
|
1
|
+
import type { Schematic, SchGraphic, SimSpec, SymbolPin } from "../ir/types.ts";
|
|
2
2
|
/**
|
|
3
3
|
* One Multisim schematic unit in mm. Multisim's nominal unit is 0.25 mm; we
|
|
4
4
|
* use 10 mil (0.254 mm) so every integer coordinate is on a KiCad grid, and
|
|
@@ -13,6 +13,8 @@ export interface LibrarySymbolSpec {
|
|
|
13
13
|
value: string;
|
|
14
14
|
footprint?: string;
|
|
15
15
|
fields?: [string, string][];
|
|
16
|
+
/** Multisim has no simulation model for it. */
|
|
17
|
+
excludeFromSim?: boolean;
|
|
16
18
|
showPinNames: boolean;
|
|
17
19
|
showPinNumbers: boolean;
|
|
18
20
|
/** Unit 1..n: its drawing, its pins, and pins drawn as plain stems (kept on another unit). */
|
|
@@ -24,6 +26,12 @@ export interface LibrarySymbolSpec {
|
|
|
24
26
|
}
|
|
25
27
|
/** A `.kicad_sym` file of directly described symbols; each unit centred on its pins. */
|
|
26
28
|
export declare function librarySymbolsFile(specs: LibrarySymbolSpec[]): string;
|
|
29
|
+
/** `Sim.*` fields for a spec; `library` is the path `Sim.Library` gets. */
|
|
30
|
+
export declare function simFieldList(sim: SimSpec, o: {
|
|
31
|
+
value: string;
|
|
32
|
+
prefix: string;
|
|
33
|
+
library: string;
|
|
34
|
+
}): [string, string][];
|
|
27
35
|
/**
|
|
28
36
|
* Emit a KiCad schematic project: file name -> contents. The root page goes
|
|
29
37
|
* to `<baseName>.kicad_sch`; every other Multisim page gets its own file,
|
|
@@ -56,4 +64,13 @@ export declare function emitKicadSch(sch: Schematic): string;
|
|
|
56
64
|
*/
|
|
57
65
|
export declare function kicadProSchematicSettings(): {
|
|
58
66
|
connection_grid_size: number;
|
|
67
|
+
ngspice: {
|
|
68
|
+
fix_include_paths: boolean;
|
|
69
|
+
fix_passive_vals: boolean;
|
|
70
|
+
meta: {
|
|
71
|
+
version: number;
|
|
72
|
+
};
|
|
73
|
+
model_mode: number;
|
|
74
|
+
workbook_filename: string;
|
|
75
|
+
};
|
|
59
76
|
};
|