Skip to content

Commit

Permalink
fix props for plated hole
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Oct 13, 2024
1 parent af0e1ab commit 3dc1a9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/generate-footprint-tsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export const generateFootprintTsx = (
for (const platedHole of platedHoles) {
if (platedHole.shape === "oval") {
elementStrings.push(
`<platedhole portHints={${JSON.stringify(platedHole.port_hints)}} pcbX="${mmStr(platedHole.x)}" pcbY="${mmStr(platedHole.y)}" diameter="${mmStr(platedHole.hole_width)}" height="${mmStr(platedHole.hole_height)}" shape="oval" />`,
`<platedhole portHints={${JSON.stringify(platedHole.port_hints)}} pcbX="${mmStr(platedHole.x)}" pcbY="${mmStr(platedHole.y)}" outerHeight="${mmStr(platedHole.outer_height)}" outerWidth="${mmStr(platedHole.outer_width)}" holeHeight="${mmStr(platedHole.hole_height)}" holeWidth="${mmStr(platedHole.hole_width)}" height="${mmStr(platedHole.hole_height)}" shape="oval" />`,
)
} else if (platedHole.shape === "circle") {
elementStrings.push(
`<platedhole portHints={${JSON.stringify(platedHole.port_hints)}} pcbX="${mmStr(platedHole.x)}" pcbY="${mmStr(platedHole.y)}" diameter="${mmStr(platedHole.hole_diameter)}" shape="circle" />`,
`<platedhole portHints={${JSON.stringify(platedHole.port_hints)}} pcbX="${mmStr(platedHole.x)}" pcbY="${mmStr(platedHole.y)}" outerDiameter="${mmStr(platedHole.outer_diameter)}" holeDiameter="${mmStr(platedHole.hole_diameter)}" shape="circle" />`,
)
} else if (platedHole.shape === "pill") {
console.warn("Unhandled pill hole in conversion (needs implementation)")
Expand Down

0 comments on commit 3dc1a9d

Please sign in to comment.