jscad-electronics 0.0.155 → 0.0.157

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 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