diff --git a/.gitignore b/.gitignore index b61620b..e728579 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ node_modules .aider* dist -*.raweasy.json +/*.raweasy.json *.bettereasy.json .vscode diff --git a/bun.lockb b/bun.lockb index 10a9936..8a1e678 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/lib/compute-center-offset.ts b/lib/compute-center-offset.ts new file mode 100644 index 0000000..6d93bd5 --- /dev/null +++ b/lib/compute-center-offset.ts @@ -0,0 +1,22 @@ +import type { z } from "zod" +import type { EasyEdaJson } from "./schemas/easy-eda-json-schema" +import type { PadSchema } from "./schemas/package-detail-shape-schema" + +export const computeCenterOffset = (easyeda: EasyEdaJson) => { + const pads = easyeda.packageDetail.dataStr.shape.filter( + (shape): shape is z.infer => shape.type === "PAD" + ) + + const minX = Math.min(...pads.map((pad) => pad.center.x)) + const maxX = Math.max(...pads.map((pad) => pad.center.x)) + const minY = Math.min(...pads.map((pad) => pad.center.y)) + const maxY = Math.max(...pads.map((pad) => pad.center.y)) + + const centerX = (minX + maxX) / 2 + const centerY = (minY + maxY) / 2 + + return { + x: centerX, + y: centerY, + } +} diff --git a/lib/convert-easyeda-json-to-tscircuit-soup-json.ts b/lib/convert-easyeda-json-to-tscircuit-soup-json.ts index 18877b2..2a9d26f 100644 --- a/lib/convert-easyeda-json-to-tscircuit-soup-json.ts +++ b/lib/convert-easyeda-json-to-tscircuit-soup-json.ts @@ -22,7 +22,8 @@ import { import * as Soup from "@tscircuit/soup" import { generateArcFromSweep, generateArcPathWithMid } from "./math/arc-utils" import { transformPCBElements } from "@tscircuit/builder" -import { scale } from "transformation-matrix" +import { scale, translate } from "transformation-matrix" +import { computeCenterOffset } from "./compute-center-offset" const handleSilkscreenPath = ( track: z.infer, @@ -61,13 +62,15 @@ const handleSilkscreenArc = (arc: z.infer, index: number) => { interface Options { useModelCdn?: boolean + shouldRecenter?: boolean } export const convertEasyEdaJsonToTscircuitSoupJson = ( easyEdaJson: EasyEdaJson, - { useModelCdn }: Options = {} + { useModelCdn, shouldRecenter = true }: Options = {} ): AnySoupElement[] => { const soupElements: AnySoupElement[] = [] + const centerOffset = computeCenterOffset(easyEdaJson) // Add source component const source_component = any_source_component.parse({ @@ -86,7 +89,7 @@ export const convertEasyEdaJsonToTscircuitSoupJson = ( width: 0, // TODO compute width height: 0, // TODO compute height rotation: 0, - center: { x: 0, y: 0 }, + center: { x: centerOffset.x, y: centerOffset.y }, layer: "top", } as Soup.PCBComponentInput) @@ -200,5 +203,12 @@ export const convertEasyEdaJsonToTscircuitSoupJson = ( ) } + if (shouldRecenter) { + transformPCBElements( + soupElements, + translate(-centerOffset.x, centerOffset.y) + ) + } + return soupElements } diff --git a/lib/generate-footprint-tsx.ts b/lib/generate-footprint-tsx.ts index 9c57cb6..43120cc 100644 --- a/lib/generate-footprint-tsx.ts +++ b/lib/generate-footprint-tsx.ts @@ -1,20 +1,16 @@ import { z } from "zod" import type { EasyEdaJson } from "./schemas/easy-eda-json-schema" import { PadSchema } from "./schemas/package-detail-shape-schema" +import { computeCenterOffset } from "./compute-center-offset" export const generateFootprintTsx = (easyEdaJson: EasyEdaJson): string => { const pads = easyEdaJson.packageDetail.dataStr.shape.filter( (shape): shape is z.infer => shape.type === "PAD" ) - // Calculate the center point of all pads - const minX = Math.min(...pads.map((pad) => pad.center.x)) - const maxX = Math.max(...pads.map((pad) => pad.center.x)) - const minY = Math.min(...pads.map((pad) => pad.center.y)) - const maxY = Math.max(...pads.map((pad) => pad.center.y)) - - const centerX = (minX + maxX) / 2 - const centerY = (minY + maxY) / 2 + const centerOffset = computeCenterOffset(easyEdaJson) + const centerX = centerOffset.x + const centerY = centerOffset.y const footprintElements = pads.map((pad) => { const { center, width, height, holeRadius, number } = pad diff --git a/lib/schemas/package-detail-shape-schema.ts b/lib/schemas/package-detail-shape-schema.ts index 31ae25e..637b11d 100644 --- a/lib/schemas/package-detail-shape-schema.ts +++ b/lib/schemas/package-detail-shape-schema.ts @@ -1,4 +1,7 @@ import { z } from "zod" +import { mm } from "@tscircuit/mm" + +const mil = z.number().transform((n) => mm(`${n}mil`)) export const PointSchema = z .any() diff --git a/package.json b/package.json index b77613b..ea04a8b 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "typescript": "^5.5.2" }, "dependencies": { + "@tscircuit/mm": "^0.0.7", "commander": "^12.1.0", "transformation-matrix": "^2.16.1", "zod": "^3.23.8" diff --git a/tests/assets/C88224.raweasy.json b/tests/assets/C88224.raweasy.json new file mode 100644 index 0000000..0fd59c0 --- /dev/null +++ b/tests/assets/C88224.raweasy.json @@ -0,0 +1,299 @@ +{ + "uuid": "4cc4f74692ef47d8a13458c7a20fd2ed", + "title": "TB6612FNG(O,C,8,EL", + "description": "", + "docType": 2, + "type": 3, + "szlcsc": { + "id": 89402, + "number": "C88224", + "step": 1, + "min": 1, + "price": 7.72, + "stock": 1594, + "url": "http://www.szlcsc.com/product/details_89402.html", + "image": "https://assets.lcsc.com/images/szlcsc/96x96/Motor-Drivers_TOSHIBA_TB6612FNG-OC8EL_TB6612FNG-OC8EL_C88224_front_10.jpg" + }, + "owner": { + "uuid": "0819f05c4eef4c71ace90d822a990e87", + "username": "LCSC", + "nickname": "LCSC", + "avatar": "//image.lceda.cn/avatars/2018/6/kFlrasi7W06gTdBLAqW3fkrqbDhbowynuSzkjqso.png" + }, + "tags": [ + "Motor Driver ICs" + ], + "updateTime": 1718788233, + "updated_at": "2024-07-06 13:00:05", + "dataStr": { + "head": { + "docType": "2", + "editorVersion": "6.3.39", + "c_para": { + "pre": "U?", + "name": "TB6612FNG(O,C,8,EL", + "package": "SSOP-24_L8.4-W5.8-P0.65-LS7.8-BL", + "Supplier": "LCSC", + "Manufacturer": "TOSHIBA(东芝)", + "Manufacturer Part": "TB6612FNG(O,C,8,EL", + "Supplier Part": "C88224", + "JLCPCB Part Class": "Extended Part" + }, + "x": 400, + "y": 300, + "importFlag": 0, + "c_spiceCmd": null, + "puuid": "6fd45682c3374240a0303e7cad199b27", + "uuid": "4cc4f74692ef47d8a13458c7a20fd2ed", + "utime": 1587650004, + "hasIdFlag": true + }, + "canvas": "CA~1000~1000~#FFFFFF~yes~#CCCCCC~5~1000~1000~line~5~pixel~5~400~300", + "shape": [ + "R~365~235~2~2~70~130~#880000~1~0~none~gge1~0~", + "E~370~240~1.5~1.5~#880000~1~0~#880000~gge2~0", + "P~show~0~1~355~245~180~gge41~0^^355~245^^M355,245h10~#880000^^1~368.7~249~0~AO1~start~~~#0000FF^^1~364.5~244~0~1~end~~~#0000FF^^0~362~245^^0~M 365 248 L 368 245 L 365 242", + "P~show~0~2~355~255~180~gge42~0^^355~255^^M355,255h10~#880000^^1~368.7~259~0~AO1~start~~~#0000FF^^1~364.5~254~0~2~end~~~#0000FF^^0~362~255^^0~M 365 258 L 368 255 L 365 252", + "P~show~0~3~355~265~180~gge43~0^^355~265^^M355,265h10~#000000^^1~368.7~269~0~PGND1~start~~~#000000^^1~364.5~264~0~3~end~~~#000000^^0~362~265^^0~M 365 268 L 368 265 L 365 262", + "P~show~0~4~355~275~180~gge44~0^^355~275^^M355,275h10~#000000^^1~368.7~279~0~PGND1~start~~~#000000^^1~364.5~274~0~4~end~~~#000000^^0~362~275^^0~M 365 278 L 368 275 L 365 272", + "P~show~0~5~355~285~180~gge45~0^^355~285^^M355,285h10~#880000^^1~368.7~289~0~AO2~start~~~#0000FF^^1~364.5~284~0~5~end~~~#0000FF^^0~362~285^^0~M 365 288 L 368 285 L 365 282", + "P~show~0~6~355~295~180~gge46~0^^355~295^^M355,295h10~#880000^^1~368.7~299~0~AO2~start~~~#0000FF^^1~364.5~294~0~6~end~~~#0000FF^^0~362~295^^0~M 365 298 L 368 295 L 365 292", + "P~show~0~7~355~305~180~gge47~0^^355~305^^M355,305h10~#880000^^1~368.7~309~0~BO2~start~~~#0000FF^^1~364.5~304~0~7~end~~~#0000FF^^0~362~305^^0~M 365 308 L 368 305 L 365 302", + "P~show~0~8~355~315~180~gge48~0^^355~315^^M355,315h10~#880000^^1~368.7~319~0~BO2~start~~~#0000FF^^1~364.5~314~0~8~end~~~#0000FF^^0~362~315^^0~M 365 318 L 368 315 L 365 312", + "P~show~0~9~355~325~180~gge49~0^^355~325^^M355,325h10~#000000^^1~368.7~329~0~PGND2~start~~~#000000^^1~364.5~324~0~9~end~~~#000000^^0~362~325^^0~M 365 328 L 368 325 L 365 322", + "P~show~0~10~355~335~180~gge410~0^^355~335^^M355,335h10~#000000^^1~368.7~339~0~PGND2~start~~~#000000^^1~364.5~334~0~10~end~~~#000000^^0~362~335^^0~M 365 338 L 368 335 L 365 332", + "P~show~0~11~355~345~180~gge411~0^^355~345^^M355,345h10~#880000^^1~368.7~349~0~BO1~start~~~#0000FF^^1~364.5~344~0~11~end~~~#0000FF^^0~362~345^^0~M 365 348 L 368 345 L 365 342", + "P~show~0~12~355~355~180~gge412~0^^355~355^^M355,355h10~#880000^^1~368.7~359~0~BO1~start~~~#0000FF^^1~364.5~354~0~12~end~~~#0000FF^^0~362~355^^0~M 365 358 L 368 355 L 365 352", + "P~show~0~13~445~355~0~gge413~0^^445~355^^M445,355h-10~#880000^^1~431.3~359~0~VM2~end~~~#0000FF^^1~435.5~354~0~13~start~~~#0000FF^^0~438~355^^0~M 435 352 L 432 355 L 435 358", + "P~show~0~14~445~345~0~gge414~0^^445~345^^M445,345h-10~#880000^^1~431.3~349~0~VM3~end~~~#0000FF^^1~435.5~344~0~14~start~~~#0000FF^^0~438~345^^0~M 435 342 L 432 345 L 435 348", + "P~show~0~15~445~335~0~gge415~0^^445~335^^M445,335h-10~#880000^^1~431.3~339~0~PWMB~end~~~#0000FF^^1~435.5~334~0~15~start~~~#0000FF^^0~438~335^^0~M 435 332 L 432 335 L 435 338", + "P~show~0~16~445~325~0~gge416~0^^445~325^^M445,325h-10~#880000^^1~431.3~329~0~BIN2~end~~~#0000FF^^1~435.5~324~0~16~start~~~#0000FF^^0~438~325^^0~M 435 322 L 432 325 L 435 328", + "P~show~0~17~445~315~0~gge417~0^^445~315^^M445,315h-10~#880000^^1~431.3~319~0~BIN1~end~~~#0000FF^^1~435.5~314~0~17~start~~~#0000FF^^0~438~315^^0~M 435 312 L 432 315 L 435 318", + "P~show~0~18~445~305~0~gge418~0^^445~305^^M445,305h-10~#000000^^1~431.3~309~0~GND~end~~~#000000^^1~435.5~304~0~18~start~~~#000000^^0~438~305^^0~M 435 302 L 432 305 L 435 308", + "P~show~0~19~445~295~0~gge419~0^^445~295^^M445,295h-10~#880000^^1~431.3~299~0~STBY~end~~~#0000FF^^1~435.5~294~0~19~start~~~#0000FF^^0~438~295^^0~M 435 292 L 432 295 L 435 298", + "P~show~0~20~445~285~0~gge420~0^^445~285^^M445,285h-10~#FF0000^^1~431.3~289~0~VCC~end~~~#FF0000^^1~435.5~284~0~20~start~~~#FF0000^^0~438~285^^0~M 435 282 L 432 285 L 435 288", + "P~show~0~21~445~275~0~gge421~0^^445~275^^M445,275h-10~#880000^^1~431.3~279~0~AIN1~end~~~#0000FF^^1~435.5~274~0~21~start~~~#0000FF^^0~438~275^^0~M 435 272 L 432 275 L 435 278", + "P~show~0~22~445~265~0~gge422~0^^445~265^^M445,265h-10~#880000^^1~431.3~269~0~AIN2~end~~~#0000FF^^1~435.5~264~0~22~start~~~#0000FF^^0~438~265^^0~M 435 262 L 432 265 L 435 268", + "P~show~0~23~445~255~0~gge423~0^^445~255^^M445,255h-10~#880000^^1~431.3~259~0~PWMA~end~~~#0000FF^^1~435.5~254~0~23~start~~~#0000FF^^0~438~255^^0~M 435 252 L 432 255 L 435 258", + "P~show~0~24~445~245~0~gge424~0^^445~245^^M445,245h-10~#880000^^1~431.3~249~0~VM1~end~~~#0000FF^^1~435.5~244~0~24~start~~~#0000FF^^0~438~245^^0~M 435 242 L 432 245 L 435 248" + ], + "BBox": { + "x": 352.6, + "y": 234.5, + "width": 94.7, + "height": 130.5 + }, + "colors": [] + }, + "lcsc": { + "id": 89402, + "number": "C88224", + "step": 1, + "min": 1, + "price": 1.1601, + "stock": 1349, + "url": "https://lcsc.com/product-detail/Motor-Drivers_TOSHIBA_TB6612FNG-O-C-8-EL_TB6612FNG-O-C-8-EL_C88224.html" + }, + "verify": true, + "SMT": true, + "datastrid": "07cd7cbc64e74f1e8dbb330655e1e446", + "jlcOnSale": 1, + "writable": false, + "isFavorite": false, + "packageDetail": { + "uuid": "6fd45682c3374240a0303e7cad199b27", + "title": "SSOP-24_L8.4-W5.8-P0.65-LS7.8-BL", + "docType": 4, + "updateTime": 1652416907, + "owner": { + "uuid": "0819f05c4eef4c71ace90d822a990e87", + "username": "lcsc", + "nickname": "LCSC", + "avatar": "//image.lceda.cn/avatars/2018/6/kFlrasi7W06gTdBLAqW3fkrqbDhbowynuSzkjqso.png" + }, + "datastrid": "5f291745698c4000a8b2d3751ff58f74", + "writable": false, + "dataStr": { + "head": { + "docType": "4", + "editorVersion": "6.4.14", + "c_para": { + "pre": "U?", + "package": "SSOP-24_L8.4-W5.8-P0.65-LS7.8-BL", + "link": "https://item.szlcsc.com/299180.html", + "Contributor": "lcsc", + "3DModel": "SSOP-24_L8.4-W5.3-H2.0-LS7.8-P0.65" + }, + "x": 4000, + "y": 3000, + "uuid": "6fd45682c3374240a0303e7cad199b27", + "utime": 1611833897, + "importFlag": 0, + "transformList": "", + "hasIdFlag": true + }, + "canvas": "CA~1000~1000~#000000~yes~#FFFFFF~10~1000~1000~line~0.5~mm~1~45~visible~0.5~4000~3000~0~none", + "shape": [ + "TRACK~0.6~3~~3983.5583 3008.7457 3983.5583 2991.2543 4016.4417 2991.2543 4016.4417 3008.7457 3983.5583 3008.7457~gge1072~0", + "PAD~OVAL~3985.925~3013.744~1.4331~8.1969~1~~1~0~3985.925 3010.3621 3985.925 3017.1259~0~gge1002~0.0000~~Y~0~0.0000~0.2000~3985.9252,3013.7441", + "PAD~OVAL~3988.484~3013.744~1.4331~8.1969~1~~2~0~3988.484 3010.3621 3988.484 3017.1259~0~gge1005~0.0000~~Y~0~0.0000~0.2000~3988.4843,3013.7441", + "PAD~OVAL~3991.043~3013.744~1.4331~8.1969~1~~3~0~3991.043 3010.3621 3991.043 3017.1259~0~gge1008~0.0000~~Y~0~0.0000~0.2000~3991.0433,3013.7441", + "PAD~OVAL~3993.602~3013.744~1.4331~8.1969~1~~4~0~3993.602 3010.3621 3993.602 3017.1259~0~gge1011~0.0000~~Y~0~0.0000~0.2000~3993.6024,3013.7441", + "PAD~OVAL~3996.161~3013.744~1.4331~8.1969~1~~5~0~3996.161 3010.3621 3996.161 3017.1259~0~gge1014~0.0000~~Y~0~0.0000~0.2000~3996.1614,3013.7441", + "PAD~OVAL~3998.721~3013.744~1.4331~8.1969~1~~6~0~3998.721 3010.3621 3998.721 3017.1259~0~gge1017~0.0000~~Y~0~0.0000~0.2000~3998.7205,3013.7441", + "PAD~OVAL~4001.28~3013.744~1.4331~8.1969~1~~7~0~4001.28 3010.3621 4001.28 3017.1259~0~gge1020~0.0000~~Y~0~0.0000~0.2000~4001.2795,3013.7441", + "PAD~OVAL~4003.839~3013.744~1.4331~8.1969~1~~8~0~4003.839 3010.3621 4003.839 3017.1259~0~gge1023~0.0000~~Y~0~0.0000~0.2000~4003.8386,3013.7441", + "PAD~OVAL~4006.398~3013.744~1.4331~8.1969~1~~9~0~4006.398 3010.3621 4006.398 3017.1259~0~gge1026~0.0000~~Y~0~0.0000~0.2000~4006.3976,3013.7441", + "PAD~OVAL~4008.957~3013.744~1.4331~8.1969~1~~10~0~4008.957 3010.3621 4008.957 3017.1259~0~gge1029~0.0000~~Y~0~0.0000~0.2000~4008.9567,3013.7441", + "PAD~OVAL~4011.516~3013.744~1.4331~8.1969~1~~11~0~4011.516 3010.3621 4011.516 3017.1259~0~gge1032~0.0000~~Y~0~0.0000~0.2000~4011.5157,3013.7441", + "PAD~OVAL~4014.075~3013.744~1.4331~8.1969~1~~12~0~4014.075 3010.3621 4014.075 3017.1259~0~gge1035~0.0000~~Y~0~0.0000~0.2000~4014.0748,3013.7441", + "PAD~OVAL~3985.925~2986.256~1.4331~8.1969~1~~24~0~3985.925 2982.8741 3985.925 2989.6379~0~gge1038~0.0000~~Y~0~0.0000~0.2000~3985.9252,2986.2559", + "PAD~OVAL~3988.484~2986.256~1.4331~8.1969~1~~23~0~3988.484 2982.8741 3988.484 2989.6379~0~gge1041~0.0000~~Y~0~0.0000~0.2000~3988.4843,2986.2559", + "PAD~OVAL~3991.043~2986.256~1.4331~8.1969~1~~22~0~3991.043 2982.8741 3991.043 2989.6379~0~gge1044~0.0000~~Y~0~0.0000~0.2000~3991.0433,2986.2559", + "PAD~OVAL~3993.602~2986.256~1.4331~8.1969~1~~21~0~3993.602 2982.8741 3993.602 2989.6379~0~gge1047~0.0000~~Y~0~0.0000~0.2000~3993.6024,2986.2559", + "PAD~OVAL~3996.161~2986.256~1.4331~8.1969~1~~20~0~3996.161 2982.8741 3996.161 2989.6379~0~gge1050~0.0000~~Y~0~0.0000~0.2000~3996.1614,2986.2559", + "PAD~OVAL~3998.721~2986.256~1.4331~8.1969~1~~19~0~3998.721 2982.8741 3998.721 2989.6379~0~gge1053~0.0000~~Y~0~0.0000~0.2000~3998.7205,2986.2559", + "PAD~OVAL~4001.28~2986.256~1.4331~8.1969~1~~18~0~4001.28 2982.8741 4001.28 2989.6379~0~gge1056~0.0000~~Y~0~0.0000~0.2000~4001.2795,2986.2559", + "PAD~OVAL~4003.839~2986.256~1.4331~8.1969~1~~17~0~4003.839 2982.8741 4003.839 2989.6379~0~gge1059~0.0000~~Y~0~0.0000~0.2000~4003.8386,2986.2559", + "PAD~OVAL~4006.398~2986.256~1.4331~8.1969~1~~16~0~4006.398 2982.8741 4006.398 2989.6379~0~gge1062~0.0000~~Y~0~0.0000~0.2000~4006.3976,2986.2559", + "PAD~OVAL~4008.957~2986.256~1.4331~8.1969~1~~15~0~4008.957 2982.8741 4008.957 2989.6379~0~gge1065~0.0000~~Y~0~0.0000~0.2000~4008.9567,2986.2559", + "PAD~OVAL~4011.516~2986.256~1.4331~8.1969~1~~14~0~4011.516 2982.8741 4011.516 2989.6379~0~gge1068~0.0000~~Y~0~0.0000~0.2000~4011.5157,2986.2559", + "PAD~OVAL~4014.075~2986.256~1.4331~8.1969~1~~13~0~4014.075 2982.8741 4014.075 2989.6379~0~gge1071~0.0000~~Y~0~0.0000~0.2000~4014.0748,2986.2559", + "CIRCLE~3985.925~3005.784~0.591~1.1811~3~gge1073~~~", + "CIRCLE~3983.428~3013.744~0.591~1.1811~3~gge1074~~~", + "CIRCLE~3985.925~3016.929~0.591~1.1811~12~gge1075~~~", + "CIRCLE~3983.858~3015.354~0.118~0.2362~101~gge1076~~~", + "SOLIDREGION~99~~M 3983.8583 3010.4331 L 3983.8583 2989.5669 L 4016.1417 2989.5669 L 4016.1417 3010.4331 Z ~solid~gge999~~~~0", + "SOLIDREGION~100~~M 3985.3346 3015.3543 L 3985.3346 3012.4016 L 3986.5157 3012.4016 L 3986.5157 3015.3543 Z ~solid~gge1000~~~~0", + "SOLIDREGION~100~~M 3985.3346 3012.4409 L 3985.3346 3010.3937 L 3986.5157 3010.3937 L 3986.5157 3012.4409 Z ~cutout~gge1001~~~~0", + "SOLIDREGION~100~~M 3987.8937 3015.3543 L 3987.8937 3012.4016 L 3989.0748 3012.4016 L 3989.0748 3015.3543 Z ~solid~gge1003~~~~0", + "SOLIDREGION~100~~M 3987.8937 3012.4409 L 3987.8937 3010.3937 L 3989.0748 3010.3937 L 3989.0748 3012.4409 Z ~cutout~gge1004~~~~0", + "SOLIDREGION~100~~M 3990.4528 3015.3543 L 3990.4528 3012.4016 L 3991.6339 3012.4016 L 3991.6339 3015.3543 Z ~solid~gge1006~~~~0", + "SOLIDREGION~100~~M 3990.4528 3012.4409 L 3990.4528 3010.3937 L 3991.6339 3010.3937 L 3991.6339 3012.4409 Z ~cutout~gge1007~~~~0", + "SOLIDREGION~100~~M 3993.0118 3015.3543 L 3993.0118 3012.4016 L 3994.1929 3012.4016 L 3994.1929 3015.3543 Z ~solid~gge1009~~~~0", + "SOLIDREGION~100~~M 3993.0118 3012.4409 L 3993.0118 3010.3937 L 3994.1929 3010.3937 L 3994.1929 3012.4409 Z ~cutout~gge1010~~~~0", + "SOLIDREGION~100~~M 3995.5709 3015.3543 L 3995.5709 3012.4016 L 3996.7520 3012.4016 L 3996.7520 3015.3543 Z ~solid~gge1012~~~~0", + "SOLIDREGION~100~~M 3995.5709 3012.4409 L 3995.5709 3010.3937 L 3996.7520 3010.3937 L 3996.7520 3012.4409 Z ~cutout~gge1013~~~~0", + "SOLIDREGION~100~~M 3998.1299 3015.3543 L 3998.1299 3012.4016 L 3999.3110 3012.4016 L 3999.3110 3015.3543 Z ~solid~gge1015~~~~0", + "SOLIDREGION~100~~M 3998.1299 3012.4409 L 3998.1299 3010.3937 L 3999.3110 3010.3937 L 3999.3110 3012.4409 Z ~cutout~gge1016~~~~0", + "SOLIDREGION~100~~M 4000.6890 3015.3543 L 4000.6890 3012.4016 L 4001.8701 3012.4016 L 4001.8701 3015.3543 Z ~solid~gge1018~~~~0", + "SOLIDREGION~100~~M 4000.6890 3012.4409 L 4000.6890 3010.3937 L 4001.8701 3010.3937 L 4001.8701 3012.4409 Z ~cutout~gge1019~~~~0", + "SOLIDREGION~100~~M 4003.2480 3015.3543 L 4003.2480 3012.4016 L 4004.4291 3012.4016 L 4004.4291 3015.3543 Z ~solid~gge1021~~~~0", + "SOLIDREGION~100~~M 4003.2480 3012.4409 L 4003.2480 3010.3937 L 4004.4291 3010.3937 L 4004.4291 3012.4409 Z ~cutout~gge1022~~~~0", + "SOLIDREGION~100~~M 4005.8071 3015.3543 L 4005.8071 3012.4016 L 4006.9882 3012.4016 L 4006.9882 3015.3543 Z ~solid~gge1024~~~~0", + "SOLIDREGION~100~~M 4005.8071 3012.4409 L 4005.8071 3010.3937 L 4006.9882 3010.3937 L 4006.9882 3012.4409 Z ~cutout~gge1025~~~~0", + "SOLIDREGION~100~~M 4008.3661 3015.3543 L 4008.3661 3012.4016 L 4009.5472 3012.4016 L 4009.5472 3015.3543 Z ~solid~gge1027~~~~0", + "SOLIDREGION~100~~M 4008.3661 3012.4409 L 4008.3661 3010.3937 L 4009.5472 3010.3937 L 4009.5472 3012.4409 Z ~cutout~gge1028~~~~0", + "SOLIDREGION~100~~M 4010.9252 3015.3543 L 4010.9252 3012.4016 L 4012.1063 3012.4016 L 4012.1063 3015.3543 Z ~solid~gge1030~~~~0", + "SOLIDREGION~100~~M 4010.9252 3012.4409 L 4010.9252 3010.3937 L 4012.1063 3010.3937 L 4012.1063 3012.4409 Z ~cutout~gge1031~~~~0", + "SOLIDREGION~100~~M 4013.4843 3015.3543 L 4013.4843 3012.4016 L 4014.6654 3012.4016 L 4014.6654 3015.3543 Z ~solid~gge1033~~~~0", + "SOLIDREGION~100~~M 4013.4843 3012.4409 L 4013.4843 3010.3937 L 4014.6654 3010.3937 L 4014.6654 3012.4409 Z ~cutout~gge1034~~~~0", + "SOLIDREGION~100~~M 3985.3346 2984.6457 L 3985.3346 2987.5984 L 3986.5157 2987.5984 L 3986.5157 2984.6457 Z ~solid~gge1036~~~~0", + "SOLIDREGION~100~~M 3985.3346 2987.5591 L 3985.3346 2989.6063 L 3986.5157 2989.6063 L 3986.5157 2987.5591 Z ~cutout~gge1037~~~~0", + "SOLIDREGION~100~~M 3987.8937 2984.6457 L 3987.8937 2987.5984 L 3989.0748 2987.5984 L 3989.0748 2984.6457 Z ~solid~gge1039~~~~0", + "SOLIDREGION~100~~M 3987.8937 2987.5591 L 3987.8937 2989.6063 L 3989.0748 2989.6063 L 3989.0748 2987.5591 Z ~cutout~gge1040~~~~0", + "SOLIDREGION~100~~M 3990.4528 2984.6457 L 3990.4528 2987.5984 L 3991.6339 2987.5984 L 3991.6339 2984.6457 Z ~solid~gge1042~~~~0", + "SOLIDREGION~100~~M 3990.4528 2987.5591 L 3990.4528 2989.6063 L 3991.6339 2989.6063 L 3991.6339 2987.5591 Z ~cutout~gge1043~~~~0", + "SOLIDREGION~100~~M 3993.0118 2984.6457 L 3993.0118 2987.5984 L 3994.1929 2987.5984 L 3994.1929 2984.6457 Z ~solid~gge1045~~~~0", + "SOLIDREGION~100~~M 3993.0118 2987.5591 L 3993.0118 2989.6063 L 3994.1929 2989.6063 L 3994.1929 2987.5591 Z ~cutout~gge1046~~~~0", + "SOLIDREGION~100~~M 3995.5709 2984.6457 L 3995.5709 2987.5984 L 3996.7520 2987.5984 L 3996.7520 2984.6457 Z ~solid~gge1048~~~~0", + "SOLIDREGION~100~~M 3995.5709 2987.5591 L 3995.5709 2989.6063 L 3996.7520 2989.6063 L 3996.7520 2987.5591 Z ~cutout~gge1049~~~~0", + "SOLIDREGION~100~~M 3998.1299 2984.6457 L 3998.1299 2987.5984 L 3999.3110 2987.5984 L 3999.3110 2984.6457 Z ~solid~gge1051~~~~0", + "SOLIDREGION~100~~M 3998.1299 2987.5591 L 3998.1299 2989.6063 L 3999.3110 2989.6063 L 3999.3110 2987.5591 Z ~cutout~gge1052~~~~0", + "SOLIDREGION~100~~M 4000.6890 2984.6457 L 4000.6890 2987.5984 L 4001.8701 2987.5984 L 4001.8701 2984.6457 Z ~solid~gge1054~~~~0", + "SOLIDREGION~100~~M 4000.6890 2987.5591 L 4000.6890 2989.6063 L 4001.8701 2989.6063 L 4001.8701 2987.5591 Z ~cutout~gge1055~~~~0", + "SOLIDREGION~100~~M 4003.2480 2984.6457 L 4003.2480 2987.5984 L 4004.4291 2987.5984 L 4004.4291 2984.6457 Z ~solid~gge1057~~~~0", + "SOLIDREGION~100~~M 4003.2480 2987.5591 L 4003.2480 2989.6063 L 4004.4291 2989.6063 L 4004.4291 2987.5591 Z ~cutout~gge1058~~~~0", + "SOLIDREGION~100~~M 4005.8071 2984.6457 L 4005.8071 2987.5984 L 4006.9882 2987.5984 L 4006.9882 2984.6457 Z ~solid~gge1060~~~~0", + "SOLIDREGION~100~~M 4005.8071 2987.5591 L 4005.8071 2989.6063 L 4006.9882 2989.6063 L 4006.9882 2987.5591 Z ~cutout~gge1061~~~~0", + "SOLIDREGION~100~~M 4008.3661 2984.6457 L 4008.3661 2987.5984 L 4009.5472 2987.5984 L 4009.5472 2984.6457 Z ~solid~gge1063~~~~0", + "SOLIDREGION~100~~M 4008.3661 2987.5591 L 4008.3661 2989.6063 L 4009.5472 2989.6063 L 4009.5472 2987.5591 Z ~cutout~gge1064~~~~0", + "SOLIDREGION~100~~M 4010.9252 2984.6457 L 4010.9252 2987.5984 L 4012.1063 2987.5984 L 4012.1063 2984.6457 Z ~solid~gge1066~~~~0", + "SOLIDREGION~100~~M 4010.9252 2987.5591 L 4010.9252 2989.6063 L 4012.1063 2989.6063 L 4012.1063 2987.5591 Z ~cutout~gge1067~~~~0", + "SOLIDREGION~100~~M 4013.4843 2984.6457 L 4013.4843 2987.5984 L 4014.6654 2987.5984 L 4014.6654 2984.6457 Z ~solid~gge1069~~~~0", + "SOLIDREGION~100~~M 4013.4843 2987.5591 L 4013.4843 2989.6063 L 4014.6654 2989.6063 L 4014.6654 2987.5591 Z ~cutout~gge1070~~~~0", + "SVGNODE~{\"gId\":\"g1_outline\",\"nodeName\":\"g\",\"nodeType\":1,\"layerid\":\"19\",\"attrs\":{\"c_width\":\"30.312939374\",\"c_height\":\"33.0708\",\"c_rotation\":\"0,0,90\",\"z\":\"0\",\"c_origin\":\"506.97,-438.45\",\"uuid\":\"47443b588a77418ba6b4ea51975c36c0\",\"c_etype\":\"outline3D\",\"id\":\"g1_outline\",\"title\":\"SSOP-24_L8.4-W5.3-H2.0-LS7.8-P0.65\",\"layerid\":\"19\",\"transform\":\"scale(1) translate(0, 0)\"},\"childNodes\":[{\"gId\":\"g1_outline_line0\",\"nodeName\":\"polyline\",\"nodeType\":1,\"attrs\":{\"fill\":\"none\",\"id\":\"g1_outline_line0\",\"c_shapetype\":\"line\",\"points\":\"3985.3149 3015.1575 3986.496 3015.1575 3986.496 3014.252 3986.496 3014.0945 3986.496 3013.937 3986.496 3013.7795 3986.496 3013.6614 3986.496 3013.5827 3986.496 3013.3071 3986.496 3013.0709 3986.496 3012.874 3986.496 3011.811 3986.496 3011.6142 3986.496 3011.378 3986.496 3011.063 3986.496 3011.0236 3986.496 3010.9055 3986.496 3010.748 3986.496 3010.5906 3986.496 3010.4331 3987.874 3010.4331 3987.874 3010.5906 3987.874 3010.748 3987.874 3010.9055 3987.874 3011.063 3987.874 3011.1024 3987.874 3011.378 3987.874 3011.6142 3987.874 3011.811 3987.874 3012.874 3987.874 3013.0709 3987.874 3013.3071 3987.874 3013.622 3987.874 3013.6614 3987.874 3013.7795 3987.874 3013.937 3987.874 3014.0945 3987.874 3014.252 3987.874 3015.1575 3989.0551 3015.1575 3989.0551 3014.252 3989.0551 3014.0945 3989.0551 3013.937 3989.0551 3013.7795 3989.0551 3013.6614 3989.0551 3013.5827 3989.0551 3013.3071 3989.0551 3013.0709 3989.0551 3012.874 3989.0551 3011.811 3989.0551 3011.6142 3989.0551 3011.378 3989.0551 3011.063 3989.0551 3011.0236 3989.0551 3010.9055 3989.0551 3010.748 3989.0551 3010.5906 3989.0551 3010.4331 3990.4724 3010.4331 3990.4724 3010.5906 3990.4724 3010.748 3990.4724 3010.9055 3990.4724 3011.063 3990.4724 3011.1024 3990.4724 3011.378 3990.4724 3011.6142 3990.4724 3011.811 3990.4724 3012.874 3990.4724 3013.0709 3990.4724 3013.3071 3990.4724 3013.622 3990.4724 3013.6614 3990.4724 3013.7795 3990.4724 3013.937 3990.4724 3014.0945 3990.4724 3014.252 3990.4724 3015.1575 3991.6141 3015.1575 3991.6141 3014.252 3991.6141 3014.0945 3991.6141 3013.937 3991.6141 3013.7795 3991.6141 3013.6614 3991.6141 3013.5827 3991.6141 3013.3071 3991.6141 3013.0709 3991.6141 3012.874 3991.6141 3011.811 3991.6141 3011.6142 3991.6141 3011.378 3991.6141 3011.063 3991.6141 3011.0236 3991.6141 3010.9055 3991.6141 3010.748 3991.6141 3010.5906 3991.6141 3010.4331 3992.9921 3010.4331 3992.9921 3010.5906 3992.9921 3010.748 3992.9921 3010.9055 3992.9921 3011.063 3992.9921 3011.1024 3992.9921 3011.378 3992.9921 3011.6142 3992.9921 3011.811 3992.9921 3012.874 3992.9921 3013.0709 3992.9921 3013.3071 3992.9921 3013.622 3992.9921 3013.6614 3992.9921 3013.7795 3992.9921 3013.937 3992.9921 3014.0945 3992.9921 3014.252 3992.9921 3015.1575 3994.1732 3015.1575 3994.1732 3014.252 3994.1732 3014.0945 3994.1732 3013.937 3994.1732 3013.7795 3994.1732 3013.6614 3994.1732 3013.5827 3994.1732 3013.3071 3994.1732 3013.0709 3994.1732 3012.874 3994.1732 3011.811 3994.1732 3011.6142 3994.1732 3011.378 3994.1732 3011.063 3994.1732 3011.0236 3994.1732 3010.9055 3994.1732 3010.748 3994.1732 3010.5906 3994.1732 3010.4331 3995.5511 3010.4331 3995.5511 3010.5906 3995.5511 3010.748 3995.5511 3010.9055 3995.5511 3011.063 3995.5511 3011.1024 3995.5511 3011.378 3995.5511 3011.6142 3995.5511 3011.811 3995.5511 3012.874 3995.5511 3013.0709 3995.5511 3013.3071 3995.5511 3013.622 3995.5511 3013.6614 3995.5511 3013.7795 3995.5511 3013.937 3995.5511 3014.0945 3995.5511 3014.252 3995.5511 3015.1575 3996.7322 3015.1575 3996.7322 3014.252 3996.7322 3014.0945 3996.7322 3013.937 3996.7322 3013.7795 3996.7322 3013.6614 3996.7322 3013.5827 3996.7322 3013.3071 3996.7322 3013.0709 3996.7322 3012.874 3996.7322 3011.811 3996.7322 3011.6142 3996.7322 3011.378 3996.7322 3011.063 3996.7322 3011.0236 3996.7322 3010.9055 3996.7322 3010.748 3996.7322 3010.5906 3996.7322 3010.4331 3998.1102 3010.4331 3998.1102 3010.5906 3998.1102 3010.748 3998.1102 3010.9055 3998.1102 3011.063 3998.1102 3011.1024 3998.1102 3011.378 3998.1102 3011.6142 3998.1102 3011.811 3998.1102 3012.874 3998.1102 3013.0709 3998.1102 3013.3071 3998.1102 3013.622 3998.1102 3013.6614 3998.1102 3013.7795 3998.1102 3013.937 3998.1102 3014.0945 3998.1102 3014.252 3998.1102 3015.1575 3999.2913 3015.1575 3999.2913 3014.252 3999.2913 3014.0945 3999.2913 3013.937 3999.2913 3013.7795 3999.2913 3013.6614 3999.2913 3013.5827 3999.2913 3013.3071 3999.2913 3013.0709 3999.2913 3012.874 3999.2913 3011.811 3999.2913 3011.6142 3999.2913 3011.378 3999.2913 3011.063 3999.2913 3011.0236 3999.2913 3010.9055 3999.2913 3010.748 3999.2913 3010.5906 3999.2913 3010.4331 4000.6692 3010.4331 4000.6692 3010.5906 4000.6692 3010.748 4000.6692 3010.9055 4000.6692 3011.063 4000.6692 3011.1024 4000.6692 3011.378 4000.6692 3011.6142 4000.6692 3011.811 4000.6692 3012.874 4000.6692 3013.0709 4000.6692 3013.3071 4000.6692 3013.622 4000.6692 3013.6614 4000.6692 3013.7795 4000.6692 3013.937 4000.6692 3014.0945 4000.6692 3014.252 4000.6692 3015.1575 4001.8503 3015.1575 4001.8503 3014.252 4001.8503 3014.0945 4001.8503 3013.937 4001.8503 3013.7795 4001.8503 3013.6614 4001.8503 3013.5827 4001.8503 3013.3071 4001.8503 3013.0709 4001.8503 3012.874 4001.8503 3011.811 4001.8503 3011.6142 4001.8503 3011.378 4001.8503 3011.063 4001.8503 3011.0236 4001.8503 3010.9055 4001.8503 3010.748 4001.8503 3010.5906 4001.8503 3010.4331 4003.2283 3010.4331 4003.2283 3010.5906 4003.2283 3010.748 4003.2283 3010.9055 4003.2283 3011.063 4003.2283 3011.1024 4003.2283 3011.378 4003.2283 3011.6142 4003.2283 3011.811 4003.2283 3012.874 4003.2283 3013.0709 4003.2283 3013.3071 4003.2283 3013.622 4003.2283 3013.6614 4003.2283 3013.7795 4003.2283 3013.937 4003.2283 3014.0945 4003.2283 3014.252 4003.2283 3015.1575 4004.4094 3015.1575 4004.4094 3014.252 4004.4094 3014.0945 4004.4094 3013.937 4004.4094 3013.7795 4004.4094 3013.6614 4004.4094 3013.5827 4004.4094 3013.3071 4004.4094 3013.0709 4004.4094 3012.874 4004.4094 3011.811 4004.4094 3011.6142 4004.4094 3011.378 4004.4094 3011.063 4004.4094 3011.0236 4004.4094 3010.9055 4004.4094 3010.748 4004.4094 3010.5906 4004.4094 3010.4331 4005.7873 3010.4331 4005.7873 3010.5906 4005.7873 3010.748 4005.7873 3010.9055 4005.7873 3011.063 4005.7873 3011.1024 4005.7873 3011.378 4005.7873 3011.6142 4005.7873 3011.811 4005.7873 3012.874 4005.7873 3013.0709 4005.7873 3013.3071 4005.7873 3013.622 4005.7873 3013.6614 4005.7873 3013.7795 4005.7873 3013.937 4005.7873 3014.0945 4005.7873 3014.252 4005.7873 3015.1575 4006.9684 3015.1575 4006.9684 3014.252 4006.9684 3014.0945 4006.9684 3013.937 4006.9684 3013.7795 4006.9684 3013.6614 4006.9684 3013.5827 4006.9684 3013.3071 4006.9684 3013.0709 4006.9684 3012.874 4006.9684 3011.811 4006.9684 3011.6142 4006.9684 3011.378 4006.9684 3011.063 4006.9684 3011.0236 4006.9684 3010.9055 4006.9684 3010.748 4006.9684 3010.5906 4006.9684 3010.4331 4008.3464 3010.4331 4008.3464 3010.5906 4008.3464 3010.748 4008.3464 3010.9055 4008.3464 3011.063 4008.3464 3011.1024 4008.3464 3011.378 4008.3464 3011.6142 4008.3464 3011.811 4008.3464 3012.874 4008.3464 3013.0709 4008.3464 3013.3071 4008.3464 3013.622 4008.3464 3013.6614 4008.3464 3013.7795 4008.3464 3013.937 4008.3464 3014.0945 4008.3464 3014.252 4008.3464 3015.1575 4009.5275 3015.1575 4009.5275 3014.252 4009.5275 3014.0945 4009.5275 3013.937 4009.5275 3013.7795 4009.5275 3013.6614 4009.5275 3013.5827 4009.5275 3013.3071 4009.5275 3013.0709 4009.5275 3012.874 4009.5275 3011.811 4009.5275 3011.6142 4009.5275 3011.378 4009.5275 3011.063 4009.5275 3011.0236 4009.5275 3010.9055 4009.5275 3010.748 4009.5275 3010.5906 4009.5275 3010.4331 4010.9054 3010.4331 4010.9054 3010.5906 4010.9054 3010.748 4010.9054 3010.9055 4010.9054 3011.063 4010.9054 3011.1024 4010.9054 3011.378 4010.9054 3011.6142 4010.9054 3011.811 4010.9054 3012.874 4010.9054 3013.0709 4010.9054 3013.3071 4010.9054 3013.622 4010.9054 3013.6614 4010.9054 3013.7795 4010.9054 3013.937 4010.9054 3014.0945 4010.9054 3014.252 4010.9054 3015.1575 4012.0865 3015.1575 4012.0865 3014.252 4012.0865 3014.0945 4012.0865 3013.937 4012.0865 3013.7795 4012.0865 3013.6614 4012.0865 3013.5827 4012.0865 3013.3071 4012.0865 3013.0709 4012.0865 3012.874 4012.0865 3011.811 4012.0865 3011.6142 4012.0865 3011.378 4012.0865 3011.063 4012.0865 3011.0236 4012.0865 3010.9055 4012.0865 3010.748 4012.0865 3010.5906 4012.0865 3010.4331 4013.4645 3010.4331 4013.4645 3010.5906 4013.4645 3010.748 4013.4645 3010.9055 4013.4645 3011.063 4013.4645 3011.1024 4013.4645 3011.378 4013.4645 3011.6142 4013.4645 3011.811 4013.4645 3012.874 4013.4645 3013.0709 4013.4645 3013.3071 4013.4645 3013.622 4013.4645 3013.6614 4013.4645 3013.7795 4013.4645 3013.937 4013.4645 3014.0945 4013.4645 3014.252 4013.4645 3015.1575 4014.6456 3015.1575 4014.6456 3014.252 4014.6456 3014.0945 4014.6456 3013.937 4014.6456 3013.7795 4014.6456 3013.6614 4014.6456 3013.5827 4014.6456 3013.3071 4014.6456 3013.0709 4014.6456 3012.874 4014.6456 3011.811 4014.6456 3011.6142 4014.6456 3011.378 4014.6456 3011.063 4014.6456 3011.0236 4014.6456 3010.9055 4014.6456 3010.748 4014.6456 3010.5906 4014.6456 3010.4331 4016.1417 3010.4331 4016.2598 3010.4331 4016.3385 3010.3937 4016.4172 3010.315 4016.496 3010.2362 4016.5354 3010.1575 4016.5354 3010.0394 4016.5354 2989.9607 4016.5354 2989.8819 4016.5354 2989.8426 4016.496 2989.8032 4016.496 2989.7638 4016.4566 2989.7245 4016.4172 2989.6851 4016.3779 2989.6457 4016.3385 2989.6063 4016.2991 2989.6063 4016.2204 2989.567 4016.1417 2989.567 4014.6456 2989.567 4014.6456 2989.4095 4014.6456 2989.252 4014.6456 2989.0945 4014.6456 2988.9371 4014.6456 2988.8977 4014.6456 2988.6221 4014.6456 2988.3859 4014.6456 2988.189 4014.6456 2987.126 4014.6456 2986.9292 4014.6456 2986.693 4014.6456 2986.378 4014.6456 2986.3386 4014.6456 2986.2205 4014.6456 2986.063 4014.6456 2985.9056 4014.6456 2985.7481 4014.6456 2984.8426 4013.4645 2984.8426 4013.4645 2985.7481 4013.4645 2985.9056 4013.4645 2986.063 4013.4645 2986.2205 4013.4645 2986.3386 4013.4645 2986.4174 4013.4645 2986.693 4013.4645 2986.9292 4013.4645 2987.126 4013.4645 2988.189 4013.4645 2988.3859 4013.4645 2988.6221 4013.4645 2988.9371 4013.4645 2988.9764 4013.4645 2989.0945 4013.4645 2989.252 4013.4645 2989.4095 4013.4645 2989.567 4012.0865 2989.567 4012.0865 2989.4095 4012.0865 2989.252 4012.0865 2989.0945 4012.0865 2988.9371 4012.0865 2988.8977 4012.0865 2988.6221 4012.0865 2988.3859 4012.0865 2988.189 4012.0865 2987.126 4012.0865 2986.9292 4012.0865 2986.693 4012.0865 2986.378 4012.0865 2986.3386 4012.0865 2986.2205 4012.0865 2986.063 4012.0865 2985.9056 4012.0865 2985.7481 4012.0865 2984.8426 4010.9054 2984.8426 4010.9054 2985.7481 4010.9054 2985.9056 4010.9054 2986.063 4010.9054 2986.2205 4010.9054 2986.3386 4010.9054 2986.4174 4010.9054 2986.693 4010.9054 2986.9292 4010.9054 2987.126 4010.9054 2988.189 4010.9054 2988.3859 4010.9054 2988.6221 4010.9054 2988.9371 4010.9054 2988.9764 4010.9054 2989.0945 4010.9054 2989.252 4010.9054 2989.4095 4010.9054 2989.567 4009.5275 2989.567 4009.5275 2989.4095 4009.5275 2989.252 4009.5275 2989.0945 4009.5275 2988.9371 4009.5275 2988.8977 4009.5275 2988.6221 4009.5275 2988.3859 4009.5275 2988.189 4009.5275 2987.126 4009.5275 2986.9292 4009.5275 2986.693 4009.5275 2986.378 4009.5275 2986.3386 4009.5275 2986.2205 4009.5275 2986.063 4009.5275 2985.9056 4009.5275 2985.7481 4009.5275 2984.8426 4008.3464 2984.8426 4008.3464 2985.7481 4008.3464 2985.9056 4008.3464 2986.063 4008.3464 2986.2205 4008.3464 2986.3386 4008.3464 2986.4174 4008.3464 2986.693 4008.3464 2986.9292 4008.3464 2987.126 4008.3464 2988.189 4008.3464 2988.3859 4008.3464 2988.6221 4008.3464 2988.9371 4008.3464 2988.9764 4008.3464 2989.0945 4008.3464 2989.252 4008.3464 2989.4095 4008.3464 2989.567 4006.9684 2989.567 4006.9684 2989.4095 4006.9684 2989.252 4006.9684 2989.0945 4006.9684 2988.9371 4006.9684 2988.8977 4006.9684 2988.6221 4006.9684 2988.3859 4006.9684 2988.189 4006.9684 2987.126 4006.9684 2986.9292 4006.9684 2986.693 4006.9684 2986.378 4006.9684 2986.3386 4006.9684 2986.2205 4006.9684 2986.063 4006.9684 2985.9056 4006.9684 2985.7481 4006.9684 2984.8426 4005.7873 2984.8426 4005.7873 2985.7481 4005.7873 2985.9056 4005.7873 2986.063 4005.7873 2986.2205 4005.7873 2986.3386 4005.7873 2986.4174 4005.7873 2986.693 4005.7873 2986.9292 4005.7873 2987.126 4005.7873 2988.189 4005.7873 2988.3859 4005.7873 2988.6221 4005.7873 2988.9371 4005.7873 2988.9764 4005.7873 2989.0945 4005.7873 2989.252 4005.7873 2989.4095 4005.7873 2989.567 4004.4094 2989.567 4004.4094 2989.4095 4004.4094 2989.252 4004.4094 2989.0945 4004.4094 2988.9371 4004.4094 2988.8977 4004.4094 2988.6221 4004.4094 2988.3859 4004.4094 2988.189 4004.4094 2987.126 4004.4094 2986.9292 4004.4094 2986.693 4004.4094 2986.378 4004.4094 2986.3386 4004.4094 2986.2205 4004.4094 2986.063 4004.4094 2985.9056 4004.4094 2985.7481 4004.4094 2984.8426 4003.2283 2984.8426 4003.2283 2985.7481 4003.2283 2985.9056 4003.2283 2986.063 4003.2283 2986.2205 4003.2283 2986.3386 4003.2283 2986.4174 4003.2283 2986.693 4003.2283 2986.9292 4003.2283 2987.126 4003.2283 2988.189 4003.2283 2988.3859 4003.2283 2988.6221 4003.2283 2988.9371 4003.2283 2988.9764 4003.2283 2989.0945 4003.2283 2989.252 4003.2283 2989.4095 4003.2283 2989.567 4001.8503 2989.567 4001.8503 2989.4095 4001.8503 2989.252 4001.8503 2989.0945 4001.8503 2988.9371 4001.8503 2988.8977 4001.8503 2988.6221 4001.8503 2988.3859 4001.8503 2988.189 4001.8503 2987.126 4001.8503 2986.9292 4001.8503 2986.693 4001.8503 2986.378 4001.8503 2986.3386 4001.8503 2986.2205 4001.8503 2986.063 4001.8503 2985.9056 4001.8503 2985.7481 4001.8503 2984.8426 4000.6692 2984.8426 4000.6692 2985.7481 4000.6692 2985.9056 4000.6692 2986.063 4000.6692 2986.2205 4000.6692 2986.3386 4000.6692 2986.4174 4000.6692 2986.693 4000.6692 2986.9292 4000.6692 2987.126 4000.6692 2988.189 4000.6692 2988.3859 4000.6692 2988.6221 4000.6692 2988.9371 4000.6692 2988.9764 4000.6692 2989.0945 4000.6692 2989.252 4000.6692 2989.4095 4000.6692 2989.567 4000 2989.567 3999.2913 2989.567 3999.2913 2989.4095 3999.2913 2989.252 3999.2913 2989.0945 3999.2913 2988.9371 3999.2913 2988.8977 3999.2913 2988.6221 3999.2913 2988.3859 3999.2913 2988.189 3999.2913 2987.126 3999.2913 2986.9292 3999.2913 2986.693 3999.2913 2986.378 3999.2913 2986.3386 3999.2913 2986.2205 3999.2913 2986.063 3999.2913 2985.9056 3999.2913 2985.7481 3999.2913 2984.8426 3998.1102 2984.8426 3998.1102 2985.7481 3998.1102 2985.9056 3998.1102 2986.063 3998.1102 2986.2205 3998.1102 2986.3386 3998.1102 2986.4174 3998.1102 2986.693 3998.1102 2986.9292 3998.1102 2987.126 3998.1102 2988.189 3998.1102 2988.3859 3998.1102 2988.6221 3998.1102 2988.9371 3998.1102 2988.9764 3998.1102 2989.0945 3998.1102 2989.252 3998.1102 2989.4095 3998.1102 2989.567 3996.7322 2989.567 3996.7322 2989.4095 3996.7322 2989.252 3996.7322 2989.0945 3996.7322 2988.9371 3996.7322 2988.8977 3996.7322 2988.6221 3996.7322 2988.3859 3996.7322 2988.189 3996.7322 2987.126 3996.7322 2986.9292 3996.7322 2986.693 3996.7322 2986.378 3996.7322 2986.3386 3996.7322 2986.2205 3996.7322 2986.063 3996.7322 2985.9056 3996.7322 2985.7481 3996.7322 2984.8426 3995.5511 2984.8426 3995.5511 2985.7481 3995.5511 2985.9056 3995.5511 2986.063 3995.5511 2986.2205 3995.5511 2986.3386 3995.5511 2986.4174 3995.5511 2986.693 3995.5511 2986.9292 3995.5511 2987.126 3995.5511 2988.189 3995.5511 2988.3859 3995.5511 2988.6221 3995.5511 2988.9371 3995.5511 2988.9764 3995.5511 2989.0945 3995.5511 2989.252 3995.5511 2989.4095 3995.5511 2989.567 3994.1732 2989.567 3994.1732 2989.4095 3994.1732 2989.252 3994.1732 2989.0945 3994.1732 2988.9371 3994.1732 2988.8977 3994.1732 2988.6221 3994.1732 2988.3859 3994.1732 2988.189 3994.1732 2987.126 3994.1732 2986.9292 3994.1732 2986.693 3994.1732 2986.378 3994.1732 2986.3386 3994.1732 2986.2205 3994.1732 2986.063 3994.1732 2985.9056 3994.1732 2985.7481 3994.1732 2984.8426 3992.9921 2984.8426 3992.9921 2985.7481 3992.9921 2985.9056 3992.9921 2986.063 3992.9921 2986.2205 3992.9921 2986.3386 3992.9921 2986.4174 3992.9921 2986.693 3992.9921 2986.9292 3992.9921 2987.126 3992.9921 2988.189 3992.9921 2988.3859 3992.9921 2988.6221 3992.9921 2988.9371 3992.9921 2988.9764 3992.9921 2989.0945 3992.9921 2989.252 3992.9921 2989.4095 3992.9921 2989.567 3991.6141 2989.567 3991.6141 2989.4095 3991.6141 2989.252 3991.6141 2989.0945 3991.6141 2988.9371 3991.6141 2988.8977 3991.6141 2988.6221 3991.6141 2988.3859 3991.6141 2988.189 3991.6141 2987.126 3991.6141 2986.9292 3991.6141 2986.693 3991.6141 2986.378 3991.6141 2986.3386 3991.6141 2986.2205 3991.6141 2986.063 3991.6141 2985.9056 3991.6141 2985.7481 3991.6141 2984.8426 3990.4724 2984.8426 3990.4724 2985.7481 3990.4724 2985.9056 3990.4724 2986.063 3990.4724 2986.2205 3990.4724 2986.3386 3990.4724 2986.4174 3990.4724 2986.693 3990.4724 2986.9292 3990.4724 2987.126 3990.4724 2988.189 3990.4724 2988.3859 3990.4724 2988.6221 3990.4724 2988.9371 3990.4724 2988.9764 3990.4724 2989.0945 3990.4724 2989.252 3990.4724 2989.4095 3990.4724 2989.567 3989.0551 2989.567 3989.0551 2989.4095 3989.0551 2989.252 3989.0551 2989.0945 3989.0551 2988.9371 3989.0551 2988.8977 3989.0551 2988.6221 3989.0551 2988.3859 3989.0551 2988.189 3989.0551 2987.126 3989.0551 2986.9292 3989.0551 2986.693 3989.0551 2986.378 3989.0551 2986.3386 3989.0551 2986.2205 3989.0551 2986.063 3989.0551 2985.9056 3989.0551 2985.7481 3989.0551 2984.8426 3987.874 2984.8426 3987.874 2985.7481 3987.874 2985.9056 3987.874 2986.063 3987.874 2986.2205 3987.874 2986.3386 3987.874 2986.4174 3987.874 2986.693 3987.874 2986.9292 3987.874 2987.126 3987.874 2988.189 3987.874 2988.3859 3987.874 2988.6221 3987.874 2988.9371 3987.874 2988.9764 3987.874 2989.0945 3987.874 2989.252 3987.874 2989.4095 3987.874 2989.567 3986.496 2989.567 3986.496 2989.4095 3986.496 2989.252 3986.496 2989.0945 3986.496 2988.9371 3986.496 2988.8977 3986.496 2988.6221 3986.496 2988.3859 3986.496 2988.189 3986.496 2987.126 3986.496 2986.9292 3986.496 2986.693 3986.496 2986.378 3986.496 2986.3386 3986.496 2986.2205 3986.496 2986.063 3986.496 2985.9056 3986.496 2985.7481 3986.496 2984.8426 3985.3149 2984.8426 3985.3149 2985.7481 3985.3149 2985.9056 3985.3149 2986.063 3985.3149 2986.2205 3985.3149 2986.3386 3985.3149 2986.4174 3985.3149 2986.693 3985.3149 2986.9292 3985.3149 2987.126 3985.3149 2988.189 3985.3149 2988.3859 3985.3149 2988.6221 3985.3149 2988.9371 3985.3149 2988.9764 3985.3149 2989.0945 3985.3149 2989.252 3985.3149 2989.4095 3985.3149 2989.567 3983.8583 2989.567 3983.7401 2989.567 3983.6614 2989.6063 3983.5827 2989.6851 3983.5039 2989.7638 3983.4646 2989.8426 3983.4646 2989.9607 3983.4646 3010.0394 3983.4646 3010.1181 3983.4646 3010.1575 3983.5039 3010.1969 3983.5039 3010.2362 3983.5433 3010.2756 3983.5827 3010.315 3983.622 3010.3543 3983.6614 3010.3937 3983.7008 3010.3937 3983.7795 3010.4331 3983.8583 3010.4331 3985.3149 3010.4331 3985.3149 3010.5906 3985.3149 3010.748 3985.3149 3010.9055 3985.3149 3011.063 3985.3149 3011.1024 3985.3149 3011.378 3985.3149 3011.6142 3985.3149 3011.811 3985.3149 3012.874 3985.3149 3013.0709 3985.3149 3013.3071 3985.3149 3013.622 3985.3149 3013.6614 3985.3149 3013.7795 3985.3149 3013.937 3985.3149 3014.0945 3985.3149 3014.252 3985.3149 3015.1575 3985.3149 3015.1575\"}}]}" + ], + "layers": [ + "1~TopLayer~#FF0000~true~true~true~", + "2~BottomLayer~#0000FF~true~false~true~", + "3~TopSilkLayer~#FFCC00~true~false~true~", + "4~BottomSilkLayer~#66CC33~true~false~true~", + "5~TopPasteMaskLayer~#808080~true~false~true~", + "6~BottomPasteMaskLayer~#800000~true~false~true~", + "7~TopSolderMaskLayer~#800080~true~false~true~0.3", + "8~BottomSolderMaskLayer~#AA00FF~true~false~true~0.3", + "9~Ratlines~#6464FF~true~false~true~", + "10~BoardOutLine~#FF00FF~true~false~true~", + "11~Multi-Layer~#FFFFFF~true~false~true~0.5", + "12~Document~#FFFFFF~true~false~true~", + "13~TopAssembly~#33CC99~true~false~true~", + "14~BottomAssembly~#5555FF~true~false~true~", + "15~Mechanical~#F022F0~true~false~true~", + "19~3DModel~#66CCFF~true~false~true~", + "21~Inner1~#800000~false~false~false~~", + "22~Inner2~#008000~false~false~false~~", + "23~Inner3~#00FF00~false~false~false~~", + "24~Inner4~#BC8E00~false~false~false~~", + "25~Inner5~#70DBFA~false~false~false~~", + "26~Inner6~#00CC66~false~false~false~~", + "27~Inner7~#9966FF~false~false~false~~", + "28~Inner8~#800080~false~false~false~~", + "29~Inner9~#008080~false~false~false~~", + "30~Inner10~#15935F~false~false~false~~", + "31~Inner11~#000080~false~false~false~~", + "32~Inner12~#00B400~false~false~false~~", + "33~Inner13~#2E4756~false~false~false~~", + "34~Inner14~#99842F~false~false~false~~", + "35~Inner15~#FFFFAA~false~false~false~~", + "36~Inner16~#99842F~false~false~false~~", + "37~Inner17~#2E4756~false~false~false~~", + "38~Inner18~#3535FF~false~false~false~~", + "39~Inner19~#8000BC~false~false~false~~", + "40~Inner20~#43AE5F~false~false~false~~", + "41~Inner21~#C3ECCE~false~false~false~~", + "42~Inner22~#728978~false~false~false~~", + "43~Inner23~#39503F~false~false~false~~", + "44~Inner24~#0C715D~false~false~false~~", + "45~Inner25~#5A8A80~false~false~false~~", + "46~Inner26~#2B937E~false~false~false~~", + "47~Inner27~#23999D~false~false~false~~", + "48~Inner28~#45B4E3~false~false~false~~", + "49~Inner29~#215DA1~false~false~false~~", + "50~Inner30~#4564D7~false~false~false~~", + "51~Inner31~#6969E9~false~false~false~~", + "52~Inner32~#9069E9~false~false~false~~", + "99~ComponentShapeLayer~#00CCCC~true~false~true~0.4", + "100~LeadShapeLayer~#CC9999~true~false~true~", + "101~ComponentPolarityLayer~#66FFCC~true~false~true~", + "Hole~Hole~#222222~false~false~true~", + "DRCError~DRCError~#FAD609~false~false~true~" + ], + "objects": [ + "All~true~false", + "Component~true~true", + "Prefix~true~true", + "Name~true~false", + "Track~true~true", + "Pad~true~true", + "Via~true~true", + "Hole~true~true", + "Copper_Area~true~true", + "Circle~true~true", + "Arc~true~true", + "Solid_Region~true~true", + "Text~true~true", + "Image~true~true", + "Rect~true~true", + "Dimension~true~true", + "Protractor~true~true" + ], + "BBox": { + "x": 3982.8, + "y": 2982.9, + "width": 33.7, + "height": 34.6 + } + } + } +} \ No newline at end of file diff --git a/tests/convert-to-soup-tests/c88224.test.ts b/tests/convert-to-soup-tests/c88224.test.ts new file mode 100644 index 0000000..4961130 --- /dev/null +++ b/tests/convert-to-soup-tests/c88224.test.ts @@ -0,0 +1,23 @@ +import { it, expect } from "bun:test" +import { logSoup } from "@tscircuit/log-soup" +import c88224RawEasy from "../assets/C88224.raweasy.json" +import { EasyEdaJsonSchema } from "lib/schemas/easy-eda-json-schema" +import { convertEasyEdaJsonToTscircuitSoupJson } from "lib/convert-easyeda-json-to-tscircuit-soup-json" +import { su } from "@tscircuit/soup-util" +import type { AnySoupElement } from "@tscircuit/soup" + +it("should parse easyeda json for a c88224 and convert to tscircuit soup", async () => { + const parsedJson = EasyEdaJsonSchema.parse(c88224RawEasy) + const soupElements = convertEasyEdaJsonToTscircuitSoupJson(parsedJson).concat( + [ + { + type: "pcb_board", + center: { x: 0, y: 0 }, + width: 20, + height: 20, + }, + ] + ) + + await logSoup("easyeda c88224 to soup", soupElements as AnySoupElement[]) +})