Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed silkscreen issue of some components #25

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/fn/soic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,15 @@ export const soicWithoutParsing = (params: z.infer<typeof soic_def>) => {
}

/** silkscreen width */
const m = Math.min(1, params.p / 2)
const sw = params.w - (params.legsoutside ? 0 : params.pl * 2) - 0.2
const sh = (params.num_pins / 2 - 1) * params.p + params.pw
const sh = (params.num_pins / 2 - 1) * params.p + params.pw + m
const silkscreenBorder: PcbSilkscreenPath = {
type: "pcb_silkscreen_path",
layer: "top",
pcb_component_id: "",
pcb_silkscreen_path_id: "silkscreen_path_1",
stroke_width: 0.1,
route: [
{ x: -sw / 2, y: -sh / 2 },
{ x: -sw / 2, y: sh / 2 },
Expand All @@ -124,7 +127,6 @@ export const soicWithoutParsing = (params: z.infer<typeof soic_def>) => {
{ x: sw / 2, y: -sh / 2 },
{ x: -sw / 2, y: -sh / 2 },
],
type: "pcb_silkscreen_path",
}

return [...pads, silkscreenBorder]
Expand Down
18 changes: 9 additions & 9 deletions tests/output/ms012.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions tests/output/ms013.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions tests/output/soic8_w5.3mm_p1.27mm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions tests/output/sot236.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions tests/output/sot563.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions tests/output/ssop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions tests/output/tssop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading