Skip to content

Commit ce51782

Browse files
committed
Update dataformat and readme docs
1 parent 5c42502 commit ce51782

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

DATAFORMAT.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pcbdata = {
5555
"F": [
5656
{
5757
// SVG path of the polygon given as 'd' attribute of svg spec.
58-
// If "svgpath" is present "polygons" is ignored.
58+
// If "svgpath" is present "polygons" is ignored.
5959
"svgpath": svgpath,
6060
"polygons": [
6161
// Set of polylines same as in polygon drawing.
@@ -105,8 +105,9 @@ pcbdata = {
105105

106106
# drawing struct
107107

108-
All drawings are either graphical items (arcs, lines, circles)
108+
All drawings are either graphical items (arcs, lines, circles, curves)
109109
or text.
110+
110111
Rendering method and properties are determined based on `type`
111112
attribute.
112113

@@ -151,6 +152,19 @@ attribute.
151152
}
152153
```
153154

155+
### curve
156+
157+
```js
158+
{
159+
"type": "curve", // Bezier curve
160+
"start": [x, y],
161+
"end": [x, y],
162+
"cpa": [x, y], // control point A
163+
"cpb": [x, y], // control point B
164+
"width": width,
165+
}
166+
```
167+
154168
### polygon
155169

156170
```js
@@ -238,7 +252,7 @@ Footprints are a collection of pads, drawings and some metadata.
238252
"shape": shape,
239253
// Only present if shape is "custom".
240254
// SVG path of the polygon given as 'd' attribute of svg spec.
241-
// If "svgpath" is present "polygons", "pos", "angle" are ignored.
255+
// If "svgpath" is present "polygons", "pos", "angle" are ignored.
242256
"svgpath": svgpath,
243257
"polygons": [
244258
// Set of polylines same as in polygon drawing.
@@ -249,7 +263,7 @@ Footprints are a collection of pads, drawings and some metadata.
249263
"radius": radius,
250264
// Only present if shape is "chamfrect".
251265
// chamfpos is a bitmask, left = 1, right = 2, bottom left = 4, bottom right = 8
252-
"chamfpos": chamfpos,
266+
"chamfpos": chamfpos,
253267
"chamfratio": ratio,
254268
// Pad type is "th" for standard and NPTH pads
255269
// "smd" otherwise.

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ as additional columns in the BOM table (for example manufacturer id) or it can b
1717
used to indicate which components should be omitted altogether (dnp field). For
1818
full description of functionality see [wiki](https://github.com/openscopeproject/InteractiveHtmlBom/wiki).
1919

20-
Generated html page is fully self contained, doesn't need internet connection to work and can be packaged with documentation of your project or hosted anywhere on the web.
20+
Generated html page is fully self contained, doesn't need internet connection to work
21+
and can be packaged with documentation of your project or hosted anywhere on the web.
2122

2223
[Demo is worth a thousand words.](https://openscopeproject.org/InteractiveHtmlBomDemo/)
2324

@@ -29,8 +30,9 @@ See [project wiki](https://github.com/openscopeproject/InteractiveHtmlBom/wiki)
2930

3031
Plugin code is licensed under MIT license, see `LICENSE` for more info.
3132

32-
Html page uses [Split.js](https://github.com/nathancahill/Split.js)
33-
and [PEP.js](https://github.com/jquery/PEP) libraries that get embedded into
33+
Html page uses [Split.js](https://github.com/nathancahill/Split.js),
34+
[PEP.js](https://github.com/jquery/PEP) and (stripped down)
35+
[lz-strings.js](https://github.com/pieroxy/lz-string) libraries that get embedded into
3436
generated bom page.
3537

3638
`units.py` is borrowed from [KiBom](https://github.com/SchrodingersGat/KiBoM)

0 commit comments

Comments
 (0)