@tscircuit/footprinter 0.0.342 → 0.0.343

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
@@ -7959,20 +7959,33 @@ var vssop = (raw_params) => {
7959
7959
  silkscreenBoxHeight / 2 + 0.5,
7960
7960
  0.3
7961
7961
  );
7962
- const courtyardPadding = 0.25;
7963
- const padCenterX = parameters.num_pins === 10 ? length50.parse("2.2mm") : length50.parse("1.8mm");
7964
- const crtMinX = -(padCenterX + pl / 2) - courtyardPadding;
7965
- const crtMaxX = padCenterX + pl / 2 + courtyardPadding;
7966
- const crtMinY = -silkscreenBoxHeight / 2 - courtyardPadding;
7967
- const crtMaxY = silkscreenBoxHeight / 2 + courtyardPadding;
7962
+ const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
7963
+ const pinRowSpanY = (parameters.num_pins / 2 - 1) * p + pw;
7964
+ const courtyardStepInnerHalfX = roundToCourtyardGrid(w / 2 + 0.25);
7965
+ const courtyardStepOuterHalfX = roundToCourtyardGrid(
7966
+ courtyardStepInnerHalfX + 1.43
7967
+ );
7968
+ const courtyardStepInnerHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.255);
7969
+ const courtyardStepOuterHalfY = roundToCourtyardGrid(h / 2 + 0.25);
7968
7970
  const courtyard = {
7969
- type: "pcb_courtyard_rect",
7970
- pcb_courtyard_rect_id: "",
7971
+ type: "pcb_courtyard_outline",
7972
+ pcb_courtyard_outline_id: "",
7971
7973
  pcb_component_id: "",
7972
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
7973
- width: crtMaxX - crtMinX,
7974
- height: crtMaxY - crtMinY,
7975
- layer: "top"
7974
+ layer: "top",
7975
+ outline: createRectUnionOutline([
7976
+ {
7977
+ minX: -courtyardStepOuterHalfX,
7978
+ maxX: courtyardStepOuterHalfX,
7979
+ minY: -courtyardStepInnerHalfY,
7980
+ maxY: courtyardStepInnerHalfY
7981
+ },
7982
+ {
7983
+ minX: -courtyardStepInnerHalfX,
7984
+ maxX: courtyardStepInnerHalfX,
7985
+ minY: -courtyardStepOuterHalfY,
7986
+ maxY: courtyardStepOuterHalfY
7987
+ }
7988
+ ])
7976
7989
  };
7977
7990
  return {
7978
7991
  circuitJson: [