@@ -16,9 +16,76 @@ as a standalone element.
1616
1717import CircuitPreview from " @site/src/components/CircuitPreview"
1818
19+ ## Hole Shapes
20+
21+ Two hole shapes are supported:
22+
23+ - ` circle ` - A circular hole (default)
24+ - ` pill ` - A pill-shaped hole (rounded rectangle)
25+
26+ ### Circle Hole
27+
28+ A circular hole is the most common type used for mounting:
29+
1930<CircuitPreview
2031 defaultView = " 3d"
32+ browser3dView = { false }
2133 code = { ` export default () => (
22- <hole diameter="3mm" x={10} y={10} />
34+ <board width="30mm" height="20mm">
35+ <hole diameter="3mm" x={10} y={10} />
36+ </board>
2337 ) ` }
2438/>
39+
40+ ### Pill-Shaped Hole
41+
42+ Pill-shaped holes are useful for mounting components that need elongated holes or for allowing some positional adjustment:
43+
44+ <CircuitPreview
45+ defaultView = " pcb"
46+ browser3dView = { false }
47+ code = { ` export default () => (
48+ <board width="30mm" height="20mm">
49+ <hole
50+ shape="pill"
51+ width="5mm"
52+ height="2mm"
53+ pcbX={0}
54+ pcbY={0}
55+ />
56+ </board>
57+ ) ` }
58+ />
59+
60+ ### Rotated Pill Hole
61+
62+ Pill-shaped holes can be rotated using the ` pcbRotation ` property:
63+
64+ <CircuitPreview
65+ defaultView = " pcb"
66+ browser3dView = { false }
67+ code = { ` export default () => (
68+ <board width="30mm" height="20mm">
69+ <hole
70+ shape="pill"
71+ width="5mm"
72+ height="2mm"
73+ pcbX={0}
74+ pcbY={0}
75+ pcbRotation="45deg"
76+ />
77+ </board>
78+ ) ` }
79+ />
80+
81+ ## Properties
82+
83+ | Property | Shape | Type | Default | Description |
84+ | ----------| -------| ------| ---------| -------------|
85+ | shape | all | ` "circle" ` \| ` "pill" ` | ` "circle" ` | Shape of the hole |
86+ | diameter | circle | number \| string | - | Diameter of the circular hole |
87+ | width | pill | number \| string | - | Width of the pill-shaped hole |
88+ | height | pill | number \| string | - | Height of the pill-shaped hole |
89+ | x | all | number | 0 | X position of the hole center |
90+ | y | all | number | 0 | Y position of the hole center |
91+ | pcbRotation | pill | number \| string | 0 | Rotation angle in degrees (e.g., ` "45deg" ` or ` 45 ` ) |
0 commit comments