copperflow 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -4
- package/dist/app/assets/NewPartDialog-PSXlbLR2.js +1 -0
- package/dist/app/assets/PackagesDialog-C8ZyWl-g.css +1 -0
- package/dist/app/assets/PackagesDialog-DmIT8b2D.js +2 -0
- package/dist/app/assets/{VerifyPartDialog-Ey6xpQ_U.js → VerifyPartDialog-KiW1nDnZ.js} +2 -2
- package/dist/app/assets/footprint-preview-oJ27yBAB.js +160 -0
- package/dist/app/assets/index-CArKmuM_.css +1 -0
- package/dist/app/assets/index-Yj6ATP2T.js +20 -0
- package/dist/app/assets/texture-worker-e8zKC6dv.js +1 -0
- package/dist/app/index.html +2 -2
- package/dist/cli-commands.d.ts +2 -0
- package/dist/cli-commands.js +45 -0
- package/dist/cli-commands.js.map +1 -1
- package/dist/cli-graphic.d.ts +9 -0
- package/dist/cli-graphic.js +62 -0
- package/dist/cli-graphic.js.map +1 -0
- package/dist/core/annotations.js +2 -2
- package/dist/core/annotations.js.map +1 -1
- package/dist/core/board-edits.d.ts +2 -0
- package/dist/core/board-edits.js +14 -0
- package/dist/core/board-edits.js.map +1 -1
- package/dist/core/board-graphic-edits.d.ts +8 -0
- package/dist/core/board-graphic-edits.js +88 -0
- package/dist/core/board-graphic-edits.js.map +1 -0
- package/dist/core/board-items.d.ts +6 -0
- package/dist/core/board-items.js +8 -3
- package/dist/core/board-items.js.map +1 -1
- package/dist/core/board-shape-edit.js +4 -2
- package/dist/core/board-shape-edit.js.map +1 -1
- package/dist/core/edit.js +17 -1
- package/dist/core/edit.js.map +1 -1
- package/dist/core/graphic-import.d.ts +43 -0
- package/dist/core/graphic-import.js +142 -0
- package/dist/core/graphic-import.js.map +1 -0
- package/dist/core/html-export.d.ts +37 -0
- package/dist/core/html-export.js +139 -0
- package/dist/core/html-export.js.map +1 -0
- package/dist/core/html-page.d.ts +39 -0
- package/dist/core/html-page.js +114 -0
- package/dist/core/html-page.js.map +1 -0
- package/dist/core/html-style.d.ts +3 -0
- package/dist/core/html-style.js +117 -0
- package/dist/core/html-style.js.map +1 -0
- package/dist/core/model-export.d.ts +33 -0
- package/dist/core/model-export.js +36 -0
- package/dist/core/model-export.js.map +1 -0
- package/dist/core/out-name.d.ts +5 -0
- package/dist/core/out-name.js +10 -0
- package/dist/core/out-name.js.map +1 -0
- package/dist/core/packages.d.ts +22 -0
- package/dist/core/packages.js +64 -0
- package/dist/core/packages.js.map +1 -0
- package/dist/core/pad-lines.d.ts +7 -0
- package/dist/core/pad-lines.js +15 -0
- package/dist/core/pad-lines.js.map +1 -0
- package/dist/core/pour-edits.d.ts +12 -1
- package/dist/core/pour-edits.js +6 -6
- package/dist/core/pour-edits.js.map +1 -1
- package/dist/core/render.d.ts +2 -1
- package/dist/core/render.js.map +1 -1
- package/dist/core/rules-patch.d.ts +17 -0
- package/dist/core/rules-patch.js +102 -0
- package/dist/core/rules-patch.js.map +1 -0
- package/dist/core/silk-text-edits.d.ts +8 -0
- package/dist/core/silk-text-edits.js +72 -0
- package/dist/core/silk-text-edits.js.map +1 -0
- package/dist/core/step-export.js +3 -0
- package/dist/core/step-export.js.map +1 -1
- package/dist/core/types.d.ts +55 -3
- package/dist/engine/board-graphic.d.ts +49 -0
- package/dist/engine/board-graphic.js +175 -0
- package/dist/engine/board-graphic.js.map +1 -0
- package/dist/engine/checks/copper-clearance.d.ts +1 -1
- package/dist/engine/checks/copper-clearance.js +19 -1
- package/dist/engine/checks/copper-clearance.js.map +1 -1
- package/dist/engine/checks/copper-pieces.d.ts +8 -2
- package/dist/engine/checks/copper-pieces.js +23 -2
- package/dist/engine/checks/copper-pieces.js.map +1 -1
- package/dist/engine/checks/drc-board-graphic.d.ts +10 -0
- package/dist/engine/checks/drc-board-graphic.js +95 -0
- package/dist/engine/checks/drc-board-graphic.js.map +1 -0
- package/dist/engine/checks/drc-parts.js +3 -1
- package/dist/engine/checks/drc-parts.js.map +1 -1
- package/dist/engine/checks/drc-pours.js +3 -3
- package/dist/engine/checks/drc-pours.js.map +1 -1
- package/dist/engine/checks/drc-silk-text.d.ts +15 -0
- package/dist/engine/checks/drc-silk-text.js +65 -0
- package/dist/engine/checks/drc-silk-text.js.map +1 -0
- package/dist/engine/checks/fill-point.d.ts +7 -0
- package/dist/engine/checks/fill-point.js +58 -0
- package/dist/engine/checks/fill-point.js.map +1 -0
- package/dist/engine/checks/stranded-copper.d.ts +14 -0
- package/dist/engine/checks/stranded-copper.js +43 -0
- package/dist/engine/checks/stranded-copper.js.map +1 -0
- package/dist/engine/design.js +1 -1
- package/dist/engine/design.js.map +1 -1
- package/dist/engine/elaborate.d.ts +2 -0
- package/dist/engine/elaborate.js +30 -1
- package/dist/engine/elaborate.js.map +1 -1
- package/dist/engine/engine.d.ts +4 -1
- package/dist/engine/engine.js +5 -2
- package/dist/engine/engine.js.map +1 -1
- package/dist/engine/fab/graphic-objects.d.ts +7 -0
- package/dist/engine/fab/graphic-objects.js +24 -0
- package/dist/engine/fab/graphic-objects.js.map +1 -0
- package/dist/engine/fab/layers.d.ts +9 -0
- package/dist/engine/fab/layers.js +60 -8
- package/dist/engine/fab/layers.js.map +1 -1
- package/dist/engine/fab/silk-text-strokes.d.ts +16 -0
- package/dist/engine/fab/silk-text-strokes.js +28 -0
- package/dist/engine/fab/silk-text-strokes.js.map +1 -0
- package/dist/engine/fab/stroke-font.d.ts +4 -0
- package/dist/engine/fab/stroke-font.js +38 -1
- package/dist/engine/fab/stroke-font.js.map +1 -1
- package/dist/engine/footprints/array.d.ts +4 -0
- package/dist/engine/footprints/array.js +51 -0
- package/dist/engine/footprints/array.js.map +1 -0
- package/dist/engine/footprints/axial.d.ts +6 -0
- package/dist/engine/footprints/axial.js +115 -0
- package/dist/engine/footprints/axial.js.map +1 -0
- package/dist/engine/footprints/catalogue.d.ts +39 -0
- package/dist/engine/footprints/catalogue.js +284 -0
- package/dist/engine/footprints/catalogue.js.map +1 -0
- package/dist/engine/footprints/chip.js +10 -1
- package/dist/engine/footprints/chip.js.map +1 -1
- package/dist/engine/footprints/connector.d.ts +16 -0
- package/dist/engine/footprints/connector.js +31 -0
- package/dist/engine/footprints/connector.js.map +1 -0
- package/dist/engine/footprints/dcjack.d.ts +3 -0
- package/dist/engine/footprints/dcjack.js +46 -0
- package/dist/engine/footprints/dcjack.js.map +1 -0
- package/dist/engine/footprints/dpak.d.ts +7 -0
- package/dist/engine/footprints/dpak.js +172 -0
- package/dist/engine/footprints/dpak.js.map +1 -0
- package/dist/engine/footprints/dual.d.ts +11 -2
- package/dist/engine/footprints/dual.js +113 -12
- package/dist/engine/footprints/dual.js.map +1 -1
- package/dist/engine/footprints/index.js +46 -3
- package/dist/engine/footprints/index.js.map +1 -1
- package/dist/engine/footprints/inductor.d.ts +3 -0
- package/dist/engine/footprints/inductor.js +32 -0
- package/dist/engine/footprints/inductor.js.map +1 -0
- package/dist/engine/footprints/known.js +114 -14
- package/dist/engine/footprints/known.js.map +1 -1
- package/dist/engine/footprints/ledsmd.d.ts +3 -0
- package/dist/engine/footprints/ledsmd.js +52 -0
- package/dist/engine/footprints/ledsmd.js.map +1 -0
- package/dist/engine/footprints/ledth.d.ts +4 -0
- package/dist/engine/footprints/ledth.js +45 -0
- package/dist/engine/footprints/ledth.js.map +1 -0
- package/dist/engine/footprints/melf.d.ts +8 -0
- package/dist/engine/footprints/melf.js +56 -0
- package/dist/engine/footprints/melf.js.map +1 -0
- package/dist/engine/footprints/pad-roles.d.ts +4 -0
- package/dist/engine/footprints/pad-roles.js +32 -0
- package/dist/engine/footprints/pad-roles.js.map +1 -0
- package/dist/engine/footprints/plcc.d.ts +4 -0
- package/dist/engine/footprints/plcc.js +117 -0
- package/dist/engine/footprints/plcc.js.map +1 -0
- package/dist/engine/footprints/resonator.d.ts +3 -0
- package/dist/engine/footprints/resonator.js +33 -0
- package/dist/engine/footprints/resonator.js.map +1 -0
- package/dist/engine/footprints/screw.d.ts +3 -0
- package/dist/engine/footprints/screw.js +51 -0
- package/dist/engine/footprints/screw.js.map +1 -0
- package/dist/engine/footprints/smallsot.d.ts +8 -0
- package/dist/engine/footprints/smallsot.js +143 -0
- package/dist/engine/footprints/smallsot.js.map +1 -0
- package/dist/engine/footprints/smdbox.d.ts +33 -0
- package/dist/engine/footprints/smdbox.js +76 -0
- package/dist/engine/footprints/smdbox.js.map +1 -0
- package/dist/engine/footprints/smdcan.d.ts +3 -0
- package/dist/engine/footprints/smdcan.js +61 -0
- package/dist/engine/footprints/smdcan.js.map +1 -0
- package/dist/engine/footprints/smdip.d.ts +4 -0
- package/dist/engine/footprints/smdip.js +58 -0
- package/dist/engine/footprints/smdip.js.map +1 -0
- package/dist/engine/footprints/socket.d.ts +8 -0
- package/dist/engine/footprints/socket.js +21 -0
- package/dist/engine/footprints/socket.js.map +1 -0
- package/dist/engine/footprints/sod.d.ts +6 -0
- package/dist/engine/footprints/sod.js +63 -6
- package/dist/engine/footprints/sod.js.map +1 -1
- package/dist/engine/footprints/sot.d.ts +1 -1
- package/dist/engine/footprints/sot.js +17 -2
- package/dist/engine/footprints/sot.js.map +1 -1
- package/dist/engine/footprints/tact.d.ts +3 -0
- package/dist/engine/footprints/tact.js +65 -0
- package/dist/engine/footprints/tact.js.map +1 -0
- package/dist/engine/footprints/tantalum.d.ts +7 -0
- package/dist/engine/footprints/tantalum.js +91 -0
- package/dist/engine/footprints/tantalum.js.map +1 -0
- package/dist/engine/footprints/to92inline.d.ts +14 -0
- package/dist/engine/footprints/to92inline.js +21 -0
- package/dist/engine/footprints/to92inline.js.map +1 -0
- package/dist/engine/footprints/topower.d.ts +7 -0
- package/dist/engine/footprints/topower.js +119 -0
- package/dist/engine/footprints/topower.js.map +1 -0
- package/dist/engine/footprints/usb.d.ts +32 -0
- package/dist/engine/footprints/usb.js +109 -0
- package/dist/engine/footprints/usb.js.map +1 -0
- package/dist/engine/footprints/xtal.d.ts +4 -0
- package/dist/engine/footprints/xtal.js +61 -0
- package/dist/engine/footprints/xtal.js.map +1 -0
- package/dist/engine/graphic-place.d.ts +34 -0
- package/dist/engine/graphic-place.js +132 -0
- package/dist/engine/graphic-place.js.map +1 -0
- package/dist/engine/graphics/curves.d.ts +18 -0
- package/dist/engine/graphics/curves.js +75 -0
- package/dist/engine/graphics/curves.js.map +1 -0
- package/dist/engine/graphics/dxf-entities.d.ts +20 -0
- package/dist/engine/graphics/dxf-entities.js +184 -0
- package/dist/engine/graphics/dxf-entities.js.map +1 -0
- package/dist/engine/graphics/dxf-pairs.d.ts +22 -0
- package/dist/engine/graphics/dxf-pairs.js +77 -0
- package/dist/engine/graphics/dxf-pairs.js.map +1 -0
- package/dist/engine/graphics/dxf.d.ts +5 -0
- package/dist/engine/graphics/dxf.js +110 -0
- package/dist/engine/graphics/dxf.js.map +1 -0
- package/dist/engine/graphics/index.d.ts +9 -0
- package/dist/engine/graphics/index.js +30 -0
- package/dist/engine/graphics/index.js.map +1 -0
- package/dist/engine/graphics/path-data.d.ts +12 -0
- package/dist/engine/graphics/path-data.js +162 -0
- package/dist/engine/graphics/path-data.js.map +1 -0
- package/dist/engine/graphics/rings.d.ts +7 -0
- package/dist/engine/graphics/rings.js +93 -0
- package/dist/engine/graphics/rings.js.map +1 -0
- package/dist/engine/graphics/shapes.d.ts +47 -0
- package/dist/engine/graphics/shapes.js +85 -0
- package/dist/engine/graphics/shapes.js.map +1 -0
- package/dist/engine/graphics/svg-attributes.d.ts +26 -0
- package/dist/engine/graphics/svg-attributes.js +116 -0
- package/dist/engine/graphics/svg-attributes.js.map +1 -0
- package/dist/engine/graphics/svg.d.ts +5 -0
- package/dist/engine/graphics/svg.js +118 -0
- package/dist/engine/graphics/svg.js.map +1 -0
- package/dist/engine/graphics/transform.d.ts +21 -0
- package/dist/engine/graphics/transform.js +88 -0
- package/dist/engine/graphics/transform.js.map +1 -0
- package/dist/engine/graphics/xml.d.ts +10 -0
- package/dist/engine/graphics/xml.js +130 -0
- package/dist/engine/graphics/xml.js.map +1 -0
- package/dist/engine/model.d.ts +55 -0
- package/dist/engine/model.js.map +1 -1
- package/dist/engine/pcb-place/grow.d.ts +12 -0
- package/dist/engine/pcb-place/grow.js +100 -0
- package/dist/engine/pcb-place/grow.js.map +1 -0
- package/dist/engine/pcb.d.ts +5 -1
- package/dist/engine/pcb.js +2 -0
- package/dist/engine/pcb.js.map +1 -1
- package/dist/engine/pour/cache.js +1 -0
- package/dist/engine/pour/cache.js.map +1 -1
- package/dist/engine/pour/obstacles.js +18 -1
- package/dist/engine/pour/obstacles.js.map +1 -1
- package/dist/engine/router/route-board.d.ts +2 -0
- package/dist/engine/router/route-board.js +7 -2
- package/dist/engine/router/route-board.js.map +1 -1
- package/dist/engine/router/unplaced.d.ts +18 -0
- package/dist/engine/router/unplaced.js +27 -0
- package/dist/engine/router/unplaced.js.map +1 -0
- package/dist/engine/rules/rotations.d.ts +12 -3
- package/dist/engine/rules/rotations.js +77 -2
- package/dist/engine/rules/rotations.js.map +1 -1
- package/dist/engine/silk-text.d.ts +40 -0
- package/dist/engine/silk-text.js +85 -0
- package/dist/engine/silk-text.js.map +1 -0
- package/dist/engine/solid/heights-smd.d.ts +3 -0
- package/dist/engine/solid/heights-smd.js +81 -0
- package/dist/engine/solid/heights-smd.js.map +1 -0
- package/dist/engine/solid/heights-through.d.ts +7 -0
- package/dist/engine/solid/heights-through.js +93 -0
- package/dist/engine/solid/heights-through.js.map +1 -0
- package/dist/engine/solid/heights-uno.d.ts +2 -0
- package/dist/engine/solid/heights-uno.js +15 -0
- package/dist/engine/solid/heights-uno.js.map +1 -0
- package/dist/engine/solid/heights.d.ts +2 -0
- package/dist/engine/solid/heights.js +43 -18
- package/dist/engine/solid/heights.js.map +1 -1
- package/dist/library/attach-datasheet.d.ts +2 -0
- package/dist/library/attach-datasheet.js +1 -1
- package/dist/library/attach-datasheet.js.map +1 -1
- package/dist/library/part-fields.d.ts +23 -0
- package/dist/library/part-fields.js +55 -0
- package/dist/library/part-fields.js.map +1 -0
- package/dist/mcp/batch-steps.d.ts +33 -0
- package/dist/mcp/batch-steps.js +211 -0
- package/dist/mcp/batch-steps.js.map +1 -0
- package/dist/mcp/batch.d.ts +16 -0
- package/dist/mcp/batch.js +18 -5
- package/dist/mcp/batch.js.map +1 -1
- package/dist/mcp/board-import-tool.d.ts +1 -1
- package/dist/mcp/board-import-tool.js +1 -1
- package/dist/mcp/board-import-tool.js.map +1 -1
- package/dist/mcp/board-summary.d.ts +1 -1
- package/dist/mcp/board-summary.js +32 -1
- package/dist/mcp/board-summary.js.map +1 -1
- package/dist/mcp/board-tool.d.ts +36 -0
- package/dist/mcp/board-tool.js +109 -0
- package/dist/mcp/board-tool.js.map +1 -0
- package/dist/mcp/copper-summary.d.ts +2 -0
- package/dist/mcp/copper-summary.js +10 -2
- package/dist/mcp/copper-summary.js.map +1 -1
- package/dist/mcp/copper-tools.d.ts +1 -1
- package/dist/mcp/copper-tools.js +1 -1
- package/dist/mcp/copper-tools.js.map +1 -1
- package/dist/mcp/create-part.js +2 -2
- package/dist/mcp/create-part.js.map +1 -1
- package/dist/mcp/graphic-tool.d.ts +34 -0
- package/dist/mcp/graphic-tool.js +29 -0
- package/dist/mcp/graphic-tool.js.map +1 -0
- package/dist/mcp/guide.d.ts +3 -1
- package/dist/mcp/guide.js +15 -4
- package/dist/mcp/guide.js.map +1 -1
- package/dist/mcp/html-tool.d.ts +28 -0
- package/dist/mcp/html-tool.js +21 -0
- package/dist/mcp/html-tool.js.map +1 -0
- package/dist/mcp/model-tool.d.ts +31 -0
- package/dist/mcp/model-tool.js +27 -0
- package/dist/mcp/model-tool.js.map +1 -0
- package/dist/mcp/new-circuit.d.ts +1 -1
- package/dist/mcp/new-circuit.js +10 -11
- package/dist/mcp/new-circuit.js.map +1 -1
- package/dist/mcp/part-tools.d.ts +20 -0
- package/dist/mcp/part-tools.js +40 -0
- package/dist/mcp/part-tools.js.map +1 -0
- package/dist/mcp/place-tools.d.ts +1 -1
- package/dist/mcp/place-tools.js +11 -5
- package/dist/mcp/place-tools.js.map +1 -1
- package/dist/mcp/project-tools.js +2 -0
- package/dist/mcp/project-tools.js.map +1 -1
- package/dist/mcp/render-tool.d.ts +2 -0
- package/dist/mcp/render-tool.js +32 -1
- package/dist/mcp/render-tool.js.map +1 -1
- package/dist/mcp/route-tools.d.ts +1 -1
- package/dist/mcp/route-tools.js +3 -1
- package/dist/mcp/route-tools.js.map +1 -1
- package/dist/mcp/rules-tool.d.ts +19 -0
- package/dist/mcp/rules-tool.js +73 -0
- package/dist/mcp/rules-tool.js.map +1 -0
- package/dist/mcp/server.js +53 -17
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/text-tool.d.ts +34 -0
- package/dist/mcp/text-tool.js +37 -0
- package/dist/mcp/text-tool.js.map +1 -0
- package/dist/render/render.js +2335 -389
- package/dist/studio/server.js +32 -0
- package/dist/studio/server.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
- package/skills/copperflow/SKILL.md +8 -8
- package/skills/copperflow/references/copper.md +9 -1
- package/skills/copperflow/references/design-rules.md +36 -7
- package/skills/copperflow/references/editable-subset.md +18 -8
- package/skills/copperflow/references/parts-library.md +19 -1
- package/skills/copperflow/references/writing-circuits.md +71 -0
- package/dist/app/assets/NewPartDialog-BBJaZFCo.js +0 -160
- package/dist/app/assets/index-BKoIKo22.css +0 -1
- package/dist/app/assets/index-DPmr2dR1.js +0 -20
- package/dist/app/assets/texture-worker-CyI_g_XZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sot.js","sourceRoot":"","sources":["../../../src/engine/footprints/sot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,KAAK,EAAkB,MAAM,SAAS,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;A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C,UAAU,CAAC,GAAG,GAAG,CAAC,EAAE,CAAA;IACpE,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,CAAA;IACpH,MAAM,SAAS,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,EAAE,CAAA;IACzE,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,OAAO,EAAE;QACxE,IAAI;QACJ,SAAS,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC;QAC5C,UAAU,EAAE,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC;QACrC,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC;QAC9B,MAAM,EAAE,sBAAsB,GAAG,CAAC,KAAK,EAAE;KAC1C,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { holePad } from "./connector.js";
|
|
2
|
+
import { roundRectPad } from "./ipc7351.js";
|
|
3
|
+
import { closedRectangle, courtyard, pinOneTick, tidy } from "./outline.js";
|
|
4
|
+
import { clearOutline, FIXED_LAND_COURTYARD, tickBelow } from "./smdbox.js";
|
|
5
|
+
import { refuse } from "./types.js";
|
|
6
|
+
/**
|
|
7
|
+
* 6 × 6 mm tact switches: "tact6x6" (through-hole) and "tact6x6_smd" (four gull-wing terminals). Four pads at the
|
|
8
|
+
* corners: 1 top left, 2 top right, 3 bottom left, 4 bottom right. Pads 1 and 2 are joined inside the switch (one
|
|
9
|
+
* contact), and so are 3 and 4 (the other); pressing joins the two pairs. Würth numbers the same corners 1, 3, 2, 4
|
|
10
|
+
* (its 1–3 and 2–4 are joined): copperflow's 2 is its 3, copperflow's 3 its 2.
|
|
11
|
+
*
|
|
12
|
+
* tact6x6, cited: Würth Elektronik 430186043716, "WS-TATV THT Tact Switch", revision 004.001, 2022-03-02, page 1,
|
|
13
|
+
* "Recommended Hole Pattern": ⌀1.0 holes 6.5 apart along the joined pairs and 4.5 across; body 6.2 square.
|
|
14
|
+
* https://www.we-online.com/components/products/datasheet/430186043716.pdf
|
|
15
|
+
* tact6x6_smd, cited: Würth Elektronik 430182043816, "WS-TASV SMT Tact Switch", revision 002.002, 2020-06-04,
|
|
16
|
+
* page 1, "Recommended Land Pattern": lands 1.3 high, 6.4 apart inside and 9.5 over the pair (so 1.55 long), 4.5
|
|
17
|
+
* across; body 6.2 square. https://www.we-online.com/components/products/datasheet/430182043816.pdf
|
|
18
|
+
* Lands of the through-hole part are the hole + 0.6 mm (connector.ts). These are that maker's parts: another maker's
|
|
19
|
+
* 6 × 6 switch may need different holes or lands.
|
|
20
|
+
*/
|
|
21
|
+
const BODY = { x: 3.1, y: 3.1 };
|
|
22
|
+
const ACROSS = 2.25;
|
|
23
|
+
const THT = { half: 3.25, hole: 1 };
|
|
24
|
+
const SMD = { inside: 6.4, over: 9.5, height: 1.3 };
|
|
25
|
+
/** The through-hole pin 1 tick sits this far beyond the body outline. */
|
|
26
|
+
const TICK_GAP = 0.3;
|
|
27
|
+
const corners = (half) => [[-half, ACROSS], [half, ACROSS], [-half, -ACROSS], [half, -ACROSS]];
|
|
28
|
+
function throughHole() {
|
|
29
|
+
const pads = corners(THT.half).map(([x, y], i) => holePad(String(i + 1), x, y, THT.hole, i === 0));
|
|
30
|
+
const outline = closedRectangle(BODY);
|
|
31
|
+
const tickY = tidy(BODY.y + TICK_GAP);
|
|
32
|
+
return {
|
|
33
|
+
name: "tact6x6",
|
|
34
|
+
pads,
|
|
35
|
+
courtyard: courtyard(pads, { x: BODY.x, y: tickY }, FIXED_LAND_COURTYARD),
|
|
36
|
+
silkscreen: [...clearOutline(outline, pads), pinOneTick(pads[0], tickY)],
|
|
37
|
+
fabrication: [outline],
|
|
38
|
+
origin: "Tact switch 6 × 6 mm, through-hole: holes from Würth Elektronik 430186043716 recommended hole pattern; that maker's part, others may differ",
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function surface() {
|
|
42
|
+
const length = tidy((SMD.over - SMD.inside) / 2);
|
|
43
|
+
const pads = corners(tidy((SMD.inside + length) / 2)).map(([x, y], i) => roundRectPad(String(i + 1), x, y, length, SMD.height));
|
|
44
|
+
const outline = closedRectangle(BODY);
|
|
45
|
+
return {
|
|
46
|
+
name: "tact6x6_smd",
|
|
47
|
+
pads,
|
|
48
|
+
courtyard: courtyard(pads, BODY, FIXED_LAND_COURTYARD),
|
|
49
|
+
silkscreen: [...clearOutline(outline, pads), tickBelow(pads, pads[2]).map((p) => ({ x: p.x, y: -p.y }))],
|
|
50
|
+
fabrication: [outline],
|
|
51
|
+
origin: "Tact switch 6 × 6 mm, surface-mount: lands from Würth Elektronik 430182043816 recommended land pattern; that maker's part, others may differ",
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function tactFootprint(parsed) {
|
|
55
|
+
if (parsed.kind !== "tact")
|
|
56
|
+
return undefined;
|
|
57
|
+
const keys = Object.keys(parsed.params);
|
|
58
|
+
const six = parsed.code === "6" && parsed.cross === "6" && parsed.suffix === undefined && parsed.variant === undefined && parsed.size === undefined && parsed.pairs === undefined;
|
|
59
|
+
if (six && keys.length === 0)
|
|
60
|
+
return throughHole();
|
|
61
|
+
if (six && keys.length === 1 && parsed.params["smd"] === true)
|
|
62
|
+
return surface();
|
|
63
|
+
return refuse("tact switches are tact6x6 (through-hole) and tact6x6_smd");
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=tact.js.map
|
|
@@ -0,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
+
* The footprint for a moulded tantalum capacitor on KEMET's level B lands, or undefined. Pad 1 is the anode
|
|
5
|
+
* (+), at negative x, and a "+" on the silkscreen above it, as radial.ts marks its positive pad.
|
|
6
|
+
*/
|
|
7
|
+
export declare function tantalumFootprint(parsed: ParsedFootprint): Footprint | Refusal | undefined;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { MOLDED_BODY_TABLE, roundRectPad } from "./ipc7351.js";
|
|
2
|
+
import { bodyOutline, courtyard, sideLines, SILK_CLEARANCE, tidy } from "./outline.js";
|
|
3
|
+
import { refuse } from "./types.js";
|
|
4
|
+
const range = (min, max) => ({ min, max });
|
|
5
|
+
/**
|
|
6
|
+
* KEMET (YAGEO Group), "Tantalum Surface Mount Capacitors – Standard Tantalum, T491 Industrial Grade
|
|
7
|
+
* MnO2", T2005_T491 (2026-07-08), page 4, table "Dimensions – Millimeters (Inches)", metric governs:
|
|
8
|
+
* L, W, F ± 0.1 (terminal width) and S (terminal length on the bottom), by case:
|
|
9
|
+
* - A 3216-18: L 3.2 ± 0.2, W 1.6 ± 0.2, F 1.2, S 0.80 +0.2/−0.3
|
|
10
|
+
* - B 3528-21: L 3.5 ± 0.2, W 2.8 ± 0.2, F 2.2, S 0.80 +0.1/−0.3
|
|
11
|
+
* - C 6032-28: L 6.0 ± 0.3, W 3.2 ± 0.3, F 2.2, S 1.30 ± 0.3
|
|
12
|
+
* - D 7343-31: L 7.3 ± 0.3, W 4.3 ± 0.3, F 2.4, S 1.30 ± 0.3
|
|
13
|
+
* - X 7343-43: L 7.3 ± 0.3, W 4.3 ± 0.3, F 2.4, S 1.30 ± 0.3 (KEMET's letter X; "tant_e" here, the
|
|
14
|
+
* letter other makers give 7343-43; KEMET's own E is 7360-38, not made here)
|
|
15
|
+
* The anode (+) end is marked on the body. https://yageogroup.com/content/datasheet/asset/file/KEM_T2005_T491
|
|
16
|
+
*
|
|
17
|
+
* The lands are not computed: the same data sheet, page 15, "Table 2 – Land Dimensions/Courtyard",
|
|
18
|
+
* gives them, and the Density Level B "Median (Nominal) Land Protrusion" columns are used as they
|
|
19
|
+
* stand: W (pad width across), L (pad length along the part) and S (gap between the pads), in mm:
|
|
20
|
+
* A 1.23 / 1.80 / 0.82, B 2.23 / 1.80 / 1.12, C 2.23 / 2.37 / 2.57, D 2.43 / 2.37 / 3.87,
|
|
21
|
+
* X 2.43 / 2.37 / 3.87. (Computing from L and S with the moulded-body goals gave case A a 0.30 mm gap.)
|
|
22
|
+
* The courtyard is made as for the other two-terminal parts, not from the table's V1 × V2.
|
|
23
|
+
*/
|
|
24
|
+
const CASE_A = { label: "EIA 3216-18 (A)", length: range(3.0, 3.4), width: range(1.4, 1.8), land: { length: 1.8, width: 1.23, gap: 0.82 } };
|
|
25
|
+
const CASE_B = { label: "EIA 3528-21 (B)", length: range(3.3, 3.7), width: range(2.6, 3.0), land: { length: 1.8, width: 2.23, gap: 1.12 } };
|
|
26
|
+
const CASE_C = { label: "EIA 6032-28 (C)", length: range(5.7, 6.3), width: range(2.9, 3.5), land: { length: 2.37, width: 2.23, gap: 2.57 } };
|
|
27
|
+
const CASE_D = { label: "EIA 7343-31 (D)", length: range(7.0, 7.6), width: range(4.0, 4.6), land: { length: 2.37, width: 2.43, gap: 3.87 } };
|
|
28
|
+
const CASE_E = { ...CASE_D, label: "EIA 7343-43 (E, KEMET X)" };
|
|
29
|
+
const BY_LETTER = new Map([
|
|
30
|
+
["a", CASE_A],
|
|
31
|
+
["b", CASE_B],
|
|
32
|
+
["c", CASE_C],
|
|
33
|
+
["d", CASE_D],
|
|
34
|
+
["e", CASE_E],
|
|
35
|
+
]);
|
|
36
|
+
/** By size: 7343 is the 31 mm-tenths high D case. */
|
|
37
|
+
const BY_SIZE = new Map([
|
|
38
|
+
["3216", CASE_A],
|
|
39
|
+
["3528", CASE_B],
|
|
40
|
+
["6032", CASE_C],
|
|
41
|
+
["7343", CASE_D],
|
|
42
|
+
]);
|
|
43
|
+
const FORMS = "tant_a … tant_e or tant3216, tant3528, tant6032, tant7343";
|
|
44
|
+
/** The "+" by pad 1: half its arm length, as radial.ts draws it. */
|
|
45
|
+
const PLUS_ARM = 0.4;
|
|
46
|
+
/** A "+" above pad 1, its lowest point the silkscreen clearance above the pad. */
|
|
47
|
+
function plusMark(pad) {
|
|
48
|
+
const cy = tidy(pad.y + pad.height / 2 + SILK_CLEARANCE + 0.05 + PLUS_ARM);
|
|
49
|
+
return [
|
|
50
|
+
[{ x: tidy(pad.x - PLUS_ARM), y: cy }, { x: tidy(pad.x + PLUS_ARM), y: cy }],
|
|
51
|
+
[{ x: tidy(pad.x), y: tidy(cy - PLUS_ARM) }, { x: tidy(pad.x), y: tidy(cy + PLUS_ARM) }],
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
function caseOf(parsed) {
|
|
55
|
+
const plain = parsed.variant === undefined && parsed.cross === undefined && parsed.suffix === undefined && parsed.size === undefined && parsed.pairs === undefined;
|
|
56
|
+
if (parsed.kind !== "tant" || !plain)
|
|
57
|
+
return undefined;
|
|
58
|
+
const keys = Object.keys(parsed.params);
|
|
59
|
+
if (parsed.code !== "")
|
|
60
|
+
return keys.length === 0 ? (BY_SIZE.get(parsed.code) ?? refuse(`the sizes are ${FORMS}`)) : undefined;
|
|
61
|
+
const letter = keys.length === 1 && parsed.params[keys[0]] === true ? BY_LETTER.get(keys[0]) : undefined;
|
|
62
|
+
return letter ?? refuse(`a tantalum capacitor is ${FORMS}`);
|
|
63
|
+
}
|
|
64
|
+
function nameOf(parsed) {
|
|
65
|
+
return parsed.code === "" ? `tant_${Object.keys(parsed.params)[0]}` : `tant${parsed.code}`;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The footprint for a moulded tantalum capacitor on KEMET's level B lands, or undefined. Pad 1 is the anode
|
|
69
|
+
* (+), at negative x, and a "+" on the silkscreen above it, as radial.ts marks its positive pad.
|
|
70
|
+
*/
|
|
71
|
+
export function tantalumFootprint(parsed) {
|
|
72
|
+
const found = caseOf(parsed);
|
|
73
|
+
if (!found || "refused" in found)
|
|
74
|
+
return found;
|
|
75
|
+
const { land } = found;
|
|
76
|
+
const centre = tidy((land.gap + land.length) / 2);
|
|
77
|
+
const pads = [roundRectPad("1", -centre, 0, land.length, land.width), roundRectPad("2", centre, 0, land.length, land.width)];
|
|
78
|
+
const body = { x: found.length.max / 2, y: found.width.max / 2 };
|
|
79
|
+
const plus = plusMark(pads[0]);
|
|
80
|
+
const plusTop = Math.max(...plus.flat().map((p) => Math.abs(p.y)));
|
|
81
|
+
const component = { x: body.x, y: Math.max(body.y, plusTop) };
|
|
82
|
+
return {
|
|
83
|
+
name: nameOf(parsed),
|
|
84
|
+
pads,
|
|
85
|
+
courtyard: courtyard(pads, component, MOLDED_BODY_TABLE),
|
|
86
|
+
silkscreen: [...sideLines(pads, body), ...plus],
|
|
87
|
+
fabrication: bodyOutline(body),
|
|
88
|
+
origin: `KEMET T491 data sheet (T2005_T491, 2026-07-08) Table 2 level B lands, moulded tantalum ${found.label}`,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=tantalum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tantalum.js","sourceRoot":"","sources":["../../../src/engine/footprints/tantalum.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAc,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEtF,OAAO,EAAE,MAAM,EAA0C,MAAM,YAAY,CAAA;AAiB3E,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;AAEjE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,GAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,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,CAAC,IAAI,CAAC;QAC9B,MAAM,EAAE,0FAA0F,KAAK,CAAC,KAAK,EAAE;KAChH,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ParsedFootprint } from "./parse.js";
|
|
2
|
+
import { type Refusal } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* "to92_inline", TO-92 with its leads straight at 1.27 mm, is refused: no land pattern there meets
|
|
5
|
+
* copperflow's design rules. The lead (0.36–0.53 wide, 0.36–0.51 thick, general knowledge of makers'
|
|
6
|
+
* drawings, as in `to92.ts`) has a 0.74 mm diagonal, so the IPC-2222 hole is 0.95 mm and even a hole
|
|
7
|
+
* just over the diagonal is 0.75 mm. With the 0.18 mm minimum ring of the stricter shipped profile the
|
|
8
|
+
* land is at least 0.75 + 0.36 = 1.11 mm wide, which leaves 0.16 mm of copper between neighbours at
|
|
9
|
+
* 1.27 mm, under the 0.2 mm clearance of the default net class. The string is still recognised so
|
|
10
|
+
* that the refusal says what to use instead: "to92", the leads formed to 2.54 mm.
|
|
11
|
+
*/
|
|
12
|
+
export declare const TO92_INLINE_REFUSAL = "at 1.27 mm the straight TO-92 leads leave no room for lands that meet the design rules (0.18 mm ring, 0.2 mm copper clearance); use to92, the leads formed to 2.54 mm";
|
|
13
|
+
/** A refusal for "to92_inline"; undefined for any other string. */
|
|
14
|
+
export declare function to92InlineFootprint(parsed: ParsedFootprint): Refusal | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isSimple } from "./parse.js";
|
|
2
|
+
import { refuse } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* "to92_inline", TO-92 with its leads straight at 1.27 mm, is refused: no land pattern there meets
|
|
5
|
+
* copperflow's design rules. The lead (0.36–0.53 wide, 0.36–0.51 thick, general knowledge of makers'
|
|
6
|
+
* drawings, as in `to92.ts`) has a 0.74 mm diagonal, so the IPC-2222 hole is 0.95 mm and even a hole
|
|
7
|
+
* just over the diagonal is 0.75 mm. With the 0.18 mm minimum ring of the stricter shipped profile the
|
|
8
|
+
* land is at least 0.75 + 0.36 = 1.11 mm wide, which leaves 0.16 mm of copper between neighbours at
|
|
9
|
+
* 1.27 mm, under the 0.2 mm clearance of the default net class. The string is still recognised so
|
|
10
|
+
* that the refusal says what to use instead: "to92", the leads formed to 2.54 mm.
|
|
11
|
+
*/
|
|
12
|
+
export const TO92_INLINE_REFUSAL = "at 1.27 mm the straight TO-92 leads leave no room for lands that meet the design rules (0.18 mm ring, 0.2 mm copper clearance); use to92, the leads formed to 2.54 mm";
|
|
13
|
+
/** A refusal for "to92_inline"; undefined for any other string. */
|
|
14
|
+
export function to92InlineFootprint(parsed) {
|
|
15
|
+
const keys = Object.keys(parsed.params);
|
|
16
|
+
const inline = keys.length === 1 && parsed.params["inline"] === true;
|
|
17
|
+
if (parsed.kind !== "to" || parsed.code !== "92" || !isSimple(parsed) || parsed.variant !== undefined || !inline)
|
|
18
|
+
return undefined;
|
|
19
|
+
return refuse(TO92_INLINE_REFUSAL);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=to92inline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to92inline.js","sourceRoot":"","sources":["../../../src/engine/footprints/to92inline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwB,MAAM,YAAY,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAgB,MAAM,YAAY,CAAA;AAEjD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,uKAAuK,CAAA;AAEzK,mEAAmE;AACnE,MAAM,UAAU,mBAAmB,CAAC,MAAuB;IACzD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAA;IACpE,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAA;IAClI,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAA;AACpC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ParsedFootprint } from "./parse.js";
|
|
2
|
+
import { type Footprint, type Refusal } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* "to247", "to126", "to220_2", "to220_5"; a refusal for other "to220_<n>" and for variants of "to247"
|
|
5
|
+
* and "to126"; otherwise undefined. "to220" itself is left to `to220Footprint`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function toPowerFootprint(parsed: ParsedFootprint): Footprint | Refusal | undefined;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { range } from "./ic.js";
|
|
2
|
+
import { leadDiameter, THROUGH_HOLE_COURTYARD, throughHoleLand, throughHolePad } from "./ipc7251.js";
|
|
3
|
+
import { centredOffsets, courtyard, pinOneTick, tidy } from "./outline.js";
|
|
4
|
+
import { isSimple } from "./parse.js";
|
|
5
|
+
import { refuse } from "./types.js";
|
|
6
|
+
/** The pin 1 tick sits this far in front of the body, as in `to220.ts`. */
|
|
7
|
+
const TICK_GAP = 0.3;
|
|
8
|
+
/**
|
|
9
|
+
* TO-220 bodies for the two- and five-lead forms: the same body and tab numbers as `to220.ts`
|
|
10
|
+
* (width 10.66, front 2.0 in front of the leads, tab back 2.5 behind, tab 1.27 thick; lead width
|
|
11
|
+
* 0.70–0.90, thickness 0.45–0.60), written from general knowledge of makers' drawings, not
|
|
12
|
+
* transcribed from one. "to220_2" has two leads 5.08 mm apart (TO-220AC, the middle lead left out).
|
|
13
|
+
*
|
|
14
|
+
* "to220_5" has five leads in a straight row at 1.70 mm (the TO-220-5 straight-lead form; the
|
|
15
|
+
* staggered form is not made). Its leads are thinner, about 0.64–0.90 × 0.40–0.50 (general knowledge,
|
|
16
|
+
* not one drawing). The IPC-2222 hole for that lead (diagonal 1.03 + 0.20 → 1.25) cannot meet
|
|
17
|
+
* copperflow's design rules at 1.70 mm: with the 0.18 mm minimum ring of the stricter shipped profile
|
|
18
|
+
* the lands would be 1.61 wide and only 0.09 apart. So the hole is the smallest practical one, 1.10 mm,
|
|
19
|
+
* 0.07 over the lead diagonal and below the IPC-2222 allowance: an assembler should confirm it for the
|
|
20
|
+
* part. The lands are ovals 1.46 wide along the row (1.10 + 2 × 0.18) and 2.00 long across it,
|
|
21
|
+
* leaving 0.24 mm of copper and 0.60 mm hole to hole between neighbours.
|
|
22
|
+
*/
|
|
23
|
+
const TO220_BODY = { halfWidth: 10.66 / 2, front: -2, back: 2.5, tab: 2.5 - 1.27, leadWidth: range(0.7, 0.9), leadThickness: range(0.45, 0.6) };
|
|
24
|
+
const TO220_2 = { name: "to220_2", label: "TO-220-2", leads: 2, pitch: 5.08, ...TO220_BODY };
|
|
25
|
+
const TO220_5 = {
|
|
26
|
+
name: "to220_5",
|
|
27
|
+
label: "TO-220-5",
|
|
28
|
+
leads: 5,
|
|
29
|
+
pitch: 1.7,
|
|
30
|
+
...TO220_BODY,
|
|
31
|
+
leadWidth: range(0.64, 0.9),
|
|
32
|
+
leadThickness: range(0.4, 0.5),
|
|
33
|
+
narrow: { drill: 1.1, width: 1.46, length: 2 },
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* onsemi, "TO-247-3LD SHORT LEAD", case 340CK, issue A, 31 Jan 2019, document 98AON13851G, page 1,
|
|
37
|
+
* dimension table (mm): A 4.58–4.82 (body thickness), A1 2.20–2.60 (lead plane to the back face),
|
|
38
|
+
* b 1.17–1.35 (lead width), c 0.51–0.71 (lead thickness), E 15.37–15.87 (body width), e 5.56 nominal.
|
|
39
|
+
* https://www.onsemi.com/pub/Collateral/340CK.PDF
|
|
40
|
+
* The pitch is taken as 5.45 mm, the JEDEC TO-247 lead spacing most makers draw, not the 5.56 of this
|
|
41
|
+
* drawing; the 0.11 mm difference stays inside the 0.2 mm hole allowance. The back face is placed
|
|
42
|
+
* A1max (2.60) behind the lead plane and the front face Amax − A1max (2.22) in front of it, so the
|
|
43
|
+
* outline is Amax (4.82) deep. TO-247 has no separate tab: its metal back is the back face.
|
|
44
|
+
*/
|
|
45
|
+
const TO247 = {
|
|
46
|
+
name: "to247",
|
|
47
|
+
label: "TO-247",
|
|
48
|
+
leads: 3,
|
|
49
|
+
pitch: 5.45,
|
|
50
|
+
leadWidth: range(1.17, 1.35),
|
|
51
|
+
leadThickness: range(0.51, 0.71),
|
|
52
|
+
halfWidth: 15.87 / 2,
|
|
53
|
+
front: -(4.82 - 2.6),
|
|
54
|
+
back: 2.6,
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* TO-126 (SOT-32), in the dimensions makers' outline drawings commonly give: three leads 2.29 mm
|
|
58
|
+
* apart, lead width 0.60–0.90 and thickness 0.40–0.60, body 7.4–7.8 wide and 2.5–2.9 thick with the
|
|
59
|
+
* lead plane about 1.5 mm behind the front face. Written from general knowledge of those drawings, not
|
|
60
|
+
* transcribed from one.
|
|
61
|
+
*/
|
|
62
|
+
const TO126 = {
|
|
63
|
+
name: "to126",
|
|
64
|
+
label: "TO-126",
|
|
65
|
+
leads: 3,
|
|
66
|
+
pitch: 2.29,
|
|
67
|
+
leadWidth: range(0.6, 0.9),
|
|
68
|
+
leadThickness: range(0.4, 0.6),
|
|
69
|
+
halfWidth: 7.8 / 2,
|
|
70
|
+
front: -1.5,
|
|
71
|
+
back: 1.4,
|
|
72
|
+
};
|
|
73
|
+
function body(pkg) {
|
|
74
|
+
const [x, f, b] = [tidy(pkg.halfWidth), tidy(pkg.front), tidy(pkg.back)];
|
|
75
|
+
return [{ x: -x, y: f }, { x, y: f }, { x, y: b }, { x: -x, y: b }, { x: -x, y: f }];
|
|
76
|
+
}
|
|
77
|
+
/** A round IPC-2222 land, or the package's narrow oval land and hole. Pad 1 square (a rectangle for the oval). */
|
|
78
|
+
function rowPad(number, x, pkg, square) {
|
|
79
|
+
const land = throughHoleLand(leadDiameter(pkg.leadWidth, pkg.leadThickness));
|
|
80
|
+
if (!pkg.narrow)
|
|
81
|
+
return { pad: throughHolePad(number, x, 0, land, square), text: `${land.drill} mm holes, ${land.pad} mm lands (IPC-2222 level B)` };
|
|
82
|
+
const { drill, width, length } = pkg.narrow;
|
|
83
|
+
const pad = { ...throughHolePad(number, x, 0, { drill, pad: length }, square), shape: square ? "rect" : "oval", width };
|
|
84
|
+
return { pad, text: `${drill} mm holes (below the IPC-2222 allowance), ${width} × ${length} mm oval lands` };
|
|
85
|
+
}
|
|
86
|
+
function uprightFootprint(pkg) {
|
|
87
|
+
const made = centredOffsets(pkg.leads, pkg.pitch).map((x, i) => rowPad(String(i + 1), x, pkg, i === 0));
|
|
88
|
+
const pads = made.map((m) => m.pad);
|
|
89
|
+
const tab = pkg.tab === undefined ? [] : [[{ x: -tidy(pkg.halfWidth), y: tidy(pkg.tab) }, { x: tidy(pkg.halfWidth), y: tidy(pkg.tab) }]];
|
|
90
|
+
return {
|
|
91
|
+
name: pkg.name,
|
|
92
|
+
pads,
|
|
93
|
+
courtyard: courtyard(pads, { x: pkg.halfWidth, y: Math.max(TICK_GAP - pkg.front, pkg.back) }, THROUGH_HOLE_COURTYARD),
|
|
94
|
+
silkscreen: [body(pkg), ...tab, pinOneTick(pads[0], pkg.front - TICK_GAP)],
|
|
95
|
+
fabrication: [body(pkg), ...tab],
|
|
96
|
+
origin: `Through-hole, ${pkg.label} upright: ${made[0]?.text ?? ""}`,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
const noParams = (parsed) => isSimple(parsed) && Object.keys(parsed.params).length === 0;
|
|
100
|
+
/**
|
|
101
|
+
* "to247", "to126", "to220_2", "to220_5"; a refusal for other "to220_<n>" and for variants of "to247"
|
|
102
|
+
* and "to126"; otherwise undefined. "to220" itself is left to `to220Footprint`.
|
|
103
|
+
*/
|
|
104
|
+
export function toPowerFootprint(parsed) {
|
|
105
|
+
if (parsed.kind !== "to" || !noParams(parsed))
|
|
106
|
+
return undefined;
|
|
107
|
+
if (parsed.code === "220" && parsed.variant !== undefined) {
|
|
108
|
+
if (parsed.variant === "2")
|
|
109
|
+
return uprightFootprint(TO220_2);
|
|
110
|
+
if (parsed.variant === "5")
|
|
111
|
+
return uprightFootprint(TO220_5);
|
|
112
|
+
return refuse("TO-220 comes as to220 (3 leads), to220_2 or to220_5");
|
|
113
|
+
}
|
|
114
|
+
const pkg = parsed.code === "247" ? TO247 : parsed.code === "126" ? TO126 : undefined;
|
|
115
|
+
if (!pkg)
|
|
116
|
+
return undefined;
|
|
117
|
+
return parsed.variant === undefined ? uprightFootprint(pkg) : refuse(`${pkg.label} has three leads and takes no variant`);
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=topower.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topower.js","sourceRoot":"","sources":["../../../src/engine/footprints/topower.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AACpG,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,YAAY,CAAA;AAC3D,OAAO,EAAE,MAAM,EAA0C,MAAM,YAAY,CAAA;AA0B3E,2EAA2E;AAC3E,MAAM,QAAQ,GAAG,GAAG,CAAA;AAEpB;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,GAAG,EAAE,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GA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I,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;IACrF,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAA;IAC1B,OAAO,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,uCAAuC,CAAC,CAAA;AAC3H,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ParsedFootprint } from "./parse.js";
|
|
2
|
+
import { type Footprint, type Refusal } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* USB receptacles: "usb_b" (Type-B, through-hole, right-angle) and "usb_c16" (Type-C, 16 pins, USB 2.0, surface-mount
|
|
5
|
+
* signal row with through-hole shell legs). Origin at the body centre; the plug enters from −y, marked on the
|
|
6
|
+
* fabrication layer by an arrow pointing into the body.
|
|
7
|
+
*
|
|
8
|
+
* Pad numbers are digits because copperflow joins a pad to the pin of the same number ("pin5"); a pad named "S1" or
|
|
9
|
+
* "A5" would never reach a net. The shell legs of each receptacle share one number, as a SOT-89's tab shares pin 2,
|
|
10
|
+
* so the shield is one pin that can be tied to ground or left to a filter.
|
|
11
|
+
*
|
|
12
|
+
* usb_b, cited: Würth Elektronik 61400416121, "WR-COM USB 2.0 Horizontal THT", Type B, revision 001.003, 2024-01-30,
|
|
13
|
+
* page 1, "Recommended Hole Pattern": signal holes ⌀0.92, pins 2 and 1 2.5 apart in the row furthest from the plug,
|
|
14
|
+
* pins 3 and 4 below them 2.0 nearer the plug (3 under 2, 4 under 1), shell holes ⌀2.3 12.04 apart, 2.71 nearer the
|
|
15
|
+
* plug than pins 3 and 4; body 12.04 wide, 16.5 deep, shell legs 10.28 from the mating face (side view).
|
|
16
|
+
* https://www.we-online.com/components/products/datasheet/61400416121.pdf
|
|
17
|
+
* Pins as the USB specification numbers them: 1 VBUS, 2 D−, 3 D+, 4 GND; pad 5 is the shell. Lands are the hole +
|
|
18
|
+
* 0.6 mm (connector.ts). This is that maker's part: another maker's Type-B may need different holes.
|
|
19
|
+
*
|
|
20
|
+
* usb_c16, cited: Würth Elektronik 629722000214, "WR-COM USB 2.0 Horizontal Receptacle SMT", Type C 2.0, 16 pins,
|
|
21
|
+
* revision 002.000, 2025-09-04, page 1, "Recommended Land Pattern": twelve pads 1.15 long, 0.3 wide at ±0.25, ±0.75,
|
|
22
|
+
* ±1.25, ±1.75 and 0.6 wide at ±2.4 and ±3.2; shell slots 8.64 apart, the rear pair ⌀0.6 × 1.7 hole in a 1.0 × 2.1
|
|
23
|
+
* land, the front pair ⌀0.6 × 1.4 in 1.0 × 1.8, 4.18 apart; the front slots 2.62 from the product edge, the far end
|
|
24
|
+
* of the signal pads 5.32 from the front slots; body 8.94 × 7.53. The two ⌀0.65 holes for the plastic pegs are left
|
|
25
|
+
* to the board outline (no copper). https://www.we-online.com/components/products/datasheet/629722000214.pdf
|
|
26
|
+
* Seen from the top with the plug at the bottom, pads 1–12 left to right are the Type-C contacts A1/B12 (GND),
|
|
27
|
+
* A4/B9 (VBUS), B8 (SBU2), A5 (CC1), B7 (D−), A6 (D+), A7 (D−), B6 (D+), A8 (SBU1), B5 (CC2), B4/A9 (VBUS),
|
|
28
|
+
* B1/A12 (GND); pad 13 is the shell. This is that maker's part: another maker's 16-pin Type-C may need different
|
|
29
|
+
* lands and shell legs. The same sheet's "Article Properties" recommends a 0.8 mm board for this part.
|
|
30
|
+
*/
|
|
31
|
+
export declare const USB_C16_CONTACTS: readonly string[];
|
|
32
|
+
export declare function usbFootprint(parsed: ParsedFootprint): Footprint | Refusal | undefined;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { holePad, matingArrow, slotPad } from "./connector.js";
|
|
2
|
+
import { roundRectPad } from "./ipc7351.js";
|
|
3
|
+
import { closedRectangle, courtyard, tidy } from "./outline.js";
|
|
4
|
+
import { isSimple } from "./parse.js";
|
|
5
|
+
import { clearOutline, FIXED_LAND_COURTYARD } from "./smdbox.js";
|
|
6
|
+
import { refuse } from "./types.js";
|
|
7
|
+
/**
|
|
8
|
+
* USB receptacles: "usb_b" (Type-B, through-hole, right-angle) and "usb_c16" (Type-C, 16 pins, USB 2.0, surface-mount
|
|
9
|
+
* signal row with through-hole shell legs). Origin at the body centre; the plug enters from −y, marked on the
|
|
10
|
+
* fabrication layer by an arrow pointing into the body.
|
|
11
|
+
*
|
|
12
|
+
* Pad numbers are digits because copperflow joins a pad to the pin of the same number ("pin5"); a pad named "S1" or
|
|
13
|
+
* "A5" would never reach a net. The shell legs of each receptacle share one number, as a SOT-89's tab shares pin 2,
|
|
14
|
+
* so the shield is one pin that can be tied to ground or left to a filter.
|
|
15
|
+
*
|
|
16
|
+
* usb_b, cited: Würth Elektronik 61400416121, "WR-COM USB 2.0 Horizontal THT", Type B, revision 001.003, 2024-01-30,
|
|
17
|
+
* page 1, "Recommended Hole Pattern": signal holes ⌀0.92, pins 2 and 1 2.5 apart in the row furthest from the plug,
|
|
18
|
+
* pins 3 and 4 below them 2.0 nearer the plug (3 under 2, 4 under 1), shell holes ⌀2.3 12.04 apart, 2.71 nearer the
|
|
19
|
+
* plug than pins 3 and 4; body 12.04 wide, 16.5 deep, shell legs 10.28 from the mating face (side view).
|
|
20
|
+
* https://www.we-online.com/components/products/datasheet/61400416121.pdf
|
|
21
|
+
* Pins as the USB specification numbers them: 1 VBUS, 2 D−, 3 D+, 4 GND; pad 5 is the shell. Lands are the hole +
|
|
22
|
+
* 0.6 mm (connector.ts). This is that maker's part: another maker's Type-B may need different holes.
|
|
23
|
+
*
|
|
24
|
+
* usb_c16, cited: Würth Elektronik 629722000214, "WR-COM USB 2.0 Horizontal Receptacle SMT", Type C 2.0, 16 pins,
|
|
25
|
+
* revision 002.000, 2025-09-04, page 1, "Recommended Land Pattern": twelve pads 1.15 long, 0.3 wide at ±0.25, ±0.75,
|
|
26
|
+
* ±1.25, ±1.75 and 0.6 wide at ±2.4 and ±3.2; shell slots 8.64 apart, the rear pair ⌀0.6 × 1.7 hole in a 1.0 × 2.1
|
|
27
|
+
* land, the front pair ⌀0.6 × 1.4 in 1.0 × 1.8, 4.18 apart; the front slots 2.62 from the product edge, the far end
|
|
28
|
+
* of the signal pads 5.32 from the front slots; body 8.94 × 7.53. The two ⌀0.65 holes for the plastic pegs are left
|
|
29
|
+
* to the board outline (no copper). https://www.we-online.com/components/products/datasheet/629722000214.pdf
|
|
30
|
+
* Seen from the top with the plug at the bottom, pads 1–12 left to right are the Type-C contacts A1/B12 (GND),
|
|
31
|
+
* A4/B9 (VBUS), B8 (SBU2), A5 (CC1), B7 (D−), A6 (D+), A7 (D−), B6 (D+), A8 (SBU1), B5 (CC2), B4/A9 (VBUS),
|
|
32
|
+
* B1/A12 (GND); pad 13 is the shell. This is that maker's part: another maker's 16-pin Type-C may need different
|
|
33
|
+
* lands and shell legs. The same sheet's "Article Properties" recommends a 0.8 mm board for this part.
|
|
34
|
+
*/
|
|
35
|
+
export const USB_C16_CONTACTS = ["A1/B12", "A4/B9", "B8", "A5", "B7", "A6", "A7", "B6", "A8", "B5", "B4/A9", "B1/A12"];
|
|
36
|
+
const B = {
|
|
37
|
+
body: { x: 6.02, y: 8.25 },
|
|
38
|
+
signalHole: 0.92,
|
|
39
|
+
shellHole: 2.3,
|
|
40
|
+
pinX: 1.25,
|
|
41
|
+
shellX: 6.02,
|
|
42
|
+
shellFromFront: 10.28,
|
|
43
|
+
shellToRow: 2.71,
|
|
44
|
+
rowGap: 2,
|
|
45
|
+
};
|
|
46
|
+
const C = {
|
|
47
|
+
body: { x: 4.47, y: 3.765 },
|
|
48
|
+
xs: [-3.2, -2.4, -1.75, -1.25, -0.75, -0.25, 0.25, 0.75, 1.25, 1.75, 2.4, 3.2],
|
|
49
|
+
wide: 0.6,
|
|
50
|
+
narrow: 0.3,
|
|
51
|
+
length: 1.15,
|
|
52
|
+
shellX: 4.32,
|
|
53
|
+
frontFromEdge: 2.62,
|
|
54
|
+
rearAboveFront: 4.18,
|
|
55
|
+
padEndAboveFront: 5.32,
|
|
56
|
+
rear: { land: { x: 1, y: 2.1 }, hole: { x: 0.6, y: 1.7 } },
|
|
57
|
+
front: { land: { x: 1, y: 1.8 }, hole: { x: 0.6, y: 1.4 } },
|
|
58
|
+
};
|
|
59
|
+
function usbBPads() {
|
|
60
|
+
const shellY = tidy(-B.body.y + B.shellFromFront);
|
|
61
|
+
const near = shellY + B.shellToRow;
|
|
62
|
+
const far = near + B.rowGap;
|
|
63
|
+
return [
|
|
64
|
+
holePad("1", B.pinX, far, B.signalHole, true),
|
|
65
|
+
holePad("2", -B.pinX, far, B.signalHole),
|
|
66
|
+
holePad("3", -B.pinX, near, B.signalHole),
|
|
67
|
+
holePad("4", B.pinX, near, B.signalHole),
|
|
68
|
+
holePad("5", -B.shellX, shellY, B.shellHole),
|
|
69
|
+
holePad("5", B.shellX, shellY, B.shellHole),
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
function usbCPads() {
|
|
73
|
+
const front = tidy(-C.body.y + C.frontFromEdge);
|
|
74
|
+
const rear = tidy(front + C.rearAboveFront);
|
|
75
|
+
const row = tidy(front + C.padEndAboveFront - C.length / 2);
|
|
76
|
+
const signal = C.xs.map((x, i) => roundRectPad(String(i + 1), x, row, Math.abs(x) >= 2 ? C.wide : C.narrow, C.length));
|
|
77
|
+
const shell = [
|
|
78
|
+
slotPad("13", -C.shellX, rear, C.rear.land, C.rear.hole),
|
|
79
|
+
slotPad("13", C.shellX, rear, C.rear.land, C.rear.hole),
|
|
80
|
+
slotPad("13", -C.shellX, front, C.front.land, C.front.hole),
|
|
81
|
+
slotPad("13", C.shellX, front, C.front.land, C.front.hole),
|
|
82
|
+
];
|
|
83
|
+
return [...signal, ...shell];
|
|
84
|
+
}
|
|
85
|
+
function receptacle(name, pads, body, origin) {
|
|
86
|
+
const outline = closedRectangle(body);
|
|
87
|
+
return {
|
|
88
|
+
name,
|
|
89
|
+
pads,
|
|
90
|
+
courtyard: courtyard(pads, body, FIXED_LAND_COURTYARD),
|
|
91
|
+
silkscreen: clearOutline(outline, pads),
|
|
92
|
+
fabrication: [outline, ...matingArrow(-body.y)],
|
|
93
|
+
origin,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export function usbFootprint(parsed) {
|
|
97
|
+
if (parsed.kind !== "usb")
|
|
98
|
+
return undefined;
|
|
99
|
+
const keys = Object.keys(parsed.params);
|
|
100
|
+
const plain = isSimple(parsed) && parsed.code === "" && parsed.variant === undefined && keys.length === 1;
|
|
101
|
+
if (plain && parsed.params["b"] === true) {
|
|
102
|
+
return receptacle("usb_b", usbBPads(), B.body, "USB Type-B receptacle, through-hole, right-angle: holes from Würth Elektronik 61400416121 recommended hole pattern; that maker's part, others may differ");
|
|
103
|
+
}
|
|
104
|
+
if (plain && parsed.params["c"] === 16) {
|
|
105
|
+
return receptacle("usb_c16", usbCPads(), C.body, "USB Type-C receptacle, 16 pins (USB 2.0): lands from Würth Elektronik 629722000214 recommended land pattern; that maker's part, others may differ");
|
|
106
|
+
}
|
|
107
|
+
return refuse("USB receptacles are usb_b and usb_c16");
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=usb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usb.js","sourceRoot":"","sources":["../../../src/engine/footprints/usb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAwB,MAAM,YAAY,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,EAAE,MAAM,EAA0C,MAAM,YAAY,CAAA;AAE3E;;;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AAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,oBAAoB,CAAC;QACtD,UAAU,EAAE,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC;QACvC,WAAW,EAAE,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM;KACP,CAAA;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAuB;IAClD,IAAI,MAAM,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,SAAS,CAAA;IAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACvC,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,KAAK,EAAE,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAA;IACzG,IAAI,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;QACzC,OAAO,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,0JAA0J,CAAC,CAAA;IAC5M,CAAC;IACD,IAAI,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC;QACvC,OAAO,UAAU,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,mJAAmJ,CAAC,CAAA;IACvM,CAAC;IACD,OAAO,MAAM,CAAC,uCAAuC,CAAC,CAAA;AACxD,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { closedRectangle, courtyard } from "./outline.js";
|
|
2
|
+
import { clearOutline, FIXED_LAND_COURTYARD, isBare, pairPads, rowPads, tickBelow } from "./smdbox.js";
|
|
3
|
+
/**
|
|
4
|
+
* Cited: Abracon, "ABM8 Ceramic SMD Crystal" data sheet, revised 07-29-20, page 2 ("Outline
|
|
5
|
+
* drawing"): body 3.2 ± 0.20 × 2.5 ± 0.20; recommended land pattern pads 1.3 (x) × 1.05 (y), 1.0
|
|
6
|
+
* apart along x and 0.7 apart along y, so centres ±1.15 and ±0.875; top view pins 1 bottom left,
|
|
7
|
+
* 2 bottom right, 3 top right, 4 top left, pins 2 and 4 marked GND.
|
|
8
|
+
* https://abracon.com/Resonators/abm8.pdf
|
|
9
|
+
*/
|
|
10
|
+
const XTAL3225 = { label: "3.2 × 2.5 mm crystal (Abracon ABM8 land pattern)", body: { x: 1.6, y: 1.25 }, pad: { x: 1.3, y: 1.05 }, centre: { x: 1.15, y: 0.875 }, cited: true };
|
|
11
|
+
/**
|
|
12
|
+
* Typical: written from general knowledge of crystal and oscillator makers' drawings (Epson, NDK,
|
|
13
|
+
* Abracon families of these sizes), not transcribed from one drawing.
|
|
14
|
+
* - 2016: body 2.0 × 1.6, pads 0.7 × 0.6 at ±0.7, ±0.5;
|
|
15
|
+
* - 2520: body 2.5 × 2.0, pads 0.9 × 0.8 at ±0.85, ±0.65;
|
|
16
|
+
* - 5032 four-pad: body 5.0 × 3.2, pads 1.6 × 1.4 at ±1.85, ±1.1;
|
|
17
|
+
* - 5032 two-pad: body 5.0 × 3.2, pads 2.0 × 2.4 at ±1.85;
|
|
18
|
+
* - 3215 (32.768 kHz tuning fork): body 3.2 × 1.5, pads 1.0 × 1.8 at ±1.25;
|
|
19
|
+
* - 7050 oscillator: body 7.0 × 5.0, pads 1.8 × 2.0 at ±2.54, ±1.4;
|
|
20
|
+
* - HC-49/US SMD: body 11.4 × 4.7 (the metal can on its plastic seat), pads 5.5 × 2.0 at ±4.75.
|
|
21
|
+
*/
|
|
22
|
+
const TYPICAL = new Map([
|
|
23
|
+
["xtal2016", { label: "2.0 × 1.6 mm crystal", body: { x: 1.0, y: 0.8 }, pad: { x: 0.7, y: 0.6 }, centre: { x: 0.7, y: 0.5 }, cited: false }],
|
|
24
|
+
["xtal2520", { label: "2.5 × 2.0 mm crystal", body: { x: 1.25, y: 1.0 }, pad: { x: 0.9, y: 0.8 }, centre: { x: 0.85, y: 0.65 }, cited: false }],
|
|
25
|
+
["xtal5032", { label: "5.0 × 3.2 mm crystal, four pads", body: { x: 2.5, y: 1.6 }, pad: { x: 1.6, y: 1.4 }, centre: { x: 1.85, y: 1.1 }, cited: false }],
|
|
26
|
+
["xtal5032_2", { label: "5.0 × 3.2 mm crystal, two pads", body: { x: 2.5, y: 1.6 }, pad: { x: 2.0, y: 2.4 }, centre: { x: 1.85, y: 0 }, cited: false }],
|
|
27
|
+
["xtal3215", { label: "3.2 × 1.5 mm 32.768 kHz crystal", body: { x: 1.6, y: 0.75 }, pad: { x: 1.0, y: 1.8 }, centre: { x: 1.25, y: 0 }, cited: false }],
|
|
28
|
+
["xtal7050", { label: "7.0 × 5.0 mm oscillator", body: { x: 3.5, y: 2.5 }, pad: { x: 1.8, y: 2.0 }, centre: { x: 2.54, y: 1.4 }, cited: false }],
|
|
29
|
+
["hc49smd", { label: "HC-49/US SMD crystal", body: { x: 5.7, y: 2.35 }, pad: { x: 5.5, y: 2.0 }, centre: { x: 4.75, y: 0 }, cited: false }],
|
|
30
|
+
]);
|
|
31
|
+
const XTALS = new Map([["xtal3225", XTAL3225], ...TYPICAL]);
|
|
32
|
+
function keyOf(parsed) {
|
|
33
|
+
if (parsed.kind === "hc" && parsed.code === "49" && parsed.suffix === "smd") {
|
|
34
|
+
return parsed.cross === undefined && parsed.variant === undefined && parsed.size === undefined && Object.keys(parsed.params).length === 0 ? "hc49smd" : undefined;
|
|
35
|
+
}
|
|
36
|
+
if (parsed.kind !== "xtal")
|
|
37
|
+
return undefined;
|
|
38
|
+
if (parsed.variant === "2" && Object.keys(parsed.params).length === 0 && parsed.cross === undefined && parsed.suffix === undefined && parsed.size === undefined)
|
|
39
|
+
return `xtal${parsed.code}_2`;
|
|
40
|
+
return isBare(parsed) ? `xtal${parsed.code}` : undefined;
|
|
41
|
+
}
|
|
42
|
+
/** A surface-mount crystal or oscillator from the table above, or undefined. */
|
|
43
|
+
export function xtalFootprint(parsed) {
|
|
44
|
+
const key = keyOf(parsed);
|
|
45
|
+
const xtal = key === undefined ? undefined : XTALS.get(key);
|
|
46
|
+
if (!key || !xtal)
|
|
47
|
+
return undefined;
|
|
48
|
+
const pads = xtal.centre.y === 0
|
|
49
|
+
? pairPads(xtal.centre.x, xtal.pad.x, xtal.pad.y)
|
|
50
|
+
: rowPads([-xtal.centre.x, xtal.centre.x], xtal.centre.y, xtal.pad.x, xtal.pad.y);
|
|
51
|
+
const body = closedRectangle(xtal.body);
|
|
52
|
+
return {
|
|
53
|
+
name: key,
|
|
54
|
+
pads,
|
|
55
|
+
courtyard: courtyard(pads, xtal.body, FIXED_LAND_COURTYARD),
|
|
56
|
+
silkscreen: [...clearOutline(body, pads), tickBelow(pads, pads[0])],
|
|
57
|
+
fabrication: [body],
|
|
58
|
+
origin: `Surface-mount ${xtal.label}: fixed land pattern, ${xtal.cited ? "from the maker's recommended land pattern" : "typical, not from one maker's drawing"}`,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=xtal.js.map
|