Skip to content
Open
64 changes: 55 additions & 9 deletions lib/convert-easyeda-json-to-tscircuit-soup-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
import * as Soup from "circuit-json"
import { applyToPoint, compose, scale, translate } from "transformation-matrix"
import type { z } from "zod"
import { DEFAULT_PCB_THICKNESS_MM } from "./constants"
import { generateArcFromSweep, generateArcPathWithMid } from "./math/arc-utils"
import type { BetterEasyEdaJson } from "./schemas/easy-eda-json-schema"
import type {
Expand All @@ -36,6 +35,7 @@ import type {
import { mil10ToMm } from "./utils/easyeda-unit-to-mm"
import { normalizePinLabels } from "./utils/normalize-pin-labels"
import { normalizeSymbolName } from "./utils/normalize-symbol-name"
import { DEFAULT_PCB_THICKNESS_MM } from "./constants"

const EASYEDA_STEP_MODEL_URL =
"https://modules.easyeda.com/qAxj6KHrDKw4blvCG8QJPs7Y"
Expand Down Expand Up @@ -206,6 +206,7 @@ interface Options {
useModelCdn?: boolean
shouldRecenter?: boolean
cadPositionZMm?: number
showDesignator?: boolean
}

const getCadPositionZMmFromMetadata = (easyEdaJson: BetterEasyEdaJson) => {
Expand All @@ -226,7 +227,12 @@ const getCadPositionZMmFromMetadata = (easyEdaJson: BetterEasyEdaJson) => {

export const convertEasyEdaJsonToCircuitJson = (
easyEdaJson: BetterEasyEdaJson,
{ useModelCdn, shouldRecenter = true, cadPositionZMm }: Options = {},
{
useModelCdn,
shouldRecenter = true,
cadPositionZMm,
showDesignator = false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this for?

}: Options = {},
): AnyCircuitElement[] => {
const resolvedCadPositionZMm =
cadPositionZMm ?? getCadPositionZMmFromMetadata(easyEdaJson)
Expand Down Expand Up @@ -492,6 +498,7 @@ export const convertEasyEdaJsonToCircuitJson = (
})

// Add silkscreen paths, arcs and text
let hasFoundDesignator = false
easyEdaJson.packageDetail.dataStr.shape.forEach((shape, index) => {
if (shape.type === "TRACK") {
if (!isCourtyardLayer(shape.layer)) {
Expand All @@ -503,28 +510,67 @@ export const convertEasyEdaJsonToCircuitJson = (
}
} else if (shape.type === "TEXT") {
if (isCourtyardLayer(shape.layer)) return

let text = shape.text
const designatorPrefix = easyEdaJson.dataStr.head.c_para.pre || "U"
const NormalizedPrefix = designatorPrefix.replace("?", "")
const isDesignator =
text === designatorPrefix ||
text === `${NormalizedPrefix}?` ||
text === NormalizedPrefix

if (isDesignator) {
if (!showDesignator) return
text = "{NAME}"
hasFoundDesignator = true
}

circuitElements.push(
Soup.pcb_silkscreen_text.parse({
type: "pcb_silkscreen_text",
pcb_silkscreen_text_id: `pcb_silkscreen_text_${index + 1}`,
pcb_component_id: "pcb_component_1",
text: normalizeSymbolName(shape.text),
text,
anchor_position: {
x: mil2mm(shape.x),
y: mil2mm(shape.y),
},
anchor_alignment: {
L: "bottom_left",
C: "center",
R: "bottom_right",
}[shape.textAnchor ?? "L"],
font_size: shape.size_mm ? shape.size_mm : undefined,
anchor_alignment: (
{
L: "bottom_left",
C: "center",
R: "bottom_right",
} as const
)[shape.textAnchor ?? "L"],
font_size: shape.size_mm || 1.0,
layer: "top",
} as Soup.PcbSilkscreenTextInput),
)
}
})

// Add a fallback designator if none was found in the shapes
if (!hasFoundDesignator && showDesignator) {
const bbox = easyEdaJson.packageDetail.dataStr.BBox
circuitElements.push(
Soup.pcb_silkscreen_text.parse({
type: "pcb_silkscreen_text",
pcb_silkscreen_text_id: `pcb_silkscreen_text_designator_fallback`,
pcb_component_id: "pcb_component_1",
text: "{NAME}",
anchor_position: {
x: milx10(bbox.x + bbox.width / 2),
y: milx10(bbox.y) - 1.0, // 1mm above top edge
},
anchor_alignment: "center",
font_size: 1.0,
layer: "top",
} as Soup.PcbSilkscreenTextInput),
)
}

// Only add designator if found in EasyEDA

// Calculate pcb_component bounds from all PCB elements
const pcbElements = circuitElements.filter(
(e) =>
Expand Down
1 change: 1 addition & 0 deletions lib/websafe/convert-to-typescript-component/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const convertBetterEasyToTsx = async ({
useModelCdn: true,
shouldRecenter: true,
cadPositionZMm: cadPlacement?.positionZMm,
showDesignator: true,
})
const [cadComponent] = su(circuitJson).cad_component.list()
if (cadComponent) {
Expand Down
9 changes: 8 additions & 1 deletion lib/websafe/generate-footprint-tsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ export const generateFootprintTsx = (
}

for (const silkscreenText of silkscreenTexts) {
const isReferenceDesignator = silkscreenText.text === "{NAME}"
let text: string
if (isReferenceDesignator) {
text = "{props.name}"
} else {
text = silkscreenText.text
}
elementStrings.push(
`<silkscreentext text="${silkscreenText.text}" pcbX="${mmStr(silkscreenText.anchor_position.x)}" pcbY="${mmStr(silkscreenText.anchor_position.y)}" anchorAlignment="${silkscreenText.anchor_alignment}" ${silkscreenText.font_size ? `fontSize="${mmStr(silkscreenText.font_size)}"` : ""} />`,
`<silkscreentext text=${text} pcbX="${mmStr(silkscreenText.anchor_position.x)}" pcbY="${mmStr(silkscreenText.anchor_position.y)}" anchorAlignment="${silkscreenText.anchor_alignment}" ${silkscreenText.font_size ? `fontSize="${mmStr(silkscreenText.font_size)}"` : ""} />`,
)
}

Expand Down
272 changes: 272 additions & 0 deletions tests/assets/C2652953.raweasy.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/convert-to-ts/C1046-to-ts-with-stepModel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ it("should include both obj and step cad model urls", async () => {
<smtpad portHints={["pin2"]} pcbX="0.9662160000000313mm" pcbY="0mm" width="1.1325352mm" height="1.3770101999999997mm" shape="rect" />
<silkscreenpath route={[{"x":-0.4212590000000773,"y":1.015949199999909},{"x":-1.5642590000001064,"y":1.015949199999909},{"x":-1.6912590000000591,"y":1.015949199999909},{"x":-1.9452590000000782,"y":0.76194919999989},{"x":-1.9452590000000782,"y":-0.6350507999999309},{"x":-1.9452590000000782,"y":-0.7620508000001109},{"x":-1.6912590000000591,"y":-1.0160508000000164},{"x":-0.4212590000000773,"y":-1.0160508000000164}]} />
<silkscreenpath route={[{"x":0.34074099999998,"y":-1.0160508000000164},{"x":1.4837409999998954,"y":-1.0160508000000164},{"x":1.6107409999999618,"y":-1.0160508000000164},{"x":1.8647409999998672,"y":-0.7620508000001109},{"x":1.8647409999998672,"y":0.6349491999999373},{"x":1.8647409999998672,"y":0.76194919999989},{"x":1.6107409999999618,"y":1.015949199999909},{"x":0.34074099999998,"y":1.015949199999909}]} />
<silkscreentext text={props.name} pcbX="-0.04190999999991618mm" pcbY="2.0193020000001525mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-2.1969100000000026,"y":1.2693020000001525},{"x":2.1130900000000565,"y":1.2693020000001525},{"x":2.1130900000000565,"y":-1.2626980000000003},{"x":-2.1969100000000026,"y":-1.2626980000000003},{"x":-2.1969100000000026,"y":1.2693020000001525}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C1046-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ it("should convert C1046 into typescript file", async () => {
<smtpad portHints={["pin2"]} pcbX="0.9662160000000313mm" pcbY="0mm" width="1.1325352mm" height="1.3770101999999997mm" shape="rect" />
<silkscreenpath route={[{"x":-0.4212590000000773,"y":1.015949199999909},{"x":-1.5642590000001064,"y":1.015949199999909},{"x":-1.6912590000000591,"y":1.015949199999909},{"x":-1.9452590000000782,"y":0.76194919999989},{"x":-1.9452590000000782,"y":-0.6350507999999309},{"x":-1.9452590000000782,"y":-0.7620508000001109},{"x":-1.6912590000000591,"y":-1.0160508000000164},{"x":-0.4212590000000773,"y":-1.0160508000000164}]} />
<silkscreenpath route={[{"x":0.34074099999998,"y":-1.0160508000000164},{"x":1.4837409999998954,"y":-1.0160508000000164},{"x":1.6107409999999618,"y":-1.0160508000000164},{"x":1.8647409999998672,"y":-0.7620508000001109},{"x":1.8647409999998672,"y":0.6349491999999373},{"x":1.8647409999998672,"y":0.76194919999989},{"x":1.6107409999999618,"y":1.015949199999909},{"x":0.34074099999998,"y":1.015949199999909}]} />
<silkscreentext text={props.name} pcbX="-0.04190999999991618mm" pcbY="2.0193020000001525mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-2.1969100000000026,"y":1.2693020000001525},{"x":2.1130900000000565,"y":1.2693020000001525},{"x":2.1130900000000565,"y":-1.2626980000000003},{"x":-2.1969100000000026,"y":-1.2626980000000003},{"x":-2.1969100000000026,"y":1.2693020000001525}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C105419-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ it("should convert C105419 into typescript file", async () => {
<silkscreenpath route={[{"x":-2.141480349999938,"y":4.252823599999942},{"x":-2.141480349999938,"y":3.2970723999999336}]} />
<silkscreenpath route={[{"x":-2.141480349999938,"y":2.0526756000000432},{"x":-2.141480349999938,"y":1.0971783999999616}]} />
<silkscreenpath route={[{"x":-6.611880349999865,"y":5.7571640000001025},{"x":-6.51781893128998,"y":5.5256051306557765},{"x":-6.4298548075097415,"y":5.291662032041472},{"x":-6.34804833493456,"y":5.055495223394246},{"x":-6.272455644789261,"y":4.817266749742885},{"x":-6.203128604733024,"y":4.577140070719452},{"x":-6.140114783271542,"y":4.335279948403809},{"x":-6.083457417117643,"y":4.09185233427138},{"x":-6.033195381524706,"y":3.8470242553265734},{"x":-5.989363163612325,"y":3.6009636994980383},{"x":-5.951990838703296,"y":3.3538395003741925},{"x":-5.921104049687074,"y":3.105821221358269},{"x":-5.89672398942605,"y":2.85707903932348},{"x":-5.878867386213074,"y":2.607783627846743},{"x":-5.867546492293968,"y":2.3581060401008926},{"x":-5.862769075460392,"y":2.108217591488028},{"x":-5.8645384137200836,"y":1.8582897420916424},{"x":-5.872853293047683,"y":1.6084939790300723},{"x":-5.887708008218169,"y":1.3590016987910758},{"x":-5.9090923667206425,"y":1.109984089628142},{"x":-5.936991695752454,"y":0.8616120141017518},{"x":-5.971386852286514,"y":0.6140558918410761},{"x":-6.0122542362070135,"y":0.36748558261228936},{"x":-6.059565806501496,"y":0.12207026976886937},{"x":-6.113289100501788,"y":-0.12202165583187252},{"x":-6.173387256157866,"y":-0.3646227113705436},{"x":-6.2398190373309035,"y":-0.6055664369827127},{"x":-6.312538862087081,"y":-0.8446875099754152},{"x":-6.391496833973179,"y":-1.081821858262174},{"x":-6.476638776253594,"y":-1.3168067729407085},{"x":-6.567906269082869,"y":-1.5494810199348876},{"x":-6.665236689590756,"y":-1.7796849506258923},{"x":-6.768563254849823,"y":-2.007260611392553},{"x":-6.877815067699771,"y":-2.232051851993333},{"x":-6.992917165391759,"y":-2.4539044327053716},{"x":-7.113790571024765,"y":-2.6726661301580634},{"x":-7.240352347735097,"y":-2.888186841779202},{"x":-7.372515655602797,"y":-3.1003186887875245},{"x":-7.510189811237751,"y":-3.3089161176593507},{"x":-7.653280349999932,"y":-3.5138359999998556}]} />
<silkscreentext text={props.name} pcbX="-0.007880349999936698mm" pcbY="8.58596399999999mm" anchorAlignment="center" fontSize="1mm" />
Comment thread
techmannih marked this conversation as resolved.
<courtyardoutline outline={[{"x":-8.15728034999995,"y":7.83596399999999},{"x":8.141519649999964,"y":7.83596399999999},{"x":8.141519649999964,"y":-7.802435999999943},{"x":-8.15728034999995,"y":-7.802435999999943},{"x":-8.15728034999995,"y":7.83596399999999}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C128415-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ it("should convert C128415 into typescript file", async () => {
<smtpad portHints={["pin2"]} pcbX="-0.6349999999999909mm" pcbY="-2.569972000000007mm" width="0.5880099999999999mm" height="2.0450048mm" shape="rect" />
<smtpad portHints={["pin1"]} pcbX="-1.9050000000000864mm" pcbY="-2.569972000000007mm" width="0.5880099999999999mm" height="2.0450048mm" shape="rect" />
<silkscreenpath route={[{"x":-2.5262078000000656,"y":-1.5214091999999937},{"x":-2.5262078000000656,"y":1.5214092000001074},{"x":2.526207799999952,"y":1.5214092000001074},{"x":2.526207799999952,"y":-1.5214091999999937},{"x":-2.5262078000000656,"y":-1.5214091999999937}]} />
<silkscreentext text={props.name} pcbX="-0.1269999999999527mm" pcbY="4.302000000000021mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-3.0439999999999827,"y":3.552000000000021},{"x":2.7899999999999636,"y":3.552000000000021},{"x":2.7899999999999636,"y":-3.80600000000004},{"x":-3.0439999999999827,"y":-3.80600000000004},{"x":-3.0439999999999827,"y":3.552000000000021}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C131337-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ it("should convert C131337 into typescript file", async () => {
<silkscreenpath route={[{"x":-2.921000000000049,"y":0.2540000000000191},{"x":-2.413000000000011,"y":0.2540000000000191},{"x":-2.413000000000011,"y":2.158999999999992},{"x":2.53999999999985,"y":2.158999999999992},{"x":2.53999999999985,"y":0.2540000000000191},{"x":2.9209999999998217,"y":0.2540000000000191}]} />
<silkscreenpath route={[{"x":3.000044799999955,"y":-0.3810000000000855},{"x":2.4920448000000306,"y":-0.3810000000000855},{"x":2.4920448000000306,"y":-1.1430000000001428},{"x":0.3330447999999251,"y":-1.1430000000001428},{"x":0.3330447999999251,"y":-1.6510000000000673}]} />
<silkscreenpath route={[{"x":-2.921000000000049,"y":-0.3810000000000855},{"x":-2.413000000000011,"y":-0.3810000000000855},{"x":-2.413000000000011,"y":-1.1430000000001428},{"x":-0.2540000000001328,"y":-1.1430000000001428},{"x":-0.2540000000001328,"y":-1.6510000000000673}]} />
<silkscreentext text={props.name} pcbX="0.01600199999995766mm" pcbY="3.895599999999945mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-3.2565980000001673,"y":3.145599999999945},{"x":3.288601999999969,"y":3.145599999999945},{"x":3.288601999999969,"y":-1.9517999999999347},{"x":-3.2565980000001673,"y":-1.9517999999999347},{"x":-3.2565980000001673,"y":3.145599999999945}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C14877-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ it("should convert C14877 into typescript file", async () => {
<silkscreenpath route={[{"x":-2.9626559999999813,"y":2.9499560000000145},{"x":-2.9626559999999813,"y":-2.949955999999986},{"x":2.937256000000019,"y":-2.949955999999986},{"x":2.937256000000019,"y":2.9499560000000145},{"x":-2.9626559999999813,"y":2.9499560000000145}]} />
<silkscreenpath route={[{"x":-3.7591999999999928,"y":-4.063999999999993},{"x":-3.907941055997668,"y":-3.9133579702960617},{"x":-3.7579300000000018,"y":-3.763980575985258},{"x":-3.6079189440023356,"y":-3.9133579702960617},{"x":-3.7566599999999966,"y":-4.063999999999993}]} />
<silkscreenpath route={[{"x":-2.2123399999999975,"y":-1.998980000000003},{"x":-2.4015150142161303,"y":-1.86006255080585},{"x":-2.3284212288967012,"y":-1.6370321891015465},{"x":-2.0937187711032834,"y":-1.6370321891015465},{"x":-2.0206249857838543,"y":-1.86006255080585},{"x":-2.209799999999987,"y":-1.998980000000003}]} />
<silkscreentext text={props.name} pcbX="0mm" pcbY="5.965700000000012mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-5.228400000000008,"y":5.215700000000012},{"x":5.2283999999999935,"y":5.215700000000012},{"x":5.2283999999999935,"y":-5.215699999999998},{"x":-5.228400000000008,"y":-5.215699999999998},{"x":-5.228400000000008,"y":5.215700000000012}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C157929-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ it("should convert C157929 into typescript file", async () => {
<silkscreenpath route={[{"x":0.8958071999998083,"y":-0.2500122000000147},{"x":1.1041887999999744,"y":-0.2500122000000147}]} />
<silkscreenpath route={[{"x":-1.069797200000039,"y":-0.2500122000000147},{"x":-0.8958072000000357,"y":-0.2500122000000147}]} />
<silkscreenpath route={[{"x":3.950004799999874,"y":-6.250000200000045},{"x":-3.9499794000000747,"y":-6.250000200000045},{"x":-3.9499794000000747,"y":1.349984599999857},{"x":-2.999994000000015,"y":1.349984599999857},{"x":-2.999994000000015,"y":-0.2500122000000147},{"x":-2.930067800000188,"y":-0.2500122000000147}]} />
<silkscreentext text={props.name} pcbX="-0.007112000000120133mm" pcbY="2.361440000000016mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-4.257612000000108,"y":1.611440000000016},{"x":4.243387999999868,"y":1.611440000000016},{"x":4.243387999999868,"y":-6.533959999999979},{"x":-4.257612000000108,"y":-6.533959999999979},{"x":-4.257612000000108,"y":1.611440000000016}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C158012-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ it("should convert C158012 into typescript file", async () => {
<silkscreenpath route={[{"x":-3.6830127000001767,"y":-2.413000000000011},{"x":-2.6670127000001003,"y":-2.413000000000011}]} />
<silkscreenpath route={[{"x":-3.6830127000001767,"y":-1.0159999999999627},{"x":-3.6830127000001767,"y":3.4289999999999736}]} />
<silkscreenpath route={[{"x":-3.6830127000001767,"y":3.4289999999999736},{"x":3.6829872999999225,"y":3.4289999999999736},{"x":3.6829872999999225,"y":-1.0159999999999627}]} />
<silkscreentext text={props.name} pcbX="-0.000012700000070253736mm" pcbY="4.55600000000004mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-4.060012700000129,"y":3.80600000000004},{"x":4.059987299999875,"y":3.80600000000004},{"x":4.059987299999875,"y":-2.7899999999999636},{"x":-4.060012700000129,"y":-2.7899999999999636},{"x":-4.060012700000129,"y":3.80600000000004}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C160354-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ it("should convert C160354 into typescript file", async () => {
<silkscreenpath route={[{"x":-6.001029400000334,"y":-4.317834900000207},{"x":-6.001029400000334,"y":-3.7391467000001057}]} />
<silkscreenpath route={[{"x":6.000470599999744,"y":0.6819772999999714},{"x":6.000470599999744,"y":0.12312649999978476}]} />
<silkscreenpath route={[{"x":6.000470599999744,"y":-3.7391467000001057},{"x":6.000470599999744,"y":-4.317834900000207}]} />
<silkscreentext text={props.name} pcbX="-0.0010160000001633307mm" pcbY="4.496297299999924mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-6.49941600000011,"y":3.746297299999924},{"x":6.4973839999997836,"y":3.746297299999924},{"x":6.4973839999997836,"y":-4.576902700000119},{"x":-6.49941600000011,"y":-4.576902700000119},{"x":-6.49941600000011,"y":3.746297299999924}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C165948-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ it("should convert C165948 into typescript file", async () => {
<silkscreenpath route={[{"x":4.471009600000116,"y":-5.394140800000059},{"x":-4.4689776000000165,"y":-5.394140800000059},{"x":-4.4689776000000165,"y":-3.91283820000001}]} />
<silkscreenpath route={[{"x":4.471009600000116,"y":-1.676114200000029},{"x":4.471009600000116,"y":0.18750920000002225}]} />
<silkscreenpath route={[{"x":4.471009600000116,"y":-5.394140800000059},{"x":4.471009600000116,"y":-3.912482600000203}]} />
<silkscreentext text={props.name} pcbX="0.002793999999994412mm" pcbY="3.8286011999998664mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-5.174805999999876,"y":3.0786011999998664},{"x":5.180394000000092,"y":3.0786011999998664},{"x":5.180394000000092,"y":-5.650998800000025},{"x":-5.174805999999876,"y":-5.650998800000025},{"x":-5.174805999999876,"y":3.0786011999998664}]} />
</footprint>}
cadModel={{
Expand Down
1 change: 1 addition & 0 deletions tests/convert-to-ts/C19076967-to-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ it("should convert C19076967 into typescript file", async () => {
<silkscreenpath route={[{"x":-2.8999942000000374,"y":-4.099991799999998},{"x":2.89999419999981,"y":-4.099991799999998}]} />
<silkscreenpath route={[{"x":2.224227199999973,"y":12.100001199999951},{"x":-2.275789199999963,"y":12.100001199999951}]} />
<silkscreenpath route={[{"x":-2.275789199999963,"y":-12.099950400000012},{"x":2.224227199999973,"y":-12.099950400000012}]} />
<silkscreentext text={props.name} pcbX="-0.00038100000017493585mm" pcbY="17.027399999999943mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-16.277781000000118,"y":16.277399999999943},{"x":16.277018999999882,"y":16.277399999999943},{"x":16.277018999999882,"y":-16.277399999999943},{"x":-16.277781000000118,"y":-16.277399999999943},{"x":-16.277781000000118,"y":16.277399999999943}]} />
</footprint>}
cadModel={{
Expand Down
Loading
Loading