Skip to content

Commit 9e659e2

Browse files
authored
Add support of rectangle pad hole (#486)
* Add support of rectangle pad hole Rectangle pad hole needs for Altium Design support and may be for other cads. * Add support of rectangle pad hole Update schema * Add support of rectangle pad hole Update DATAFORMAT
1 parent f9a419b commit 9e659e2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

DATAFORMAT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ Footprints are a collection of pads, drawings and some metadata.
324324
// "smd" otherwise.
325325
"type": type,
326326
// Present only if type is "th".
327-
// One of "circle", "oblong".
327+
// One of "circle", "oblong" or "rect".
328328
"drillshape": drillshape,
329329
// Present only if type is "th". In case of circle shape x is diameter, y is ignored.
330330
"drillsize": [x, y],

InteractiveHtmlBom/ecad/schema/genericjsonpcbdata_v1.schema

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@
462462
"type": "string",
463463
"enum": [
464464
"circle",
465-
"oblong"
465+
"oblong",
466+
"rect"
466467
],
467468
"title": "Drillshape"
468469
},

InteractiveHtmlBom/web/render.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ function drawPadHole(ctx, pad, padHoleColor) {
310310
ctx.fillStyle = padHoleColor;
311311
if (pad.drillshape == "oblong") {
312312
ctx.fill(getOblongPath(pad.drillsize));
313+
} else if (pad.drillshape == "rect") {
314+
ctx.fill(getChamferedRectPath(pad.drillsize, 0, 0, 0));
313315
} else {
314316
ctx.fill(getCirclePath(pad.drillsize[0] / 2));
315317
}

0 commit comments

Comments
 (0)