Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<patternlayout /> element, <padgroup /> element #64

Open
seveibar opened this issue Oct 18, 2024 · 0 comments
Open

<patternlayout /> element, <padgroup /> element #64

seveibar opened this issue Oct 18, 2024 · 0 comments

Comments

@seveibar
Copy link
Contributor

seveibar commented Oct 18, 2024

A <patternlayout /> element places all it's components in a designated pattern.

The pattern prop can be:

  • linear
  • grid
  • circular
  • quad

This is useful for footprint pads that need to be placed in a quad pattern, or keyboards with fixed-distance keys.

You can use a <patternlayout /> within a constrainedlayout but it the pattern-established relative distances are fixed.

Example usage:

<chip
  footprint={
   <footprint>
     <patternlayout pattern="quad" leftSidePins={2} rightSidePins={2} widthFromCenters={5} heightFromCenters={3}>
        <smtpad width="10mm" height="4mm" pinNumber={1} />
        <smtpad width="10mm" height="4mm" pinNumber={2} />
        <smtpad width="10mm" height="4mm" pinNumber={3} />
        <smtpad width="10mm" height="4mm" pinNumber={4} />
     </patternlayout>
   </footprint>
   }
/>

Quad could have the following props:

  • left/top/right/bottomSidePins
  • height/widthFromCenters, outerWidth, innerWidth
  • pitch
  • pin1Position ("leftside-top" | "topside-left" | "topside-right" etc, see footprinter for enum)

This is very similar to footprinter, except we can do more complex things for each pin. For example we could have <padgroup /> to allow multiple elements per pad to form a stamp.

<chip
  footprint={
   <footprint>
     <patternlayout pattern="quad" leftSidePins={2} rightSidePins={2} widthFromCenters={5} heightFromCenters={3}>
          <padgroup pinNumber={1}>
            <smtpad shape="rect" width="10mm" height="4mm" />
            <smtpad shape="circle" radius="1mm" pcbX={5} />
            <hole radius="0.5mm" />
          </padgroup>
     </patternlayout>
   </footprint>
   }
/>
@seveibar seveibar changed the title <patternlayout /> element <patternlayout /> element, <padgroup /> element Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant