raykholo/polygon-not-rotating-with-chip

The code defines a 10mm by 10mm electronic PCB with a single polarized SMT chip featuring polygon-shaped top-layer solder pads at specified coordinates.

Usage: To import and use this component: ```tsx import { YourComponent } from "@tsci/raykholo.polygon-not-rotating-with-chip" export default () => ( <board width="10mm" height="10mm"> <YourComponent name="PCMN1" pcbX={0} pcbY={0} pcbRotation="90deg" /> </board> ) ``` Key points: - Import the component from the package - Place it on a board with optional positioning and rotation - Customize name and placement as needed

Version
0.0.1
License
unset
Stars
0

dist/index.js

PCBPCB preview for dist/index.js
SchematicSchematic preview for dist/index.js
var index = () => /*#__PURE__*/React.createElement("board", {
  width: "10mm",
  height: "10mm"
}, /*#__PURE__*/React.createElement("chip", {
  name: "PCMN1",
  pcbX: 0,
  pcbY: 0,
  pcbRotation: "90deg" //{(cell.index-1)*90}
  ,
  footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("smtpad", {
    pcbX: "0mm",
    pcbY: "0mm",
    layer: "top",
    shape: "polygon"
    //radius="2.5mm"

    //width="5mm"
    //height="5mm"
    ,
    portHints: ["pin1"],
    points: [{
      x: -0.2,
      y: -0.2
    }, {
      x: -0.2,
      y: 2.5
    }, {
      x: -2.5,
      y: 0
    }, {
      x: 0,
      y: -2.5
    }, {
      x: 2.5,
      y: -0.2
    }, {
      x: -0.2,
      y: -0.2
    }]
  }))
}));

export { index as default };