diff --git a/lib/convert-easyeda-json-to-tscircuit-soup-json.ts b/lib/convert-easyeda-json-to-tscircuit-soup-json.ts index 31d0eb93..eed81922 100644 --- a/lib/convert-easyeda-json-to-tscircuit-soup-json.ts +++ b/lib/convert-easyeda-json-to-tscircuit-soup-json.ts @@ -197,6 +197,98 @@ const handleCutout = ( } as Soup.PcbCutoutPolygonInput) } +const getRegionBounds = (solidRegion: z.infer) => { + const xs = solidRegion.points.map((p) => milx10(p.x)) + const ys = solidRegion.points.map((p) => milx10(p.y)) + + return { + minX: Math.min(...xs), + maxX: Math.max(...xs), + minY: Math.min(...ys), + maxY: Math.max(...ys), + } +} + +const findAntennaKeepoutCandidates = ( + solidRegions: Array>, +) => { + const bodyRegion = solidRegions.find((shape) => shape.layermask === 99) + if (!bodyRegion) return [] + + const bodyBounds = getRegionBounds(bodyRegion) + const bodyWidth = bodyBounds.maxX - bodyBounds.minX + const bodyHeight = bodyBounds.maxY - bodyBounds.minY + + const docLayerBars = solidRegions + .filter( + (shape) => + shape.layermask === 12 && + shape.fillStyle === "solid" && + shape.points.length === 4, + ) + .map((shape) => ({ shape, bounds: getRegionBounds(shape) })) + + const keepouts: Soup.PCBKeepout[] = [] + + for (const { bounds } of docLayerBars) { + const width = bounds.maxX - bounds.minX + const height = bounds.maxY - bounds.minY + const isHorizontalBar = width > bodyWidth * 0.7 && height < bodyHeight * 0.1 + const isVerticalBar = height > bodyHeight * 0.7 && width < bodyWidth * 0.1 + + if (!isHorizontalBar && !isVerticalBar) continue + + if (isHorizontalBar) { + const distanceToTop = Math.abs(bounds.maxY - bodyBounds.maxY) + const distanceToBottom = Math.abs(bounds.minY - bodyBounds.minY) + const keepoutMinY = + distanceToTop < distanceToBottom ? bounds.maxY : bodyBounds.minY + const keepoutMaxY = + distanceToTop < distanceToBottom ? bodyBounds.maxY : bounds.minY + + keepouts.push( + Soup.pcb_keepout.parse({ + type: "pcb_keepout", + pcb_keepout_id: `pcb_keepout_${keepouts.length + 1}`, + layers: ["top"], + shape: "rect", + width: bodyWidth, + height: keepoutMaxY - keepoutMinY, + center: { + x: (bodyBounds.minX + bodyBounds.maxX) / 2, + y: (keepoutMinY + keepoutMaxY) / 2, + }, + }), + ) + continue + } + + const distanceToLeft = Math.abs(bounds.maxX - bodyBounds.maxX) + const distanceToRight = Math.abs(bounds.minX - bodyBounds.minX) + const keepoutMinX = + distanceToLeft < distanceToRight ? bounds.maxX : bodyBounds.minX + const keepoutMaxX = + distanceToLeft < distanceToRight ? bodyBounds.maxX : bounds.minX + + keepouts.push( + Soup.pcb_keepout.parse({ + type: "pcb_keepout", + pcb_keepout_id: `pcb_keepout_${keepouts.length + 1}`, + layers: ["top"], + shape: "rect", + width: keepoutMaxX - keepoutMinX, + height: bodyHeight, + center: { + x: (keepoutMinX + keepoutMaxX) / 2, + y: (bodyBounds.minY + bodyBounds.maxY) / 2, + }, + }), + ) + } + + return keepouts +} + interface Options { useModelCdn?: boolean shouldRecenter?: boolean @@ -486,6 +578,14 @@ export const convertEasyEdaJsonToCircuitJson = ( circuitElements.push(handleCutout(sr, index)) }) + // Add antenna keepouts based on EasyEDA documentation layer bars + const solidRegions = easyEdaJson.packageDetail.dataStr.shape.filter( + (shape): shape is z.infer => + shape.type === "SOLIDREGION", + ) + + circuitElements.push(...findAntennaKeepoutCandidates(solidRegions)) + // Add silkscreen paths, arcs and text easyEdaJson.packageDetail.dataStr.shape.forEach((shape, index) => { if (shape.type === "TRACK") { @@ -527,6 +627,7 @@ export const convertEasyEdaJsonToCircuitJson = ( e.type === "pcb_plated_hole" || e.type === "pcb_hole" || e.type === "pcb_via" || + e.type === "pcb_keepout" || e.type === "pcb_courtyard_outline" || e.type === "pcb_silkscreen_path" || e.type === "pcb_silkscreen_text", diff --git a/lib/websafe/generate-footprint-tsx.ts b/lib/websafe/generate-footprint-tsx.ts index 07f7bf44..24157dc2 100644 --- a/lib/websafe/generate-footprint-tsx.ts +++ b/lib/websafe/generate-footprint-tsx.ts @@ -12,6 +12,7 @@ export const generateFootprintTsx = ( const silkscreenPaths = su(circuitJson).pcb_silkscreen_path.list() const silkscreenTexts = su(circuitJson).pcb_silkscreen_text.list() const courtyardOutlines = su(circuitJson).pcb_courtyard_outline.list() + const keepouts = su(circuitJson).pcb_keepout.list() const elementStrings: string[] = [] @@ -80,6 +81,14 @@ export const generateFootprintTsx = ( ) } + for (const keepout of keepouts) { + if (keepout.shape === "rect") { + elementStrings.push( + ``, + ) + } + } + for (const courtyardOutline of courtyardOutlines) { elementStrings.push( ``, diff --git a/tests/assets/C2934569.raweasy.json b/tests/assets/C2934569.raweasy.json new file mode 100644 index 00000000..ff99e642 --- /dev/null +++ b/tests/assets/C2934569.raweasy.json @@ -0,0 +1,395 @@ +{ + "uuid": "c86d55ab7d234e95a11b103cf9b64b88", + "title": "ESP32-C3-MINI-1-H4(4MB)", + "description": "", + "docType": 2, + "type": 3, + "thumb": "//image.lceda.cn/components/c86d55ab7d234e95a11b103cf9b64b88.png", + "lcsc": { + "id": 3281224, + "number": "C2934569" + }, + "szlcsc": { + "id": 3281224, + "number": "C2934569" + }, + "owner": { + "uuid": "0819f05c4eef4c71ace90d822a990e87", + "username": "LCSC", + "nickname": "LCSC", + "avatar": "//image.lceda.cn/avatars/2018/6/kFlrasi7W06gTdBLAqW3fkrqbDhbowynuSzkjqso.png" + }, + "tags": [ + "WIFI Modules" + ], + "updateTime": 1729254002, + "updated_at": "2026-03-12 10:17:35", + "dataStr": { + "head": { + "docType": "2", + "editorVersion": "6.5.5", + "x": 440, + "y": 275, + "c_para": { + "pre": "U?", + "name": "ESP32-C3-MINI-1-H4(4MB)", + "package": "WIFIM-SMD_ESP32-C3-MINI-1", + "Contributor": "LCSC", + "Supplier": "LCSC", + "Supplier Part": "C2934569", + "Manufacturer": "ESPRESSIF(乐鑫)", + "Manufacturer Part": "ESP32-C3-MINI-1-H4", + "Value": "2.4GHz", + "nameAlias": "Value", + "JLCPCB Part Class": "Extended Part" + }, + "uuid": "c86d55ab7d234e95a11b103cf9b64b88", + "puuid": "c37ee20a3ccf469682bdbec93989c575", + "importFlag": 0, + "c_spiceCmd": null, + "pre": "U?", + "name": "ESP32-C3-MINI-1-H4(4MB)", + "hasIdFlag": true, + "utime": 1653049175 + }, + "canvas": "CA~1000~1000~#FFFFFF~yes~#CCCCCC~5~1000~1000~line~5~pixel~5~440~275", + "shape": [ + "P~show~0~53~485~150~0~gge1578~0^^485~150^^M 485 150 h -10~#000000^^1~471.3~154~0~GND~end~~~#000000^^1~475.5~149~0~53~start~~~#000000^^0~478~150^^0~M 475 147 L 472 150 L 475 153", + "P~show~0~52~485~160~0~gge1599~0^^485~160^^M 485 160 h -10~#000000^^1~471.3~164~0~GND~end~~~#000000^^1~475.5~159~0~52~start~~~#000000^^0~478~160^^0~M 475 157 L 472 160 L 475 163", + "P~show~0~51~485~170~0~gge1620~0^^485~170^^M 485 170 h -10~#000000^^1~471.3~174~0~GND~end~~~#000000^^1~475.5~169~0~51~start~~~#000000^^0~478~170^^0~M 475 167 L 472 170 L 475 173", + "P~show~0~50~485~180~0~gge1641~0^^485~180^^M 485 180 h -10~#000000^^1~471.3~184~0~GND~end~~~#000000^^1~475.5~179~0~50~start~~~#000000^^0~478~180^^0~M 475 177 L 472 180 L 475 183", + "P~show~0~49~485~190~0~gge1662~0^^485~190^^M 485 190 h -10~#000000^^1~471.3~194~0~GND~end~~~#000000^^1~475.5~189~0~49~start~~~#000000^^0~478~190^^0~M 475 187 L 472 190 L 475 193", + "P~show~0~48~485~200~0~gge1683~0^^485~200^^M 485 200 h -10~#000000^^1~471.3~204~0~GND~end~~~#000000^^1~475.5~199~0~48~start~~~#000000^^0~478~200^^0~M 475 197 L 472 200 L 475 203", + "P~show~0~47~485~210~0~gge1704~0^^485~210^^M 485 210 h -10~#000000^^1~471.3~214~0~GND~end~~~#000000^^1~475.5~209~0~47~start~~~#000000^^0~478~210^^0~M 475 207 L 472 210 L 475 213", + "P~show~0~46~485~220~0~gge1725~0^^485~220^^M 485 220 h -10~#000000^^1~471.3~224~0~GND~end~~~#000000^^1~475.5~219~0~46~start~~~#000000^^0~478~220^^0~M 475 217 L 472 220 L 475 223", + "P~show~0~45~485~230~0~gge1746~0^^485~230^^M 485 230 h -10~#000000^^1~471.3~234~0~GND~end~~~#000000^^1~475.5~229~0~45~start~~~#000000^^0~478~230^^0~M 475 227 L 472 230 L 475 233", + "P~show~0~44~485~240~0~gge1767~0^^485~240^^M 485 240 h -10~#000000^^1~471.3~244~0~GND~end~~~#000000^^1~475.5~239~0~44~start~~~#000000^^0~478~240^^0~M 475 237 L 472 240 L 475 243", + "P~show~0~43~485~250~0~gge1788~0^^485~250^^M 485 250 h -10~#000000^^1~471.3~254~0~GND~end~~~#000000^^1~475.5~249~0~43~start~~~#000000^^0~478~250^^0~M 475 247 L 472 250 L 475 253", + "P~show~0~42~485~260~0~gge1809~0^^485~260^^M 485 260 h -10~#000000^^1~471.3~264~0~GND~end~~~#000000^^1~475.5~259~0~42~start~~~#000000^^0~478~260^^0~M 475 257 L 472 260 L 475 263", + "P~show~0~41~485~270~0~gge1830~0^^485~270^^M 485 270 h -10~#000000^^1~471.3~274~0~GND~end~~~#000000^^1~475.5~269~0~41~start~~~#000000^^0~478~270^^0~M 475 267 L 472 270 L 475 273", + "P~show~0~40~485~280~0~gge1851~0^^485~280^^M 485 280 h -10~#000000^^1~471.3~284~0~GND~end~~~#000000^^1~475.5~279~0~40~start~~~#000000^^0~478~280^^0~M 475 277 L 472 280 L 475 283", + "P~show~0~39~485~290~0~gge1872~0^^485~290^^M 485 290 h -10~#000000^^1~471.3~294~0~GND~end~~~#000000^^1~475.5~289~0~39~start~~~#000000^^0~478~290^^0~M 475 287 L 472 290 L 475 293", + "P~show~0~38~485~300~0~gge1893~0^^485~300^^M 485 300 h -10~#000000^^1~471.3~304~0~GND~end~~~#000000^^1~475.5~299~0~38~start~~~#000000^^0~478~300^^0~M 475 297 L 472 300 L 475 303", + "P~show~0~37~485~310~0~gge1914~0^^485~310^^M 485 310 h -10~#000000^^1~471.3~314~0~GND~end~~~#000000^^1~475.5~309~0~37~start~~~#000000^^0~478~310^^0~M 475 307 L 472 310 L 475 313", + "P~show~0~36~485~320~0~gge1935~0^^485~320^^M 485 320 h -10~#000000^^1~471.3~324~0~GND~end~~~#000000^^1~475.5~319~0~36~start~~~#000000^^0~478~320^^0~M 475 317 L 472 320 L 475 323", + "P~show~0~35~485~330~0~gge1956~0^^485~330^^M 485 330 h -10~#880000^^1~471.3~334~0~NC~end~~~#0000FF^^1~475.5~329~0~35~start~~~#0000FF^^0~478~330^^0~M 475 327 L 472 330 L 475 333", + "P~show~0~34~485~340~0~gge1977~0^^485~340^^M 485 340 h -10~#880000^^1~471.3~344~0~NC~end~~~#0000FF^^1~475.5~339~0~34~start~~~#0000FF^^0~478~340^^0~M 475 337 L 472 340 L 475 343", + "P~show~0~33~485~350~0~gge1998~0^^485~350^^M 485 350 h -10~#880000^^1~471.3~354~0~NC~end~~~#0000FF^^1~475.5~349~0~33~start~~~#0000FF^^0~478~350^^0~M 475 347 L 472 350 L 475 353", + "P~show~0~32~485~360~0~gge2019~0^^485~360^^M 485 360 h -10~#880000^^1~471.3~364~0~NC~end~~~#0000FF^^1~475.5~359~0~32~start~~~#0000FF^^0~478~360^^0~M 475 357 L 472 360 L 475 363", + "P~show~0~31~485~370~0~gge2040~0^^485~370^^M 485 370 h -10~#880000^^1~471.3~374~0~TXD0~end~~~#0000FF^^1~475.5~369~0~31~start~~~#0000FF^^0~478~370^^0~M 475 367 L 472 370 L 475 373", + "P~show~0~30~485~380~0~gge2061~0^^485~380^^M 485 380 h -10~#880000^^1~471.3~384~0~RXD0~end~~~#0000FF^^1~475.5~379~0~30~start~~~#0000FF^^0~478~380^^0~M 475 377 L 472 380 L 475 383", + "P~show~0~29~485~390~0~gge2082~0^^485~390^^M 485 390 h -10~#880000^^1~471.3~394~0~NC~end~~~#0000FF^^1~475.5~389~0~29~start~~~#0000FF^^0~478~390^^0~M 475 387 L 472 390 L 475 393", + "P~show~0~28~485~400~0~gge2103~0^^485~400^^M 485 400 h -10~#880000^^1~471.3~404~0~NC~end~~~#0000FF^^1~475.5~399~0~28~start~~~#0000FF^^0~478~400^^0~M 475 397 L 472 400 L 475 403", + "P~show~0~27~395~405~180~gge2124~0^^395~405^^M 395 405 h 10~#880000^^1~408.7~409~0~IO19~start~~~#0000FF^^1~404.5~404~0~27~end~~~#0000FF^^0~402~405^^0~M 405 408 L 408 405 L 405 402", + "P~show~0~26~395~395~180~gge2145~0^^395~395^^M 395 395 h 10~#880000^^1~408.7~399~0~IO18~start~~~#0000FF^^1~404.5~394~0~26~end~~~#0000FF^^0~402~395^^0~M 405 398 L 408 395 L 405 392", + "P~show~0~25~395~385~180~gge2166~0^^395~385^^M 395 385 h 10~#880000^^1~408.7~389~0~NC~start~~~#0000FF^^1~404.5~384~0~25~end~~~#0000FF^^0~402~385^^0~M 405 388 L 408 385 L 405 382", + "P~show~0~24~395~375~180~gge2187~0^^395~375^^M 395 375 h 10~#880000^^1~408.7~379~0~NC~start~~~#0000FF^^1~404.5~374~0~24~end~~~#0000FF^^0~402~375^^0~M 405 378 L 408 375 L 405 372", + "P~show~0~23~395~365~180~gge2208~0^^395~365^^M 395 365 h 10~#880000^^1~408.7~369~0~IO9~start~~~#0000FF^^1~404.5~364~0~23~end~~~#0000FF^^0~402~365^^0~M 405 368 L 408 365 L 405 362", + "P~show~0~22~395~355~180~gge2229~0^^395~355^^M 395 355 h 10~#880000^^1~408.7~359~0~IO8~start~~~#0000FF^^1~404.5~354~0~22~end~~~#0000FF^^0~402~355^^0~M 405 358 L 408 355 L 405 352", + "P~show~0~21~395~345~180~gge2250~0^^395~345^^M 395 345 h 10~#880000^^1~408.7~349~0~IO7~start~~~#0000FF^^1~404.5~344~0~21~end~~~#0000FF^^0~402~345^^0~M 405 348 L 408 345 L 405 342", + "P~show~0~20~395~335~180~gge2271~0^^395~335^^M 395 335 h 10~#880000^^1~408.7~339~0~IO6~start~~~#0000FF^^1~404.5~334~0~20~end~~~#0000FF^^0~402~335^^0~M 405 338 L 408 335 L 405 332", + "P~show~0~19~395~325~180~gge2292~0^^395~325^^M 395 325 h 10~#880000^^1~408.7~329~0~IO5~start~~~#0000FF^^1~404.5~324~0~19~end~~~#0000FF^^0~402~325^^0~M 405 328 L 408 325 L 405 322", + "P~show~0~18~395~315~180~gge2313~0^^395~315^^M 395 315 h 10~#880000^^1~408.7~319~0~IO4~start~~~#0000FF^^1~404.5~314~0~18~end~~~#0000FF^^0~402~315^^0~M 405 318 L 408 315 L 405 312", + "P~show~0~17~395~305~180~gge2334~0^^395~305^^M 395 305 h 10~#880000^^1~408.7~309~0~NC~start~~~#0000FF^^1~404.5~304~0~17~end~~~#0000FF^^0~402~305^^0~M 405 308 L 408 305 L 405 302", + "P~show~0~16~395~295~180~gge2355~0^^395~295^^M 395 295 h 10~#880000^^1~408.7~299~0~IO10~start~~~#0000FF^^1~404.5~294~0~16~end~~~#0000FF^^0~402~295^^0~M 405 298 L 408 295 L 405 292", + "P~show~0~15~395~285~180~gge2376~0^^395~285^^M 395 285 h 10~#880000^^1~408.7~289~0~NC~start~~~#0000FF^^1~404.5~284~0~15~end~~~#0000FF^^0~402~285^^0~M 405 288 L 408 285 L 405 282", + "P~show~0~14~395~275~180~gge2397~0^^395~275^^M 395 275 h 10~#000000^^1~408.7~279~0~GND~start~~~#000000^^1~404.5~274~0~14~end~~~#000000^^0~402~275^^0~M 405 278 L 408 275 L 405 272", + "P~show~0~13~395~265~180~gge2418~0^^395~265^^M 395 265 h 10~#880000^^1~408.7~269~0~IO1~start~~~#0000FF^^1~404.5~264~0~13~end~~~#0000FF^^0~402~265^^0~M 405 268 L 408 265 L 405 262", + "P~show~0~12~395~255~180~gge2439~0^^395~255^^M 395 255 h 10~#880000^^1~408.7~259~0~IO0~start~~~#0000FF^^1~404.5~254~0~12~end~~~#0000FF^^0~402~255^^0~M 405 258 L 408 255 L 405 252", + "P~show~0~11~395~245~180~gge2460~0^^395~245^^M 395 245 h 10~#000000^^1~408.7~249~0~GND~start~~~#000000^^1~404.5~244~0~11~end~~~#000000^^0~402~245^^0~M 405 248 L 408 245 L 405 242", + "P~show~0~10~395~235~180~gge2481~0^^395~235^^M 395 235 h 10~#880000^^1~408.7~239~0~NC~start~~~#0000FF^^1~404.5~234~0~10~end~~~#0000FF^^0~402~235^^0~M 405 238 L 408 235 L 405 232", + "P~show~0~9~395~225~180~gge2502~0^^395~225^^M 395 225 h 10~#880000^^1~408.7~229~0~NC~start~~~#0000FF^^1~404.5~224~0~9~end~~~#0000FF^^0~402~225^^0~M 405 228 L 408 225 L 405 222", + "P~show~0~8~395~215~180~gge2523~0^^395~215^^M 395 215 h 10~#880000^^1~408.7~219~0~EN~start~~~#0000FF^^1~404.5~214~0~8~end~~~#0000FF^^0~402~215^^0~M 405 218 L 408 215 L 405 212", + "P~show~0~7~395~205~180~gge2544~0^^395~205^^M 395 205 h 10~#880000^^1~408.7~209~0~NC~start~~~#0000FF^^1~404.5~204~0~7~end~~~#0000FF^^0~402~205^^0~M 405 208 L 408 205 L 405 202", + "P~show~0~6~395~195~180~gge2565~0^^395~195^^M 395 195 h 10~#880000^^1~408.7~199~0~IO3~start~~~#0000FF^^1~404.5~194~0~6~end~~~#0000FF^^0~402~195^^0~M 405 198 L 408 195 L 405 192", + "P~show~0~5~395~185~180~gge2586~0^^395~185^^M 395 185 h 10~#880000^^1~408.7~189~0~IO2~start~~~#0000FF^^1~404.5~184~0~5~end~~~#0000FF^^0~402~185^^0~M 405 188 L 408 185 L 405 182", + "P~show~0~4~395~175~180~gge2607~0^^395~175^^M 395 175 h 10~#880000^^1~408.7~179~0~NC~start~~~#0000FF^^1~404.5~174~0~4~end~~~#0000FF^^0~402~175^^0~M 405 178 L 408 175 L 405 172", + "P~show~0~3~395~165~180~gge2628~0^^395~165^^M 395 165 h 10~#880000^^1~408.7~169~0~3V3~start~~~#0000FF^^1~404.5~164~0~3~end~~~#0000FF^^0~402~165^^0~M 405 168 L 408 165 L 405 162", + "P~show~0~2~395~155~180~gge2649~0^^395~155^^M 395 155 h 10~#000000^^1~408.7~159~0~GND~start~~~#000000^^1~404.5~154~0~2~end~~~#000000^^0~402~155^^0~M 405 158 L 408 155 L 405 152", + "P~show~0~1~395~145~180~gge2670~0^^395~145^^M 395 145 h 10~#000000^^1~408.7~149~0~GND~start~~~#000000^^1~404.5~144~0~1~end~~~#000000^^0~402~145^^0~M 405 148 L 408 145 L 405 142", + "E~410~140~1.5~1.5~#880000~1~0~#880000~gge2691~0", + "R~405~135~2~2~70~280~#880000~1~0~none~gge2694~0~" + ], + "BBox": { + "x": 392.6, + "y": 134.5, + "width": 94.7, + "height": 280.5 + }, + "colors": [] + }, + "datastrid": "7a54259e5ce940e09b0c72ce20c4952e", + "verify": true, + "SMT": true, + "jlcOnSale": 1, + "writable": false, + "isFavorite": false, + "packageDetail": { + "uuid": "c37ee20a3ccf469682bdbec93989c575", + "title": "WIFIM-SMD_ESP32-C3-MINI-1", + "docType": 4, + "updateTime": 1673096246, + "owner": { + "uuid": "0819f05c4eef4c71ace90d822a990e87", + "username": "lcsc", + "nickname": "LCSC", + "avatar": "//image.lceda.cn/avatars/2018/6/kFlrasi7W06gTdBLAqW3fkrqbDhbowynuSzkjqso.png" + }, + "datastrid": "f863f03573f94934b37f98f5d9887772", + "writable": false, + "dataStr": { + "head": { + "docType": "4", + "editorVersion": "6.5.3", + "newgId": true, + "c_para": { + "package": "WIFIM-SMD_ESP32-C3-MINI-1", + "pre": "U?", + "Contributor": "lcsc", + "link": "https://atta.szlcsc.com/upload/public/pdf/source/20210720/C2838502_820C448AE0C4DF1D4546A4A5DCA77C73.pdf", + "3DModel": "WIFIM-SMD_ESP32-C3-MINI-1" + }, + "hasIdFlag": true, + "x": 4000, + "y": 3000, + "utime": 1650779015, + "uuid": "c37ee20a3ccf469682bdbec93989c575", + "importFlag": 0, + "transformList": "", + "uuid_3d": "e6c0ab1fee8146ad90841808bb67d354" + }, + "canvas": "CA~1000~1000~#000000~yes~#FFFFFF~3.149606~1000~1000~line~0.393701~mm~1~45~visible~0.5~4000~3000~0~none", + "shape": [ + "CIRCLE~3974.0157~2956.6928~0.1181~0.2362~101~gge1375~0~~", + "CIRCLE~3971.654~2984.252~0.787~1.5748~12~gge580~0~~", + "SOLIDREGION~12~~M 3973.622 2956.2992 L 3973.622 3022.441 L 4026.378 3022.441 L 4026.378 2956.2992 L 3974.0157 2956.2992 L 3974.4094 2957.0866 L 4025.5906 2957.0866 L 4025.5906 3021.6536 L 3974.4094 3021.6536 L 3974.4094 2957.0866 Z~solid~gge1179~~~~0", + "SOLIDREGION~12~~M 3974.4094 2977.559 L 3974.4094 2978.3464 L 4025.5906 2978.3464 L4025.5906,2977.559 Z~solid~gge1182~~~~0", + "SOLIDREGION~99~~M 3974.0157 3022.0471 L 3974.0157 2956.6928 L 4025.9842 2956.6928 L 4025.9842 3022.0471 Z~solid~gge520~~~~0", + "TRACK~1~3~~4025.9843 3022.0472 4025.9844 2956.6927~gge495~0", + "TRACK~1~3~~4025.9844 2977.9528 3974.0156 2977.9528~gge516~0", + "TRACK~1~3~~3974.0156 2956.6928 4025.9844 2956.6928~gge497~0", + "TRACK~1~3~~3974.0157 3022.0472 3974.0156 2956.6928~gge493~0", + "TRACK~1~3~~3974.0157 3022.0472 4025.9843 3022.0472~gge491~0", + "CIRCLE~3972.441~2984.252~0.394~1~3~gge517~0~~", + "PAD~RECT~3976.772~2984.252~1.5748~3.1496~1~~1~0~3975.1969 2985.0394 3975.1969 2983.4646 3978.3465 2983.4646 3978.3465 2985.0394~90~gge12~0~~Y~0~0~0.1969~3976.7717,2984.252", + "PAD~RECT~3976.772~2987.402~1.5748~3.1496~1~~2~0~3975.1969 2988.189 3975.1969 2986.6142 3978.3465 2986.6142 3978.3465 2988.189~90~gge28~0~~Y~0~0~0.1969~3976.7717,2987.4016", + "PAD~RECT~3976.772~2990.551~1.5748~3.1496~1~~3~0~3975.1969 2991.3386 3975.1969 2989.7638 3978.3465 2989.7638 3978.3465 2991.3386~90~gge36~0~~Y~0~0~0.1969~3976.7717,2990.5512", + "PAD~RECT~3976.772~2993.701~1.5748~3.1496~1~~4~0~3975.1969 2994.4882 3975.1969 2992.9134 3978.3465 2992.9134 3978.3465 2994.4882~90~gge44~0~~Y~0~0~0.1969~3976.7717,2993.7008", + "PAD~RECT~3976.772~2996.85~1.5748~3.1496~1~~5~0~3975.1969 2997.6378 3975.1969 2996.063 3978.3465 2996.063 3978.3465 2997.6378~90~gge52~0~~Y~0~0~0.1969~3976.7717,2996.8504", + "PAD~RECT~3976.772~3000~1.5748~3.1496~1~~6~0~3975.1969 3000.7874 3975.1969 2999.2126 3978.3465 2999.2126 3978.3465 3000.7874~90~gge60~0~~Y~0~0~0.1969~3976.7717,3000", + "PAD~RECT~3976.772~3003.15~1.5748~3.1496~1~~7~0~3975.1969 3003.937 3975.1969 3002.3622 3978.3465 3002.3622 3978.3465 3003.937~90~gge68~0~~Y~0~0~0.1969~3976.7717,3003.1496", + "PAD~RECT~3976.772~3006.299~1.5748~3.1496~1~~8~0~3975.1969 3007.0866 3975.1969 3005.5118 3978.3465 3005.5118 3978.3465 3007.0866~90~gge76~0~~Y~0~0~0.1969~3976.7717,3006.2992", + "PAD~RECT~3976.772~3009.449~1.5748~3.1496~1~~9~0~3975.1969 3010.2362 3975.1969 3008.6614 3978.3465 3008.6614 3978.3465 3010.2362~90~gge84~0~~Y~0~0~0.1969~3976.7717,3009.4488", + "PAD~RECT~3976.772~3012.598~1.5748~3.1496~1~~10~0~3975.1969 3013.3858 3975.1969 3011.811 3978.3465 3011.811 3978.3465 3013.3858~90~gge92~0~~Y~0~0~0.1969~3976.7717,3012.5984", + "PAD~RECT~3976.772~3015.748~1.5748~3.1496~1~~11~0~3975.1969 3016.5354 3975.1969 3014.9606 3978.3465 3014.9606 3978.3465 3016.5354~90~gge100~0~~Y~0~0~0.1969~3976.7717,3015.748", + "PAD~RECT~3981.102~3019.291~1.5748~3.1496~1~~12~0~3981.8898 3020.8661 3980.315 3020.8661 3980.315 3017.7165 3981.8898 3017.7165~180~gge114~0~~Y~0~0~0.1969~3981.1024,3019.2913", + "PAD~RECT~3984.252~3019.291~1.5748~3.1496~1~~13~0~3985.0394 3020.8661 3983.4646 3020.8661 3983.4646 3017.7165 3985.0394 3017.7165~180~gge122~0~~Y~0~0~0.1969~3984.252,3019.2913", + "PAD~RECT~3987.402~3019.291~1.5748~3.1496~1~~14~0~3988.189 3020.8661 3986.6142 3020.8661 3986.6142 3017.7165 3988.189 3017.7165~180~gge130~0~~Y~0~0~0.1969~3987.4016,3019.2913", + "PAD~RECT~3990.551~3019.291~1.5748~3.1496~1~~15~0~3991.3386 3020.8661 3989.7638 3020.8661 3989.7638 3017.7165 3991.3386 3017.7165~180~gge138~0~~Y~0~0~0.1969~3990.5512,3019.2913", + "PAD~RECT~3993.701~3019.291~1.5748~3.1496~1~~16~0~3994.4882 3020.8661 3992.9134 3020.8661 3992.9134 3017.7165 3994.4882 3017.7165~180~gge146~0~~Y~0~0~0.1969~3993.7008,3019.2913", + "PAD~RECT~3996.85~3019.291~1.5748~3.1496~1~~17~0~3997.6378 3020.8661 3996.063 3020.8661 3996.063 3017.7165 3997.6378 3017.7165~180~gge154~0~~Y~0~0~0.1969~3996.8504,3019.2913", + "PAD~RECT~4000~3019.291~1.5748~3.1496~1~~18~0~4000.7874 3020.8661 3999.2126 3020.8661 3999.2126 3017.7165 4000.7874 3017.7165~180~gge162~0~~Y~0~0~0.1969~4000,3019.2913", + "PAD~RECT~4003.15~3019.291~1.5748~3.1496~1~~19~0~4003.937 3020.8661 4002.3622 3020.8661 4002.3622 3017.7165 4003.937 3017.7165~180~gge170~0~~Y~0~0~0.1969~4003.1496,3019.2913", + "PAD~RECT~4006.299~3019.291~1.5748~3.1496~1~~20~0~4007.0866 3020.8661 4005.5118 3020.8661 4005.5118 3017.7165 4007.0866 3017.7165~180~gge178~0~~Y~0~0~0.1969~4006.2992,3019.2913", + "PAD~RECT~4009.449~3019.291~1.5748~3.1496~1~~21~0~4010.2362 3020.8661 4008.6614 3020.8661 4008.6614 3017.7165 4010.2362 3017.7165~180~gge186~0~~Y~0~0~0.1969~4009.4488,3019.2913", + "PAD~RECT~4012.598~3019.291~1.5748~3.1496~1~~22~0~4013.3858 3020.8661 4011.811 3020.8661 4011.811 3017.7165 4013.3858 3017.7165~180~gge194~0~~Y~0~0~0.1969~4012.5984,3019.2913", + "PAD~RECT~4015.748~3019.291~1.5748~3.1496~1~~23~0~4016.5354 3020.8661 4014.9606 3020.8661 4014.9606 3017.7165 4016.5354 3017.7165~180~gge202~0~~Y~0~0~0.1969~4015.748,3019.2913", + "PAD~RECT~4018.898~3019.291~1.5748~3.1496~1~~24~0~4019.685 3020.8661 4018.1102 3020.8661 4018.1102 3017.7165 4019.685 3017.7165~180~gge210~0~~Y~0~0~0.1969~4018.8976,3019.2913", + "PAD~RECT~4023.228~3015.748~1.5748~3.1496~1~~25~0~4024.8031 3014.9606 4024.8031 3016.5354 4021.6535 3016.5354 4021.6535 3014.9606~270~gge218~0~~Y~0~0~0.1969~4023.2283,3015.748", + "PAD~RECT~4023.228~3012.598~1.5748~3.1496~1~~26~0~4024.8031 3011.811 4024.8031 3013.3858 4021.6535 3013.3858 4021.6535 3011.811~270~gge226~0~~Y~0~0~0.1969~4023.2283,3012.5984", + "PAD~RECT~4023.228~3009.449~1.5748~3.1496~1~~27~0~4024.8031 3008.6614 4024.8031 3010.2362 4021.6535 3010.2362 4021.6535 3008.6614~270~gge234~0~~Y~0~0~0.1969~4023.2283,3009.4488", + "PAD~RECT~4023.228~3006.299~1.5748~3.1496~1~~28~0~4024.8031 3005.5118 4024.8031 3007.0866 4021.6535 3007.0866 4021.6535 3005.5118~270~gge242~0~~Y~0~0~0.1969~4023.2283,3006.2992", + "PAD~RECT~4023.228~3003.15~1.5748~3.1496~1~~29~0~4024.8031 3002.3622 4024.8031 3003.937 4021.6535 3003.937 4021.6535 3002.3622~270~gge250~0~~Y~0~0~0.1969~4023.2283,3003.1496", + "PAD~RECT~4023.228~3000~1.5748~3.1496~1~~30~0~4024.8031 2999.2126 4024.8031 3000.7874 4021.6535 3000.7874 4021.6535 2999.2126~270~gge258~0~~Y~0~0~0.1969~4023.2283,3000", + "PAD~RECT~4023.228~2996.85~1.5748~3.1496~1~~31~0~4024.8031 2996.063 4024.8031 2997.6378 4021.6535 2997.6378 4021.6535 2996.063~270~gge266~0~~Y~0~0~0.1969~4023.2283,2996.8504", + "PAD~RECT~4023.228~2993.701~1.5748~3.1496~1~~32~0~4024.8031 2992.9134 4024.8031 2994.4882 4021.6535 2994.4882 4021.6535 2992.9134~270~gge274~0~~Y~0~0~0.1969~4023.2283,2993.7008", + "PAD~RECT~4023.228~2990.551~1.5748~3.1496~1~~33~0~4024.8031 2989.7638 4024.8031 2991.3386 4021.6535 2991.3386 4021.6535 2989.7638~270~gge282~0~~Y~0~0~0.1969~4023.2283,2990.5512", + "PAD~RECT~4023.228~2987.402~1.5748~3.1496~1~~34~0~4024.8031 2986.6142 4024.8031 2988.189 4021.6535 2988.189 4021.6535 2986.6142~270~gge290~0~~Y~0~0~0.1969~4023.2283,2987.4016", + "PAD~RECT~4023.228~2984.252~1.5748~3.1496~1~~35~0~4024.8031 2983.4646 4024.8031 2985.0394 4021.6535 2985.0394 4021.6535 2983.4646~270~gge298~0~~Y~0~0~0.1969~4023.2283,2984.252", + "PAD~RECT~4018.898~2980.709~1.5748~3.1496~1~~36~0~4018.1102 2979.1339 4019.685 2979.1339 4019.685 2982.2835 4018.1102 2982.2835~0~gge312~0~~Y~0~0~0.1969~4018.8976,2980.7087", + "PAD~RECT~4015.748~2980.709~1.5748~3.1496~1~~37~0~4014.9606 2979.1339 4016.5354 2979.1339 4016.5354 2982.2835 4014.9606 2982.2835~0~gge320~0~~Y~0~0~0.1969~4015.748,2980.7087", + "PAD~RECT~4012.598~2980.709~1.5748~3.1496~1~~38~0~4011.811 2979.1339 4013.3858 2979.1339 4013.3858 2982.2835 4011.811 2982.2835~0~gge328~0~~Y~0~0~0.1969~4012.5984,2980.7087", + "PAD~RECT~4009.449~2980.709~1.5748~3.1496~1~~39~0~4008.6614 2979.1339 4010.2362 2979.1339 4010.2362 2982.2835 4008.6614 2982.2835~0~gge336~0~~Y~0~0~0.1969~4009.4488,2980.7087", + "PAD~RECT~4006.299~2980.709~1.5748~3.1496~1~~40~0~4005.5118 2979.1339 4007.0866 2979.1339 4007.0866 2982.2835 4005.5118 2982.2835~0~gge344~0~~Y~0~0~0.1969~4006.2992,2980.7087", + "PAD~RECT~4003.15~2980.709~1.5748~3.1496~1~~41~0~4002.3622 2979.1339 4003.937 2979.1339 4003.937 2982.2835 4002.3622 2982.2835~0~gge352~0~~Y~0~0~0.1969~4003.1496,2980.7087", + "PAD~RECT~4000~2980.709~1.5748~3.1496~1~~42~0~3999.2126 2979.1339 4000.7874 2979.1339 4000.7874 2982.2835 3999.2126 2982.2835~0~gge360~0~~Y~0~0~0.1969~4000,2980.7087", + "PAD~RECT~3996.85~2980.709~1.5748~3.1496~1~~43~0~3996.063 2979.1339 3997.6378 2979.1339 3997.6378 2982.2835 3996.063 2982.2835~0~gge368~0~~Y~0~0~0.1969~3996.8504,2980.7087", + "PAD~RECT~3993.701~2980.709~1.5748~3.1496~1~~44~0~3992.9134 2979.1339 3994.4882 2979.1339 3994.4882 2982.2835 3992.9134 2982.2835~0~gge376~0~~Y~0~0~0.1969~3993.7008,2980.7087", + "PAD~RECT~3990.551~2980.709~1.5748~3.1496~1~~45~0~3989.7638 2979.1339 3991.3386 2979.1339 3991.3386 2982.2835 3989.7638 2982.2835~0~gge384~0~~Y~0~0~0.1969~3990.5512,2980.7087", + "PAD~RECT~3987.402~2980.709~1.5748~3.1496~1~~46~0~3986.6142 2979.1339 3988.189 2979.1339 3988.189 2982.2835 3986.6142 2982.2835~0~gge392~0~~Y~0~0~0.1969~3987.4016,2980.7087", + "PAD~RECT~3984.252~2980.709~1.5748~3.1496~1~~47~0~3983.4646 2979.1339 3985.0394 2979.1339 3985.0394 2982.2835 3983.4646 2982.2835~0~gge400~0~~Y~0~0~0.1969~3984.252,2980.7087", + "PAD~RECT~3981.102~2980.709~1.5748~3.1496~1~~48~0~3980.315 2979.1339 3981.8898 2979.1339 3981.8898 2982.2835 3980.315 2982.2835~0~gge408~0~~Y~0~0~0.1969~3981.1024,2980.7087", + "PAD~RECT~4023.425~2980.512~2.7559~2.7559~1~~50~0~4022.0472 2979.1338 4024.8032 2979.1338 4024.8032 2981.8898 4022.0472 2981.8898~0~gge436~0~~Y~0~0~0.1969~4023.4252,2980.5118", + "PAD~RECT~4023.425~3019.488~2.7559~2.7559~1~~51~0~4022.0472 3018.1102 4024.8032 3018.1102 4024.8032 3020.8662 4022.0472 3020.8662~0~gge450~0~~Y~0~0~0.1969~4023.4252,3019.4882", + "PAD~RECT~3976.575~3019.488~2.7559~2.7559~1~~52~0~3975.1968 3018.1102 3977.9528 3018.1102 3977.9528 3020.8662 3975.1968 3020.8662~0~gge458~0~~Y~0~0~0.1969~3976.5748,3019.4882", + "PAD~RECT~3976.575~2980.512~2.7559~2.7559~1~~53~0~3975.1968 2979.1338 3977.9528 2979.1338 3977.9528 2981.8898 3975.1968 2981.8898~0~gge466~0~~Y~0~0~0.1969~3976.5748,2980.5118", + "PAD~POLYGON~3992.224~2992.224~5.7087~5.7087~1~~49~0~3989.3696 2991.7325 3991.7318 2989.3703 3995.0782 2989.3703 3995.0782 2995.0789 3989.3696 2995.0789~0~gge1152~0~~Y~0~0~0.1969~3992.2238,2992.2245", + "PAD~RECT~4007.775~3007.776~5.7087~5.7087~1~~49~0~4004.9208 3004.9215 4010.6294 3004.9215 4010.6294 3010.6301 4004.9208 3010.6301~0~gge1155~0~~Y~0~0~0.1969~4007.7752,3007.7759", + "PAD~RECT~4000~3007.776~5.7087~5.7087~1~~49~0~3997.1452 3004.9215 4002.8538 3004.9215 4002.8538 3010.6301 3997.1452 3010.6301~0~gge1158~0~~Y~0~0~0.1969~3999.9995,3007.7759", + "PAD~RECT~3992.224~3007.776~5.7087~5.7087~1~~49~0~3989.3696 3004.9215 3995.0782 3004.9215 3995.0782 3010.6301 3989.3696 3010.6301~0~gge1161~0~~Y~0~0~0.1969~3992.2238,3007.7759", + "PAD~RECT~3992.224~3000~5.7087~5.7087~1~~49~0~3989.3696 2997.1459 3995.0782 2997.1459 3995.0782 3002.8545 3989.3696 3002.8545~0~gge1164~0~~Y~0~0~0.1969~3992.2238,3000.0002", + "PAD~RECT~4000~2992.225~5.7087~5.7087~1~~49~0~3997.1452 2989.3703 4002.8538 2989.3703 4002.8538 2995.0789 3997.1452 2995.0789~0~gge1167~0~~Y~0~0~0.1969~3999.9995,2992.2245", + "PAD~RECT~4007.775~2992.225~5.7087~5.7087~1~~49~0~4004.9208 2989.3703 4010.6294 2989.3703 4010.6294 2995.0789 4004.9208 2995.0789~0~gge1170~0~~Y~0~0~0.1969~4007.7752,2992.2245", + "PAD~RECT~4007.775~3000~5.7087~5.7087~1~~49~0~4004.9208 2997.1459 4010.6294 2997.1459 4010.6294 3002.8545 4004.9208 3002.8545~0~gge1173~0~~Y~0~0~0.1969~4007.7752,3000.0002", + "PAD~RECT~4000~3000~5.7087~5.7087~1~~49~0~3997.1452 2997.1459 4002.8538 2997.1459 4002.8538 3002.8545 3997.1452 3002.8545~0~gge1176~0~~Y~0~0~0.1969~3999.9995,3000.0002", + "SOLIDREGION~100~~M 3997.1452 2997.1459 L 4002.8538 2997.1459 L 4002.8538 3002.8545 L 3997.1452 3002.8545 Z~solid~gge1192~~~~0", + "SOLIDREGION~100~~M 4004.9208 2997.1459 L 4010.6294 2997.1459 L 4010.6294 3002.8545 L 4004.9208 3002.8545 Z~solid~gge1195~~~~0", + "SOLIDREGION~100~~M 4004.9208 2989.3703 L 4010.6294 2989.3703 L 4010.6294 2995.0789 L 4004.9208 2995.0789 Z~solid~gge1198~~~~0", + "SOLIDREGION~100~~M 3997.1452 2989.3703 L 4002.8538 2989.3703 L 4002.8538 2995.0789 L 3997.1452 2995.0789 Z~solid~gge1201~~~~0", + "SOLIDREGION~100~~M 3989.3696 2997.1459 L 3995.0782 2997.1459 L 3995.0782 3002.8545 L 3989.3696 3002.8545 Z~solid~gge1204~~~~0", + "SOLIDREGION~100~~M 3989.3696 3004.9215 L 3995.0782 3004.9215 L 3995.0782 3010.6301 L 3989.3696 3010.6301 Z~solid~gge1207~~~~0", + "SOLIDREGION~100~~M 3997.1452 3004.9215 L 4002.8538 3004.9215 L 4002.8538 3010.6301 L 3997.1452 3010.6301 Z~solid~gge1210~~~~0", + "SOLIDREGION~100~~M 4004.9208 3004.9215 L 4010.6294 3004.9215 L 4010.6294 3010.6301 L 4004.9208 3010.6301 Z~solid~gge1213~~~~0", + "SOLIDREGION~100~~M 3989.3696 2991.7325 L 3991.7318 2989.3703 L 3995.0782 2989.3703 L 3995.0782 2995.0789 L 3989.3696 2995.0789 Z~solid~gge1216~~~~0", + "SOLIDREGION~100~~M 3975.1968 2979.1338 L 3977.9528 2979.1338 L 3977.9528 2981.8898 L 3975.1968 2981.8898 Z~solid~gge1219~~~~0", + "SOLIDREGION~100~~M 3975.1968 3018.1102 L 3977.9528 3018.1102 L 3977.9528 3020.8662 L 3975.1968 3020.8662 Z~solid~gge1222~~~~0", + "SOLIDREGION~100~~M 4022.0472 3018.1102 L 4024.8032 3018.1102 L 4024.8032 3020.8662 L 4022.0472 3020.8662 Z~solid~gge1225~~~~0", + "SOLIDREGION~100~~M 4022.0472 2979.1338 L 4024.8032 2979.1338 L 4024.8032 2981.8898 L 4022.0472 2981.8898 Z~solid~gge1228~~~~0", + "SOLIDREGION~100~~M 3980.315 2979.1339 L 3981.8898 2979.1339 L 3981.8898 2982.2835 L 3980.315 2982.2835 Z~solid~gge1231~~~~0", + "SOLIDREGION~100~~M 3983.4646 2979.1339 L 3985.0394 2979.1339 L 3985.0394 2982.2835 L 3983.4646 2982.2835 Z~solid~gge1234~~~~0", + "SOLIDREGION~100~~M 3986.6142 2979.1339 L 3988.189 2979.1339 L 3988.189 2982.2835 L 3986.6142 2982.2835 Z~solid~gge1237~~~~0", + "SOLIDREGION~100~~M 3989.7638 2979.1339 L 3991.3386 2979.1339 L 3991.3386 2982.2835 L 3989.7638 2982.2835 Z~solid~gge1240~~~~0", + "SOLIDREGION~100~~M 3992.9134 2979.1339 L 3994.4882 2979.1339 L 3994.4882 2982.2835 L 3992.9134 2982.2835 Z~solid~gge1243~~~~0", + "SOLIDREGION~100~~M 3996.063 2979.1339 L 3997.6378 2979.1339 L 3997.6378 2982.2835 L 3996.063 2982.2835 Z~solid~gge1246~~~~0", + "SOLIDREGION~100~~M 3999.2126 2979.1339 L 4000.7874 2979.1339 L 4000.7874 2982.2835 L 3999.2126 2982.2835 Z~solid~gge1249~~~~0", + "SOLIDREGION~100~~M 4002.3622 2979.1339 L 4003.937 2979.1339 L 4003.937 2982.2835 L 4002.3622 2982.2835 Z~solid~gge1252~~~~0", + "SOLIDREGION~100~~M 4005.5118 2979.1339 L 4007.0866 2979.1339 L 4007.0866 2982.2835 L 4005.5118 2982.2835 Z~solid~gge1255~~~~0", + "SOLIDREGION~100~~M 4008.6614 2979.1339 L 4010.2362 2979.1339 L 4010.2362 2982.2835 L 4008.6614 2982.2835 Z~solid~gge1258~~~~0", + "SOLIDREGION~100~~M 4011.811 2979.1339 L 4013.3858 2979.1339 L 4013.3858 2982.2835 L 4011.811 2982.2835 Z~solid~gge1261~~~~0", + "SOLIDREGION~100~~M 4014.9606 2979.1339 L 4016.5354 2979.1339 L 4016.5354 2982.2835 L 4014.9606 2982.2835 Z~solid~gge1264~~~~0", + "SOLIDREGION~100~~M 4018.1102 2979.1339 L 4019.685 2979.1339 L 4019.685 2982.2835 L 4018.1102 2982.2835 Z~solid~gge1267~~~~0", + "SOLIDREGION~100~~M 4024.8031 2983.4646 L 4024.8031 2985.0394 L 4021.6535 2985.0394 L 4021.6535 2983.4646 Z~solid~gge1270~~~~0", + "SOLIDREGION~100~~M 4024.8031 2986.6142 L 4024.8031 2988.189 L 4021.6535 2988.189 L 4021.6535 2986.6142 Z~solid~gge1273~~~~0", + "SOLIDREGION~100~~M 4024.8031 2989.7638 L 4024.8031 2991.3386 L 4021.6535 2991.3386 L 4021.6535 2989.7638 Z~solid~gge1276~~~~0", + "SOLIDREGION~100~~M 4024.8031 2992.9134 L 4024.8031 2994.4882 L 4021.6535 2994.4882 L 4021.6535 2992.9134 Z~solid~gge1279~~~~0", + "SOLIDREGION~100~~M 4024.8031 2996.063 L 4024.8031 2997.6378 L 4021.6535 2997.6378 L 4021.6535 2996.063 Z~solid~gge1282~~~~0", + "SOLIDREGION~100~~M 4024.8031 2999.2126 L 4024.8031 3000.7874 L 4021.6535 3000.7874 L 4021.6535 2999.2126 Z~solid~gge1285~~~~0", + "SOLIDREGION~100~~M 4024.8031 3002.3622 L 4024.8031 3003.937 L 4021.6535 3003.937 L 4021.6535 3002.3622 Z~solid~gge1288~~~~0", + "SOLIDREGION~100~~M 4024.8031 3005.5118 L 4024.8031 3007.0866 L 4021.6535 3007.0866 L 4021.6535 3005.5118 Z~solid~gge1291~~~~0", + "SOLIDREGION~100~~M 4024.8031 3008.6614 L 4024.8031 3010.2362 L 4021.6535 3010.2362 L 4021.6535 3008.6614 Z~solid~gge1294~~~~0", + "SOLIDREGION~100~~M 4024.8031 3011.811 L 4024.8031 3013.3858 L 4021.6535 3013.3858 L 4021.6535 3011.811 Z~solid~gge1297~~~~0", + "SOLIDREGION~100~~M 4024.8031 3014.9606 L 4024.8031 3016.5354 L 4021.6535 3016.5354 L 4021.6535 3014.9606 Z~solid~gge1300~~~~0", + "SOLIDREGION~100~~M 4019.685 3020.8661 L 4018.1102 3020.8661 L 4018.1102 3017.7165 L 4019.685 3017.7165 Z~solid~gge1303~~~~0", + "SOLIDREGION~100~~M 4016.5354 3020.8661 L 4014.9606 3020.8661 L 4014.9606 3017.7165 L 4016.5354 3017.7165 Z~solid~gge1306~~~~0", + "SOLIDREGION~100~~M 4013.3858 3020.8661 L 4011.811 3020.8661 L 4011.811 3017.7165 L 4013.3858 3017.7165 Z~solid~gge1309~~~~0", + "SOLIDREGION~100~~M 4010.2362 3020.8661 L 4008.6614 3020.8661 L 4008.6614 3017.7165 L 4010.2362 3017.7165 Z~solid~gge1312~~~~0", + "SOLIDREGION~100~~M 4007.0866 3020.8661 L 4005.5118 3020.8661 L 4005.5118 3017.7165 L 4007.0866 3017.7165 Z~solid~gge1315~~~~0", + "SOLIDREGION~100~~M 4003.937 3020.8661 L 4002.3622 3020.8661 L 4002.3622 3017.7165 L 4003.937 3017.7165 Z~solid~gge1318~~~~0", + "SOLIDREGION~100~~M 4000.7874 3020.8661 L 3999.2126 3020.8661 L 3999.2126 3017.7165 L 4000.7874 3017.7165 Z~solid~gge1321~~~~0", + "SOLIDREGION~100~~M 3997.6378 3020.8661 L 3996.063 3020.8661 L 3996.063 3017.7165 L 3997.6378 3017.7165 Z~solid~gge1324~~~~0", + "SOLIDREGION~100~~M 3994.4882 3020.8661 L 3992.9134 3020.8661 L 3992.9134 3017.7165 L 3994.4882 3017.7165 Z~solid~gge1327~~~~0", + "SOLIDREGION~100~~M 3991.3386 3020.8661 L 3989.7638 3020.8661 L 3989.7638 3017.7165 L 3991.3386 3017.7165 Z~solid~gge1330~~~~0", + "SOLIDREGION~100~~M 3988.189 3020.8661 L 3986.6142 3020.8661 L 3986.6142 3017.7165 L 3988.189 3017.7165 Z~solid~gge1333~~~~0", + "SOLIDREGION~100~~M 3985.0394 3020.8661 L 3983.4646 3020.8661 L 3983.4646 3017.7165 L 3985.0394 3017.7165 Z~solid~gge1336~~~~0", + "SOLIDREGION~100~~M 3981.8898 3020.8661 L 3980.315 3020.8661 L 3980.315 3017.7165 L 3981.8898 3017.7165 Z~solid~gge1339~~~~0", + "SOLIDREGION~100~~M 3975.1969 3016.5354 L 3975.1969 3014.9606 L 3978.3465 3014.9606 L 3978.3465 3016.5354 Z~solid~gge1342~~~~0", + "SOLIDREGION~100~~M 3975.1969 3013.3858 L 3975.1969 3011.811 L 3978.3465 3011.811 L 3978.3465 3013.3858 Z~solid~gge1345~~~~0", + "SOLIDREGION~100~~M 3975.1969 3010.2362 L 3975.1969 3008.6614 L 3978.3465 3008.6614 L 3978.3465 3010.2362 Z~solid~gge1348~~~~0", + "SOLIDREGION~100~~M 3975.1969 3007.0866 L 3975.1969 3005.5118 L 3978.3465 3005.5118 L 3978.3465 3007.0866 Z~solid~gge1351~~~~0", + "SOLIDREGION~100~~M 3975.1969 3003.937 L 3975.1969 3002.3622 L 3978.3465 3002.3622 L 3978.3465 3003.937 Z~solid~gge1354~~~~0", + "SOLIDREGION~100~~M 3975.1969 3000.7874 L 3975.1969 2999.2126 L 3978.3465 2999.2126 L 3978.3465 3000.7874 Z~solid~gge1357~~~~0", + "SOLIDREGION~100~~M 3975.1969 2997.6378 L 3975.1969 2996.063 L 3978.3465 2996.063 L 3978.3465 2997.6378 Z~solid~gge1360~~~~0", + "SOLIDREGION~100~~M 3975.1969 2994.4882 L 3975.1969 2992.9134 L 3978.3465 2992.9134 L 3978.3465 2994.4882 Z~solid~gge1363~~~~0", + "SOLIDREGION~100~~M 3975.1969 2991.3386 L 3975.1969 2989.7638 L 3978.3465 2989.7638 L 3978.3465 2991.3386 Z~solid~gge1366~~~~0", + "SOLIDREGION~100~~M 3975.1969 2988.189 L 3975.1969 2986.6142 L 3978.3465 2986.6142 L 3978.3465 2988.189 Z~solid~gge1369~~~~0", + "SOLIDREGION~100~~M 3975.1969 2985.0394 L 3975.1969 2983.4646 L 3978.3465 2983.4646 L 3978.3465 2985.0394 Z~solid~gge1372~~~~0", + "SVGNODE~{\"gId\":\"g1_outline\",\"nodeName\":\"g\",\"nodeType\":1,\"layerid\":\"19\",\"attrs\":{\"c_width\":\"51.9684\",\"c_height\":\"65.3542\",\"c_rotation\":\"0,0,0\",\"z\":\"0\",\"c_origin\":\"4000,2989.311\",\"uuid\":\"789e2235438340f8bef14c336f136f9e\",\"c_etype\":\"outline3D\",\"id\":\"g1_outline\",\"title\":\"WIFIM-SMD_ESP32-C3-MINI-1\",\"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\":\"3974.0158 2956.6339 3974.0158 2982.0276 3974.0158 2982.815 3974.0158 2985.7677 3974.0158 2989.5079 3974.0158 2992.0669 3974.0158 2994.7047 3974.0158 2995.4921 3974.0158 2998.3661 3974.0158 3001.5157 3974.0158 3003.3267 3974.0158 3007.8149 3974.0158 3010.374 3974.0158 3011.1614 3974.0158 3013.6417 3974.0158 3016.0039 3974.0158 3016.2401 3974.0158 3017.8543 3974.0158 3021.3976 3974.0158 3021.9881 3978.1497 3021.9881 3979.3308 3021.9881 3982.6772 3021.9881 3985.8268 3021.9881 3989.567 3021.9881 3992.126 3021.9881 3994.7638 3021.9881 3995.5512 3021.9881 3998.4252 3021.9881 4001.5748 3021.9881 4003.3858 3021.9881 4008.5433 3021.9881 4014.1732 3021.9881 4017.3228 3021.9881 4020.6693 3021.9881 4021.8504 3021.9881 4025.3937 3021.9881 4025.9842 3021.9881 4025.9842 3021.3976 4025.9842 3017.8543 4025.9842 3016.2401 4025.9842 3016.0039 4025.9842 3013.6417 4025.9842 3011.1614 4025.9842 3010.374 4025.9842 3007.8149 4025.9842 3003.3267 4025.9842 3001.5157 4025.9842 2998.3661 4025.9842 2995.4921 4025.9842 2994.7047 4025.9842 2992.0669 4025.9842 2989.5079 4025.9842 2985.7677 4025.9842 2982.815 4025.9842 2982.0276 4025.9842 2956.6339 4025.3937 2956.6339 4021.8504 2956.6339 4020.6693 2956.6339 4017.3228 2956.6339 4014.1732 2956.6339 4008.5433 2956.6339 4003.3858 2956.6339 4001.5748 2956.6339 3998.4252 2956.6339 3995.5512 2956.6339 3994.7638 2956.6339 3992.126 2956.6339 3989.567 2956.6339 3985.8268 2956.6339 3982.6772 2956.6339 3979.3308 2956.6339 3978.1497 2956.6339 3974.0158 2956.6339 3974.0158 2956.6339\"}}]}" + ], + "layers": [ + "1~TopLayer~#FF0000~true~false~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~#C0C0C0~true~false~true~", + "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~#999966~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~true~true~", + "101~ComponentMarkingLayer~#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": 3970.9, + "y": 2956.3, + "width": 55.5, + "height": 66.1 + }, + "netColors": [] + } + }, + "_objMetadata": { + "bounds": { + "min": { + "x": -6.6, + "y": -8.3, + "z": 0 + }, + "max": { + "x": 6.6, + "y": 8.3, + "z": 2.5 + } + } + } +} \ No newline at end of file diff --git a/tests/convert-to-ts/C2934569-to-ts.test.ts b/tests/convert-to-ts/C2934569-to-ts.test.ts new file mode 100644 index 00000000..cf83df5b --- /dev/null +++ b/tests/convert-to-ts/C2934569-to-ts.test.ts @@ -0,0 +1,34 @@ +import { it, expect } from "bun:test" +import chipRawEasy from "../assets/C2934569.raweasy.json" +import { convertBetterEasyToTsx } from "lib/websafe/convert-to-typescript-component" +import { EasyEdaJsonSchema } from "lib/schemas/easy-eda-json-schema" +import { convertEasyEdaJsonToCircuitJson } from "lib/convert-easyeda-json-to-tscircuit-soup-json" +import { runTscircuitCode } from "tscircuit" +import { convertCircuitJsonToPcbSvg } from "circuit-to-svg" + +it("should convert C2934569 into typescript with keepouts", async () => { + const betterEasy = EasyEdaJsonSchema.parse(chipRawEasy) + const result = await convertBetterEasyToTsx({ + betterEasy, + }) + + expect(result).not.toContain("milmm") + expect(result).not.toContain("NaNmm") + expect(result).toContain(" e.type === "pcb_keepout", + ) + expect(convertedKeepouts.length).toBeGreaterThan(0) + + const generatedCircuitJson = await runTscircuitCode(result) + const generatedKeepouts = generatedCircuitJson.filter( + (e) => e.type === "pcb_keepout", + ) + expect(generatedKeepouts.length).toBeGreaterThan(0) + + expect(convertCircuitJsonToPcbSvg(generatedCircuitJson)).toMatchSvgSnapshot( + import.meta.path, + ) +}, 30000) diff --git a/tests/convert-to-ts/__snapshots__/C2934569-to-ts.snap.svg b/tests/convert-to-ts/__snapshots__/C2934569-to-ts.snap.svg new file mode 100644 index 00000000..149783f7 --- /dev/null +++ b/tests/convert-to-ts/__snapshots__/C2934569-to-ts.snap.svg @@ -0,0 +1 @@ + \ No newline at end of file