@tscircuit/footprinter 0.0.340 → 0.0.341

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.
package/dist/index.js CHANGED
@@ -4976,19 +4976,31 @@ var sop8 = (raw_params) => {
4976
4976
  ],
4977
4977
  stroke_width: 0.1
4978
4978
  };
4979
- const courtyardPadding = 0.25;
4980
- const crtMinX = -parameters.w / 2 - courtyardPadding;
4981
- const crtMaxX = parameters.w / 2 + courtyardPadding;
4982
- const crtMinY = -sh / 2 - courtyardPadding;
4983
- const crtMaxY = sh / 2 + 0.4 + courtyardPadding;
4979
+ const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
4980
+ const pinRowSpanY = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw;
4981
+ const courtyardStepInnerHalfX = roundToCourtyardGrid(parameters.w / 2 - 1.395);
4982
+ const courtyardStepOuterHalfX = roundToCourtyardGrid(parameters.w / 2 + 0.255);
4983
+ const courtyardStepInnerHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.25);
4984
+ const courtyardStepOuterHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.5);
4984
4985
  const courtyard = {
4985
- type: "pcb_courtyard_rect",
4986
- pcb_courtyard_rect_id: "",
4986
+ type: "pcb_courtyard_outline",
4987
+ pcb_courtyard_outline_id: "",
4987
4988
  pcb_component_id: "",
4988
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
4989
- width: crtMaxX - crtMinX,
4990
- height: crtMaxY - crtMinY,
4991
- layer: "top"
4989
+ layer: "top",
4990
+ outline: createRectUnionOutline([
4991
+ {
4992
+ minX: -courtyardStepOuterHalfX,
4993
+ maxX: courtyardStepOuterHalfX,
4994
+ minY: -courtyardStepInnerHalfY,
4995
+ maxY: courtyardStepInnerHalfY
4996
+ },
4997
+ {
4998
+ minX: -courtyardStepInnerHalfX,
4999
+ maxX: courtyardStepInnerHalfX,
5000
+ minY: -courtyardStepOuterHalfY,
5001
+ maxY: courtyardStepOuterHalfY
5002
+ }
5003
+ ])
4992
5004
  };
4993
5005
  return {
4994
5006
  circuitJson: [