jscad-electronics 0.0.154 → 0.0.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +1137 -1129
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +556 -7
- package/dist/vanilla.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -106,6 +106,24 @@ final screen backplane independently of `foldDistanceFromConnector` and
|
|
|
106
106
|
the board edge. Every orientation is also available as a boolean shortcut, for
|
|
107
107
|
example `<FlexScreen sitsFlat />` or `<FlexScreen foldsBelowBoard />`.
|
|
108
108
|
|
|
109
|
+
Until tscircuit has a dedicated CAD-model DSL, the same model can be selected
|
|
110
|
+
through a footprinter string. Each underscore-separated token sets one model
|
|
111
|
+
property:
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
<component cadModel="flexscreen_w40mm_h22.5mm_flex60mm_foldsabove_distance20mm_foldstart9mm_outset6mm" />
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`distance` is orientation-aware: it becomes `distanceAboveBoard` with
|
|
118
|
+
`foldsabove` and `distanceBelowBoard` with `foldsbelow`. Explicit
|
|
119
|
+
`distanceabove` and `distancebelow` tokens are also supported. Other useful
|
|
120
|
+
tokens include `diagonal`, `ratio16x9`, `flexwidth`, `foldsegments`,
|
|
121
|
+
`rightangleabove`, `rightanglebelow`, `sitsflat`, `conductors`, and
|
|
122
|
+
`hideconductors`. Unknown tokens throw an error so a typo cannot silently
|
|
123
|
+
produce the wrong model. Parsing and validation are provided by
|
|
124
|
+
[`@tscircuit/modelprinter`](https://github.com/tscircuit/modelprinter), keeping
|
|
125
|
+
the string grammar independent of this JSCAD renderer.
|
|
126
|
+
|
|
109
127
|
## Integration with tscircuit
|
|
110
128
|
|
|
111
129
|
jscad-electronics is designed to work seamlessly with tscircuit. You can use these 3D models in your tscircuit projects to create accurate 3D representations of your PCB designs just by
|
package/dist/index.d.ts
CHANGED
|
@@ -262,12 +262,11 @@ interface SOD123Props {
|
|
|
262
262
|
*/
|
|
263
263
|
declare const SOD123: ({ fullWidth, fullLength, }?: SOD123Props) => react_jsx_runtime.JSX.Element;
|
|
264
264
|
|
|
265
|
-
declare const PinRow: ({ numberOfPins, pitch, longSidePinLength, invert,
|
|
265
|
+
declare const PinRow: ({ numberOfPins, pitch, longSidePinLength, invert, rows, smd, rightangle, }: {
|
|
266
266
|
numberOfPins: number;
|
|
267
267
|
pitch?: number;
|
|
268
268
|
longSidePinLength?: number;
|
|
269
269
|
invert?: boolean;
|
|
270
|
-
faceup?: boolean;
|
|
271
270
|
rows?: number;
|
|
272
271
|
smd?: boolean;
|
|
273
272
|
rightangle?: boolean;
|
|
@@ -278,7 +277,7 @@ interface AxialCapacitorProps {
|
|
|
278
277
|
}
|
|
279
278
|
declare const AxialCapacitor: ({ pitch }: AxialCapacitorProps) => react_jsx_runtime.JSX.Element;
|
|
280
279
|
|
|
281
|
-
declare const PinHeader: ({ x, y, pinThickness, shortSidePinLength, longSidePinLength, bodyHeight, bodyLength, bodyWidth, flipZ,
|
|
280
|
+
declare const PinHeader: ({ x, y, pinThickness, shortSidePinLength, longSidePinLength, bodyHeight, bodyLength, bodyWidth, flipZ, smd, rightangle, }: {
|
|
282
281
|
x: number;
|
|
283
282
|
y: number;
|
|
284
283
|
pinThickness: number;
|
|
@@ -288,7 +287,6 @@ declare const PinHeader: ({ x, y, pinThickness, shortSidePinLength, longSidePinL
|
|
|
288
287
|
bodyLength?: number;
|
|
289
288
|
bodyWidth?: number;
|
|
290
289
|
flipZ: (z: number) => number;
|
|
291
|
-
faceup?: boolean;
|
|
292
290
|
smd?: boolean;
|
|
293
291
|
rightangle?: boolean;
|
|
294
292
|
}) => react_jsx_runtime.JSX.Element;
|