kicad-to-circuit-json 0.0.134 → 0.0.136

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1226,7 +1226,8 @@ function processPad({
1226
1226
  ctx,
1227
1227
  componentId,
1228
1228
  pos: globalPos,
1229
- drill
1229
+ drill,
1230
+ ccwRotationDegrees: padAt.angle ?? 0
1230
1231
  });
1231
1232
  } else {
1232
1233
  createPlatedHole({
@@ -1721,7 +1722,21 @@ function createPlatedHole(params) {
1721
1722
  }
1722
1723
  }
1723
1724
  function createNpthHole(params) {
1724
- const { ctx, componentId, pos, drill } = params;
1725
+ const { ctx, componentId, pos, drill, ccwRotationDegrees } = params;
1726
+ if (drill?.oval) {
1727
+ ctx.db.insert({
1728
+ type: "pcb_hole",
1729
+ hole_shape: "rotated_pill",
1730
+ pcb_component_id: componentId,
1731
+ x: pos.x,
1732
+ y: pos.y,
1733
+ hole_width: drill.diameter,
1734
+ hole_height: drill.width ?? drill.diameter,
1735
+ // KiCad pad angles are already absolute board angles, including on B.Cu.
1736
+ ccw_rotation: ccwRotationDegrees
1737
+ });
1738
+ return;
1739
+ }
1725
1740
  const holeDiameter = drill?.diameter ?? 1;
1726
1741
  const hole = {
1727
1742
  type: "pcb_hole",
@@ -2031,6 +2046,7 @@ function processFootprint(ctx, footprint) {
2031
2046
  // Will be computed from pads if needed
2032
2047
  height: 0,
2033
2048
  source_component_id: sourceComponentId,
2049
+ ...footprint.attr?.dnp ? { do_not_place: true } : {},
2034
2050
  ...footprintMetadata ? { metadata: footprintMetadata } : {}
2035
2051
  });
2036
2052
  const componentId = inserted.pcb_component_id;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "kicad-to-circuit-json",
3
3
  "main": "dist/index.js",
4
4
  "type": "module",
5
- "version": "0.0.134",
5
+ "version": "0.0.136",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/tscircuit/kicad-to-circuit-json"