diff --git a/docs/elements/hole.mdx b/docs/elements/hole.mdx index 1b40f74e..a6fd30ef 100644 --- a/docs/elements/hole.mdx +++ b/docs/elements/hole.mdx @@ -18,14 +18,16 @@ import CircuitPreview from "@site/src/components/CircuitPreview" ## Hole Shapes -Two hole shapes are supported: +Three hole shapes are supported: - `circle` - A circular hole (default) - `pill` - A pill-shaped hole (rounded rectangle) +- `rect` - A rectangular hole ### Circle Hole -A circular hole is the most common type used for mounting: +A circular hole is the most common type used for mounting. Provide either +`diameter` or `radius`: ( - + )`} /> @@ -59,9 +61,31 @@ Pill-shaped holes are useful for mounting components that need elongated holes o )`} /> +### Rectangular Hole + +Rectangular holes are useful when you need a slot with straight edges: + + ( + + + + )`} +/> + ### Rotated Pill Hole -Pill-shaped holes can be rotated using the `pcbRotation` property: +Pill-shaped and rectangular holes can be rotated using the `pcbRotation` +property: )`} @@ -85,10 +111,13 @@ Pill-shaped holes can be rotated using the `pcbRotation` property: | Property | Shape | Type | Default | Description | |----------|-------|------|---------|-------------| -| shape | all | `"circle"` \| `"pill"` | `"circle"` | Shape of the hole | +| shape | all | `"circle"` \| `"pill"` \| `"rect"` | `"circle"` | Shape of the hole | | diameter | circle | number \| string | - | Diameter of the circular hole | -| width | pill | number \| string | - | Width of the pill-shaped hole | -| height | pill | number \| string | - | Height of the pill-shaped hole | +| radius | circle | number \| string | - | Radius of the circular hole | +| width | pill, rect | number \| string | - | Width of the pill-shaped or rectangular hole | +| height | pill, rect | number \| string | - | Height of the pill-shaped or rectangular hole | +| solderMaskMargin | all | number \| string | - | Solder mask opening margin around the hole | +| coveredWithSolderMask | all | boolean | - | Whether the hole should be covered by solder mask | | pcbX | all | number | 0 | X position of the hole center on the PCB | | pcbY | all | number | 0 | Y position of the hole center on the PCB | -| pcbRotation | pill | number \| string | 0 | Rotation angle in degrees (e.g., `"45deg"` or `45`) | +| pcbRotation | pill, rect | number \| string | 0 | Rotation angle in degrees (e.g., `"45deg"` or `45`) | diff --git a/docs/intro/quickstart-ChatGPT.mdx b/docs/intro/quickstart-ChatGPT.mdx index 43464c43..6a886c2e 100644 --- a/docs/intro/quickstart-ChatGPT.mdx +++ b/docs/intro/quickstart-ChatGPT.mdx @@ -191,7 +191,7 @@ are optional. - `` - `from`, `to` - `` - `type` (npn/pnp/nmos/pmos) - `` - `channelType` (n/p), `mosfetMode` (enhancement/depletion) -- `` - `diameter` +- `` - `diameter`, `radius`, `shape` (circle/pill/rect), `solderMaskMargin`, `coveredWithSolderMask` - `` - `padShape` (circle/rect), `padDiameter`, `footprintVariant` (smd/through_hole), `width`, `height` - `` - `holeDiameter`, `outerDiameter` - `` - `spdt` (bool), `dpdt` (bool), `spst` (bool), `spdt` (bool), `isNormallyClosed` @@ -242,4 +242,4 @@ Selectors are used in the `connections` prop and the `from` and `to` props of th ``` can you create a 555 timer circuit in tscircuit with a square wave output? -``` \ No newline at end of file +```