From 8f854877e81d91836ae507c4293a4c075364ab59 Mon Sep 17 00:00:00 2001 From: Anas sarkiz Date: Sun, 14 Sep 2025 14:52:17 +0200 Subject: [PATCH 1/2] Add example usage of polygon --- docs/footprints/smtpad.mdx | 65 +++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/docs/footprints/smtpad.mdx b/docs/footprints/smtpad.mdx index ea0945c..ddc0578 100644 --- a/docs/footprints/smtpad.mdx +++ b/docs/footprints/smtpad.mdx @@ -34,23 +34,58 @@ import CircuitPreview from "@site/src/components/CircuitPreview" ## SMT Pad Shapes -There are 3 main types of smtpads: +There are 4 main types of smtpads: -- `rect` - A rectangular pad -- `circle` - A circular pad -- `pill` - A pill-shaped pad +- `rect` - A rectangular pad +- `circle` - A circular pad +- `pill` - A pill-shaped pad +- `polygon` - A custom polygon-shaped pad defined by a list of points -Each smtpad shape has different properties +Each smtpad shape has different properties. ## Properties -| Property | Shape | Description | -| ----------- | ------------ | -------------------------------------------------------------- | -| width | rect, pill | The width of the pad | -| height | rect, pill | The height of the pad | -| radius | circle, pill | The radius of the pad (for circle) or corner radius (for pill) | -| ccwRotation | rect | Counter-clockwise rotation angle in degrees | -| portHints | all | Array of port names that this pad connects to | -| pcbX | all | X position of the pad center on the PCB | -| pcbY | all | Y position of the pad center on the PCB | -| layer | all | Which layer the pad is on ("top" or "bottom") | +| Property | Shape | Description | +| ----------- | ------------ | --------------------------------------------------------------------------- | +| width | rect, pill | The width of the pad | +| height | rect, pill | The height of the pad | +| radius | circle, pill | The radius of the pad (for circle) or corner radius (for pill) | +| points | polygon | An array of `{ x, y }` coordinates describing the polygon vertices | +| ccwRotation | rect | Counter-clockwise rotation angle in degrees | +| portHints | all | Array of port names that this pad connects to | +| pcbX | all | X position of the pad center on the PCB | +| pcbY | all | Y position of the pad center on the PCB | +| layer | all | Which layer the pad is on (`"top"` or `"bottom"`) | + +## Example: Polygon Pad + +Here’s an example of using a **polygon smtpad** + + ( + + + + + } /> + + ) + `} +/> \ No newline at end of file From a067de1d8e40e0f7391452fd6d7c5560ba5cff67 Mon Sep 17 00:00:00 2001 From: Anas sarkiz Date: Sun, 14 Sep 2025 15:34:45 +0200 Subject: [PATCH 2/2] set defaultView=pcb --- docs/footprints/smtpad.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/footprints/smtpad.mdx b/docs/footprints/smtpad.mdx index ddc0578..f9fbc8a 100644 --- a/docs/footprints/smtpad.mdx +++ b/docs/footprints/smtpad.mdx @@ -62,7 +62,7 @@ Each smtpad shape has different properties. Here’s an example of using a **polygon smtpad** (