@tscircuit/cli 0.1.1253 → 0.1.1254
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/dist/cli/main.js +442 -435
- package/dist/lib/index.js +63 -56
- package/package.json +2 -2
package/dist/lib/index.js
CHANGED
|
@@ -65661,7 +65661,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
|
|
|
65661
65661
|
}));
|
|
65662
65662
|
};
|
|
65663
65663
|
// package.json
|
|
65664
|
-
var version = "0.1.
|
|
65664
|
+
var version = "0.1.1253";
|
|
65665
65665
|
var package_default = {
|
|
65666
65666
|
name: "@tscircuit/cli",
|
|
65667
65667
|
version,
|
|
@@ -65695,7 +65695,7 @@ var package_default = {
|
|
|
65695
65695
|
"circuit-json": "^0.0.403",
|
|
65696
65696
|
"circuit-json-to-bom-csv": "^0.0.7",
|
|
65697
65697
|
"circuit-json-to-gerber": "^0.0.48",
|
|
65698
|
-
"circuit-json-to-kicad": "^0.0.
|
|
65698
|
+
"circuit-json-to-kicad": "^0.0.109",
|
|
65699
65699
|
"circuit-json-to-pnp-csv": "^0.0.7",
|
|
65700
65700
|
"circuit-json-to-readable-netlist": "^0.0.15",
|
|
65701
65701
|
"circuit-json-to-spice": "^0.0.10",
|
|
@@ -68331,7 +68331,7 @@ import {
|
|
|
68331
68331
|
} from "kicadts";
|
|
68332
68332
|
import { KicadPcb as KicadPcb2 } from "kicadts";
|
|
68333
68333
|
import { cju as cju2 } from "@tscircuit/circuit-json-util";
|
|
68334
|
-
import { compose as
|
|
68334
|
+
import { compose as compose5, translate as translate5, scale as scale4 } from "transformation-matrix";
|
|
68335
68335
|
import {
|
|
68336
68336
|
Paper as Paper2,
|
|
68337
68337
|
PcbLayers,
|
|
@@ -68352,7 +68352,7 @@ import {
|
|
|
68352
68352
|
TextEffects as TextEffects6,
|
|
68353
68353
|
TextEffectsFont as TextEffectsFont6
|
|
68354
68354
|
} from "kicadts";
|
|
68355
|
-
import { applyToPoint as
|
|
68355
|
+
import { applyToPoint as applyToPoint14 } from "transformation-matrix";
|
|
68356
68356
|
import {
|
|
68357
68357
|
Property as Property2,
|
|
68358
68358
|
TextEffects as TextEffects7,
|
|
@@ -68366,12 +68366,19 @@ import { FpCircle as FpCircle2, Stroke as Stroke5 } from "kicadts";
|
|
|
68366
68366
|
import { FpRect, Stroke as Stroke6 } from "kicadts";
|
|
68367
68367
|
import { FpRect as FpRect2, Stroke as Stroke7 } from "kicadts";
|
|
68368
68368
|
import { FpRect as FpRect3, Stroke as Stroke8 } from "kicadts";
|
|
68369
|
-
import { FpPoly, Pts as Pts3,
|
|
68369
|
+
import { FpPoly, Pts as Pts3, Stroke as Stroke9, Xy as Xy3 } from "kicadts";
|
|
68370
|
+
import {
|
|
68371
|
+
applyToPoint as applyToPoint8,
|
|
68372
|
+
compose as compose3,
|
|
68373
|
+
rotate,
|
|
68374
|
+
scale as scale2,
|
|
68375
|
+
translate as translate3
|
|
68376
|
+
} from "transformation-matrix";
|
|
68370
68377
|
import"kicadts";
|
|
68371
68378
|
import { FpText, TextEffects as TextEffects8, TextEffectsFont as TextEffectsFont8 } from "kicadts";
|
|
68372
|
-
import { applyToPoint as
|
|
68379
|
+
import { applyToPoint as applyToPoint9, rotate as rotate2, identity } from "transformation-matrix";
|
|
68373
68380
|
import { FpText as FpText3, TextEffects as TextEffects9, TextEffectsFont as TextEffectsFont9 } from "kicadts";
|
|
68374
|
-
import { applyToPoint as
|
|
68381
|
+
import { applyToPoint as applyToPoint10, rotate as rotate3, identity as identity2 } from "transformation-matrix";
|
|
68375
68382
|
import { FootprintModel as FootprintModel3 } from "kicadts";
|
|
68376
68383
|
import {
|
|
68377
68384
|
FootprintPad,
|
|
@@ -68383,22 +68390,22 @@ import {
|
|
|
68383
68390
|
PadNet
|
|
68384
68391
|
} from "kicadts";
|
|
68385
68392
|
import {
|
|
68386
|
-
applyToPoint as
|
|
68387
|
-
compose as
|
|
68388
|
-
translate as
|
|
68389
|
-
scale as
|
|
68390
|
-
rotate as
|
|
68393
|
+
applyToPoint as applyToPoint11,
|
|
68394
|
+
compose as compose4,
|
|
68395
|
+
translate as translate4,
|
|
68396
|
+
scale as scale3,
|
|
68397
|
+
rotate as rotate4
|
|
68391
68398
|
} from "transformation-matrix";
|
|
68392
68399
|
import { FootprintPad as FootprintPad2, PadDrill, PadNet as PadNet2 } from "kicadts";
|
|
68393
|
-
import { applyToPoint as
|
|
68400
|
+
import { applyToPoint as applyToPoint12, rotate as rotate5, identity as identity3 } from "transformation-matrix";
|
|
68394
68401
|
import { FootprintPad as FootprintPad3, PadDrill as PadDrill2 } from "kicadts";
|
|
68395
|
-
import { applyToPoint as
|
|
68402
|
+
import { applyToPoint as applyToPoint13, rotate as rotate6, identity as identity4 } from "transformation-matrix";
|
|
68396
68403
|
import { Segment, SegmentNet } from "kicadts";
|
|
68397
|
-
import { applyToPoint as applyToPoint14 } from "transformation-matrix";
|
|
68398
|
-
import { Via, ViaNet } from "kicadts";
|
|
68399
68404
|
import { applyToPoint as applyToPoint15 } from "transformation-matrix";
|
|
68400
|
-
import {
|
|
68405
|
+
import { Via, ViaNet } from "kicadts";
|
|
68401
68406
|
import { applyToPoint as applyToPoint16 } from "transformation-matrix";
|
|
68407
|
+
import { Footprint as Footprint4 } from "kicadts";
|
|
68408
|
+
import { applyToPoint as applyToPoint17 } from "transformation-matrix";
|
|
68402
68409
|
import { GrLine } from "kicadts";
|
|
68403
68410
|
import {
|
|
68404
68411
|
At as At2,
|
|
@@ -68407,8 +68414,8 @@ import {
|
|
|
68407
68414
|
TextEffectsFont as TextEffectsFont10,
|
|
68408
68415
|
TextEffectsJustify as TextEffectsJustify3
|
|
68409
68416
|
} from "kicadts";
|
|
68410
|
-
import { applyToPoint as
|
|
68411
|
-
import { applyToPoint as
|
|
68417
|
+
import { applyToPoint as applyToPoint18 } from "transformation-matrix";
|
|
68418
|
+
import { applyToPoint as applyToPoint20 } from "transformation-matrix";
|
|
68412
68419
|
import {
|
|
68413
68420
|
GrText as GrText2,
|
|
68414
68421
|
TextEffects as TextEffects11,
|
|
@@ -68416,7 +68423,7 @@ import {
|
|
|
68416
68423
|
TextEffectsJustify as TextEffectsJustify4,
|
|
68417
68424
|
At as At3
|
|
68418
68425
|
} from "kicadts";
|
|
68419
|
-
import { applyToPoint as
|
|
68426
|
+
import { applyToPoint as applyToPoint19 } from "transformation-matrix";
|
|
68420
68427
|
import { cju as cju3 } from "@tscircuit/circuit-json-util";
|
|
68421
68428
|
import { cju as cju4 } from "@tscircuit/circuit-json-util";
|
|
68422
68429
|
import { parseKicadSexpr as parseKicadSexpr2, KicadSch as KicadSch2 } from "kicadts";
|
|
@@ -68700,7 +68707,7 @@ function createPolylineFromPoints({
|
|
|
68700
68707
|
function createCircleFromPrimitive({
|
|
68701
68708
|
primitive,
|
|
68702
68709
|
transform,
|
|
68703
|
-
scale:
|
|
68710
|
+
scale: scale5
|
|
68704
68711
|
}) {
|
|
68705
68712
|
const circle = new SymbolCircle;
|
|
68706
68713
|
const scaledPos = applyToPoint2(transform, {
|
|
@@ -68709,7 +68716,7 @@ function createCircleFromPrimitive({
|
|
|
68709
68716
|
});
|
|
68710
68717
|
const c = circle;
|
|
68711
68718
|
c._sxCenter = new SymbolCircleCenter(scaledPos.x, scaledPos.y);
|
|
68712
|
-
c._sxRadius = new SymbolCircleRadius(primitive.radius *
|
|
68719
|
+
c._sxRadius = new SymbolCircleRadius(primitive.radius * scale5);
|
|
68713
68720
|
const stroke = new Stroke2;
|
|
68714
68721
|
stroke.width = 0.254;
|
|
68715
68722
|
stroke.type = "default";
|
|
@@ -68722,13 +68729,13 @@ function createCircleFromPrimitive({
|
|
|
68722
68729
|
function createTextFromPrimitive({
|
|
68723
68730
|
schText,
|
|
68724
68731
|
transform,
|
|
68725
|
-
scale:
|
|
68732
|
+
scale: scale5
|
|
68726
68733
|
}) {
|
|
68727
68734
|
const symbolText = new SymbolText;
|
|
68728
68735
|
const scaledPos = applyToPoint3(transform, { x: schText.x, y: schText.y });
|
|
68729
68736
|
symbolText.value = schText.text;
|
|
68730
68737
|
symbolText.at = [scaledPos.x, scaledPos.y, 0];
|
|
68731
|
-
const scaledFontSize = schText.fontSize *
|
|
68738
|
+
const scaledFontSize = schText.fontSize * scale5;
|
|
68732
68739
|
const font = new TextEffectsFont;
|
|
68733
68740
|
font.size = { height: scaledFontSize, width: scaledFontSize };
|
|
68734
68741
|
symbolText.effects = new TextEffects({ font });
|
|
@@ -70610,8 +70617,9 @@ function convertCourtyardRects(courtyardRects, componentCenter) {
|
|
|
70610
70617
|
}
|
|
70611
70618
|
return fpRects;
|
|
70612
70619
|
}
|
|
70613
|
-
function convertCourtyardOutlines(courtyardOutlines, componentCenter) {
|
|
70620
|
+
function convertCourtyardOutlines(courtyardOutlines, componentCenter, componentRotation = 0) {
|
|
70614
70621
|
const fpPolys = [];
|
|
70622
|
+
const cj2kicadMatrix = compose3(componentRotation !== 0 ? rotate(componentRotation * Math.PI / 180) : { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 }, scale2(1, -1), translate3(-componentCenter.x, -componentCenter.y));
|
|
70615
70623
|
for (const outline of courtyardOutlines) {
|
|
70616
70624
|
if (!outline.outline || outline.outline.length < 2)
|
|
70617
70625
|
continue;
|
|
@@ -70621,9 +70629,8 @@ function convertCourtyardOutlines(courtyardOutlines, componentCenter) {
|
|
|
70621
70629
|
};
|
|
70622
70630
|
const kicadLayer = layerMap[outline.layer] || "F.CrtYd";
|
|
70623
70631
|
const xyPoints = outline.outline.map((point) => {
|
|
70624
|
-
const
|
|
70625
|
-
|
|
70626
|
-
return new Xy3(relX, relY);
|
|
70632
|
+
const transformedPoint = applyToPoint8(cj2kicadMatrix, point);
|
|
70633
|
+
return new Xy3(transformedPoint.x, transformedPoint.y);
|
|
70627
70634
|
});
|
|
70628
70635
|
const fpPoly = new FpPoly;
|
|
70629
70636
|
fpPoly.points = new Pts3(xyPoints);
|
|
@@ -70648,8 +70655,8 @@ function createFpTextFromCircuitJson({
|
|
|
70648
70655
|
}
|
|
70649
70656
|
const relativeX = textElement.anchor_position.x - componentCenter.x;
|
|
70650
70657
|
const relativeY = -(textElement.anchor_position.y - componentCenter.y);
|
|
70651
|
-
const rotationMatrix = componentRotation !== 0 ?
|
|
70652
|
-
const rotatedPos =
|
|
70658
|
+
const rotationMatrix = componentRotation !== 0 ? rotate2(componentRotation * Math.PI / 180) : identity();
|
|
70659
|
+
const rotatedPos = applyToPoint9(rotationMatrix, {
|
|
70653
70660
|
x: relativeX,
|
|
70654
70661
|
y: relativeY
|
|
70655
70662
|
});
|
|
@@ -70703,8 +70710,8 @@ function convertNoteTexts(noteTexts, componentCenter, componentRotation) {
|
|
|
70703
70710
|
for (const textElement of noteTexts) {
|
|
70704
70711
|
const relX = textElement.anchor_position.x - componentCenter.x;
|
|
70705
70712
|
const relY = -(textElement.anchor_position.y - componentCenter.y);
|
|
70706
|
-
const rotationMatrix = componentRotation !== 0 ?
|
|
70707
|
-
const rotatedPos =
|
|
70713
|
+
const rotationMatrix = componentRotation !== 0 ? rotate3(componentRotation * Math.PI / 180) : identity2();
|
|
70714
|
+
const rotatedPos = applyToPoint10(rotationMatrix, { x: relX, y: relY });
|
|
70708
70715
|
const fontSize = textElement.font_size || 1;
|
|
70709
70716
|
const font = new TextEffectsFont9;
|
|
70710
70717
|
font.size = { width: fontSize, height: fontSize };
|
|
@@ -70742,8 +70749,8 @@ function create3DModelsFromCadComponent(cadComponent, componentCenter, options)
|
|
|
70742
70749
|
};
|
|
70743
70750
|
}
|
|
70744
70751
|
if (cadComponent.model_unit_to_mm_scale_factor) {
|
|
70745
|
-
const
|
|
70746
|
-
model.scale = { x:
|
|
70752
|
+
const scale5 = cadComponent.model_unit_to_mm_scale_factor;
|
|
70753
|
+
model.scale = { x: scale5, y: scale5, z: scale5 };
|
|
70747
70754
|
}
|
|
70748
70755
|
models.push(model);
|
|
70749
70756
|
return models;
|
|
@@ -70768,8 +70775,8 @@ function createSmdPadFromCircuitJson({
|
|
|
70768
70775
|
} else {
|
|
70769
70776
|
throw new Error("Pad must have either x/y coordinates or points array");
|
|
70770
70777
|
}
|
|
70771
|
-
const cj2kicadMatrix =
|
|
70772
|
-
const rotatedPos =
|
|
70778
|
+
const cj2kicadMatrix = compose4(componentRotation !== 0 ? rotate4(componentRotation * Math.PI / 180) : { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 }, scale3(1, -1), translate4(-componentCenter.x, -componentCenter.y));
|
|
70779
|
+
const rotatedPos = applyToPoint11(cj2kicadMatrix, {
|
|
70773
70780
|
x: padX,
|
|
70774
70781
|
y: padY
|
|
70775
70782
|
});
|
|
@@ -70790,9 +70797,9 @@ function createSmdPadFromCircuitJson({
|
|
|
70790
70797
|
];
|
|
70791
70798
|
} else if (pcbPad.shape === "polygon" && "points" in pcbPad) {
|
|
70792
70799
|
const points = pcbPad.points;
|
|
70793
|
-
const pointTransformMatrix =
|
|
70800
|
+
const pointTransformMatrix = compose4(scale3(1, -1), translate4(-padX, -padY));
|
|
70794
70801
|
const relativePoints = points.map((p) => {
|
|
70795
|
-
const transformed =
|
|
70802
|
+
const transformed = applyToPoint11(pointTransformMatrix, { x: p.x, y: p.y });
|
|
70796
70803
|
return new Xy4(transformed.x, transformed.y);
|
|
70797
70804
|
});
|
|
70798
70805
|
const grPoly = new PadPrimitiveGrPoly;
|
|
@@ -70868,8 +70875,8 @@ function createThruHolePadFromCircuitJson({
|
|
|
70868
70875
|
}
|
|
70869
70876
|
const relativeX = platedHole.x - componentCenter.x;
|
|
70870
70877
|
const relativeY = -(platedHole.y - componentCenter.y);
|
|
70871
|
-
const rotationMatrix = componentRotation !== 0 ?
|
|
70872
|
-
const rotatedPos =
|
|
70878
|
+
const rotationMatrix = componentRotation !== 0 ? rotate5(componentRotation * Math.PI / 180) : identity3();
|
|
70879
|
+
const rotatedPos = applyToPoint12(rotationMatrix, {
|
|
70873
70880
|
x: relativeX,
|
|
70874
70881
|
y: relativeY
|
|
70875
70882
|
});
|
|
@@ -70885,7 +70892,7 @@ function createThruHolePadFromCircuitJson({
|
|
|
70885
70892
|
y: platedHole.hole_offset_y ?? 0
|
|
70886
70893
|
};
|
|
70887
70894
|
if (rawOffset.x !== 0 || rawOffset.y !== 0) {
|
|
70888
|
-
const rotatedOffset =
|
|
70895
|
+
const rotatedOffset = applyToPoint12(rotationMatrix, {
|
|
70889
70896
|
x: -rawOffset.x,
|
|
70890
70897
|
y: rawOffset.y
|
|
70891
70898
|
});
|
|
@@ -70998,8 +71005,8 @@ function createNpthPadFromCircuitJson({
|
|
|
70998
71005
|
}
|
|
70999
71006
|
const relativeX = pcbHole.x - componentCenter.x;
|
|
71000
71007
|
const relativeY = -(pcbHole.y - componentCenter.y);
|
|
71001
|
-
const rotationMatrix = componentRotation !== 0 ?
|
|
71002
|
-
const rotatedPos =
|
|
71008
|
+
const rotationMatrix = componentRotation !== 0 ? rotate6(componentRotation * Math.PI / 180) : identity4();
|
|
71009
|
+
const rotatedPos = applyToPoint13(rotationMatrix, {
|
|
71003
71010
|
x: relativeX,
|
|
71004
71011
|
y: relativeY
|
|
71005
71012
|
});
|
|
@@ -71113,7 +71120,7 @@ var AddFootprintsStage = class extends ConverterStage {
|
|
|
71113
71120
|
const sourceComponent = component.source_component_id ? this.ctx.db.source_component.get(component.source_component_id) : null;
|
|
71114
71121
|
const cadComponent = this.getCadComponentForPcbComponent(component.pcb_component_id);
|
|
71115
71122
|
const footprintName = sourceComponent ? getKicadCompatibleComponentName(sourceComponent, cadComponent) : "Unknown";
|
|
71116
|
-
const transformedPos =
|
|
71123
|
+
const transformedPos = applyToPoint14(c2kMatPcb, {
|
|
71117
71124
|
x: component.center.x,
|
|
71118
71125
|
y: component.center.y
|
|
71119
71126
|
});
|
|
@@ -71157,7 +71164,7 @@ var AddFootprintsStage = class extends ConverterStage {
|
|
|
71157
71164
|
fpRects.push(...convertCourtyardRects(pcbCourtyardRects, component.center));
|
|
71158
71165
|
footprint.fpRects = fpRects;
|
|
71159
71166
|
const pcbCourtyardOutlines = this.ctx.db.pcb_courtyard_outline?.list().filter((outline) => outline.pcb_component_id === component.pcb_component_id) || [];
|
|
71160
|
-
const fpPolys = convertCourtyardOutlines(pcbCourtyardOutlines, component.center);
|
|
71167
|
+
const fpPolys = convertCourtyardOutlines(pcbCourtyardOutlines, component.center, component.rotation || 0);
|
|
71161
71168
|
if (fpPolys.length > 0) {
|
|
71162
71169
|
footprint.fpPolys = fpPolys;
|
|
71163
71170
|
}
|
|
@@ -71270,11 +71277,11 @@ var AddTracesStage = class extends ConverterStage {
|
|
|
71270
71277
|
for (let i = 0;i < trace.route.length - 1; i++) {
|
|
71271
71278
|
const startPoint = trace.route[i];
|
|
71272
71279
|
const endPoint = trace.route[i + 1];
|
|
71273
|
-
const transformedStart =
|
|
71280
|
+
const transformedStart = applyToPoint15(c2kMatPcb, {
|
|
71274
71281
|
x: startPoint.x,
|
|
71275
71282
|
y: startPoint.y
|
|
71276
71283
|
});
|
|
71277
|
-
const transformedEnd =
|
|
71284
|
+
const transformedEnd = applyToPoint15(c2kMatPcb, {
|
|
71278
71285
|
x: endPoint.x,
|
|
71279
71286
|
y: endPoint.y
|
|
71280
71287
|
});
|
|
@@ -71397,7 +71404,7 @@ var AddViasStage = class extends ConverterStage {
|
|
|
71397
71404
|
this.finished = true;
|
|
71398
71405
|
return;
|
|
71399
71406
|
}
|
|
71400
|
-
const transformedPos =
|
|
71407
|
+
const transformedPos = applyToPoint16(c2kMatPcb, {
|
|
71401
71408
|
x: via.x,
|
|
71402
71409
|
y: via.y
|
|
71403
71410
|
});
|
|
@@ -71491,7 +71498,7 @@ var AddStandalonePcbElements = class extends ConverterStage {
|
|
|
71491
71498
|
if (elm.type === "pcb_hole") {
|
|
71492
71499
|
const hole = elm;
|
|
71493
71500
|
const footprintSeed = `standalone_hole:${hole.pcb_hole_id}:${hole.x},${hole.y}`;
|
|
71494
|
-
const kicadPos =
|
|
71501
|
+
const kicadPos = applyToPoint17(c2kMatPcb, { x: hole.x, y: hole.y });
|
|
71495
71502
|
const libraryLink = this.getHoleLibraryLink(hole);
|
|
71496
71503
|
const footprint = new Footprint4({
|
|
71497
71504
|
libraryLink,
|
|
@@ -71510,7 +71517,7 @@ var AddStandalonePcbElements = class extends ConverterStage {
|
|
|
71510
71517
|
} else if (elm.type === "pcb_plated_hole") {
|
|
71511
71518
|
const hole = elm;
|
|
71512
71519
|
const footprintSeed = `standalone_plated_hole:${hole.pcb_plated_hole_id}:${hole.x},${hole.y}`;
|
|
71513
|
-
const kicadPos =
|
|
71520
|
+
const kicadPos = applyToPoint17(c2kMatPcb, { x: hole.x, y: hole.y });
|
|
71514
71521
|
const libraryLink = this.getPlatedHoleLibraryLink(hole);
|
|
71515
71522
|
const footprint = new Footprint4({
|
|
71516
71523
|
libraryLink,
|
|
@@ -71576,7 +71583,7 @@ function createFabricationNoteTextFromCircuitJson({
|
|
|
71576
71583
|
if (!textElement.text || !textElement.anchor_position) {
|
|
71577
71584
|
return null;
|
|
71578
71585
|
}
|
|
71579
|
-
const transformedPos =
|
|
71586
|
+
const transformedPos = applyToPoint18(c2kMatPcb, {
|
|
71580
71587
|
x: textElement.anchor_position.x,
|
|
71581
71588
|
y: textElement.anchor_position.y
|
|
71582
71589
|
});
|
|
@@ -71632,7 +71639,7 @@ function createGrTextFromCircuitJson({
|
|
|
71632
71639
|
if (!textElement.text || !textElement.anchor_position) {
|
|
71633
71640
|
return null;
|
|
71634
71641
|
}
|
|
71635
|
-
const transformedPos =
|
|
71642
|
+
const transformedPos = applyToPoint19(c2kMatPcb, {
|
|
71636
71643
|
x: textElement.anchor_position.x,
|
|
71637
71644
|
y: textElement.anchor_position.y
|
|
71638
71645
|
});
|
|
@@ -71700,11 +71707,11 @@ var AddGraphicsStage = class extends ConverterStage {
|
|
|
71700
71707
|
const endPoint = path7.route[i + 1];
|
|
71701
71708
|
if (!startPoint || !endPoint)
|
|
71702
71709
|
continue;
|
|
71703
|
-
const transformedStart =
|
|
71710
|
+
const transformedStart = applyToPoint20(c2kMatPcb, {
|
|
71704
71711
|
x: startPoint.x,
|
|
71705
71712
|
y: startPoint.y
|
|
71706
71713
|
});
|
|
71707
|
-
const transformedEnd =
|
|
71714
|
+
const transformedEnd = applyToPoint20(c2kMatPcb, {
|
|
71708
71715
|
x: endPoint.x,
|
|
71709
71716
|
y: endPoint.y
|
|
71710
71717
|
});
|
|
@@ -71768,7 +71775,7 @@ var AddGraphicsStage = class extends ConverterStage {
|
|
|
71768
71775
|
{ x: board.center.x - halfWidth, y: board.center.y + halfHeight }
|
|
71769
71776
|
];
|
|
71770
71777
|
}
|
|
71771
|
-
const transformedCorners = corners.map((corner) =>
|
|
71778
|
+
const transformedCorners = corners.map((corner) => applyToPoint20(c2kMatPcb, corner));
|
|
71772
71779
|
for (let i = 0;i < transformedCorners.length; i++) {
|
|
71773
71780
|
const start = transformedCorners[i];
|
|
71774
71781
|
const end = transformedCorners[(i + 1) % transformedCorners.length];
|
|
@@ -71810,7 +71817,7 @@ var CircuitJsonToKicadPcbConverter = class {
|
|
|
71810
71817
|
generator: "circuit-json-to-kicad",
|
|
71811
71818
|
generatorVersion: "0.0.1"
|
|
71812
71819
|
}),
|
|
71813
|
-
c2kMatPcb:
|
|
71820
|
+
c2kMatPcb: compose5(translate5(KICAD_PCB_CENTER_X, KICAD_PCB_CENTER_Y), scale4(CIRCUIT_JSON_TO_MM_SCALE, -CIRCUIT_JSON_TO_MM_SCALE)),
|
|
71814
71821
|
projectName: options?.projectName,
|
|
71815
71822
|
pcbModel3dSourcePaths: []
|
|
71816
71823
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1254",
|
|
4
4
|
"main": "dist/cli/main.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/cli/main.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"circuit-json": "^0.0.403",
|
|
32
32
|
"circuit-json-to-bom-csv": "^0.0.7",
|
|
33
33
|
"circuit-json-to-gerber": "^0.0.48",
|
|
34
|
-
"circuit-json-to-kicad": "^0.0.
|
|
34
|
+
"circuit-json-to-kicad": "^0.0.109",
|
|
35
35
|
"circuit-json-to-pnp-csv": "^0.0.7",
|
|
36
36
|
"circuit-json-to-readable-netlist": "^0.0.15",
|
|
37
37
|
"circuit-json-to-spice": "^0.0.10",
|