Conversation
I am running into the problem that the parity tests expect json from kicad but all of the kicad footprints I have are "*.kicad_mod" instead of json. https://kicad-mod-cache.tscircuit.com/Package_SON.pretty/VSON-8-1EP_3x3mm_P0.65mm_EP1.65x2.4mm.kicad_mod Edit: figured out that I just need to change the file extension on the url. |
There was a problem hiding this comment.
This discrepancy with kicad appears to be happening because of a difference between these 2 files
- https://kicad-mod-cache.tscircuit.com/Package_SON.pretty/VSON-8_3.3x3.3mm_P0.65mm_NexFET.circuit.json
- https://kicad-mod-cache.tscircuit.com/Package_SON.pretty/VSON-8_3.3x3.3mm_P0.65mm_NexFET.kicad_mod
in the kicad mod, there are pins with both 1.44 and -1.44, but in the circuit json there is only -1.44
both have the same 0.385 x offset for the central exposed pad which can be identified in the json by its dimensions of width 1.9 and height 2.45
src/fn/vson.ts
Outdated
| grid: dim2d, | ||
| ep: dim2d.default("0x0mm"), | ||
| epx: length.default("0mm"), | ||
| pinw: length, | ||
| pinh: length, |
There was a problem hiding this comment.
pinw is pin width and pinh is pin height. This allows the pin squares to match the numbers in kicad viewer.
I can add a code comment saying that if that would be a good thing to do.
There was a problem hiding this comment.
@joncherry I understand, but we’ve never used these before your PR. It would help a lot if you could describe the EO and EPX more clearly, and also explain what the fgrid is used for.
There was a problem hiding this comment.
I have added code comments to describe them.
chore: add code-comments to vson_def params
b3475dc
tests/kicad-parity/vson5_kicad_parity.test.ts shows a decent example of them getting used.
The name VSON-8_3.3x3.3mm_P0.65mm_NexFET is what is shown in kicad viewer.
from the kicad name we get the first part of the test VSON8_grid3.3x3.3mm_P0.65mm but to make the footprint match we need the rest of the numbers from the kicad source file so it uses addition functions/params _ep1.9x2.45mm_epx0.385mm_w2.88mm_pinw0.63mm_pinh0.5mm
There was a problem hiding this comment.
I suppose that the reason these extra functions/params are needed is because the vson.ts file is used for multiple footprints instead of using individual files for each footprint (for example vson8_3.3x3.3mm_p0.65mm_nexfet.ts) with hardcoded values for the extra data that is not in the name from kicad viewer.
| const svgContent = convertCircuitJsonToPcbSvg(combinedFootprintElements) | ||
| expect(svgContent).toMatchSvgSnapshot( | ||
| import.meta.path, | ||
| "Texas_VSON-HR-8_1.5x2mm_P0.5mm", | ||
| ) | ||
| expect(booleanDifferenceSvg).toMatchSvgSnapshot( | ||
| import.meta.path, | ||
| "Texas_VSON-HR-8_1.5x2mm_P0.5mm_boolean_difference", | ||
| ) |
There was a problem hiding this comment.
please remove it. we never use company name
There was a problem hiding this comment.
done. I removed the test (vson3 test) and renamed the test files (vson 4,5,6 -> 3,4,5) so that they still follow a numerical sequence so that the graphite review bot will stay happy.
chore: remove texas vson test
8e3a79d
src/fn/vson.ts
Outdated
| grid: dim2d, // width and height of the border of the footprint (used for silkscreen lines) | ||
| ep: dim2d.default("0x0mm"), // width and height of the central exposed thermal pad | ||
| epx: length.default("0mm"), // x offset of the center of the central exposed thermal pad | ||
| pinw: length, // width of the pin pads | ||
| pinh: length, // height of the pin pads | ||
| }) |
There was a problem hiding this comment.
please use .describe() instead of comments
|
Dang. Only meant to re-request review from techmannih |
|
@techmannih I have moved on to other projects, so I won't be working on this anymore. Anyone can feel free to take over or borrow from this PR. I hope the work I have done is useful to someone. |
/closes #182
Summary
Add vson for various pin and pad configurations based on search results for search term "vson" in kicad viewer.
added as tests:
HOT TIP: clicking "source" next to the title in kicad viewer will show exact numbers which is more precise than taking measurements with the "d" hotkey.
(<-click to expand) AI overview of some vson meaning:
The term VSON-10-1EP_3x3mm_P0.5mm_EP1.65x2.4mm is a specific footprint name used in printed circuit board (PCB) design software (like KiCad or Altium) to define the physical layout and dimensions for a specific electronic component package. Here's a breakdown of what each part of the name means:In summary, this footprint name is a precise instruction for the PCB design software to create a land pattern (the copper pads on the PCB) that matches the physical specifications of a 10-pin VSON component with a central thermal pad, ensuring the component can be correctly placed and soldered onto the board.
For more information on specific packages, you can often find detailed package drawings and land pattern recommendations in the datasheets provided by component manufacturers like Texas Instruments or Onsemi.