gerber-plotter
Advanced tools
Comparing version 4.2.2 to 4.2.4
@@ -6,2 +6,13 @@ # Change Log | ||
## [4.2.4](https://github.com/tracespace/tracespace/compare/v4.2.3...v4.2.4) (2020-12-15) | ||
### Bug Fixes | ||
* **types:** define more types for gerber-plotter ([#349](https://github.com/tracespace/tracespace/issues/349)) ([d1a1417](https://github.com/tracespace/tracespace/commit/d1a1417)) | ||
## [4.2.2](https://github.com/tracespace/tracespace/compare/v4.2.1...v4.2.2) (2020-10-13) | ||
@@ -8,0 +19,0 @@ |
121
index.d.ts
@@ -33,4 +33,125 @@ // Type definitions for gerber-plotter 4.0 | ||
type Notation = 'A' | 'I' | ||
type Direction = 'cw' | 'ccw' | ||
type Polarity = 'dark' | 'clear' | ||
type Point = [number, number] | ||
type Offset = [number, number] | ||
type Box = [number, number, number, number] | ||
type ToolId = string | ||
// ---------------------------------------------------------------------- | ||
// Shape aka Tool | ||
interface Circle { | ||
type: 'circle' | ||
r: number | ||
cx: number | ||
cy: number | ||
} | ||
interface Rect { | ||
type: 'rect' | ||
width: number | ||
height: number | ||
r: number | ||
cx: number | ||
cy: number | ||
} | ||
interface Poly { | ||
type: 'poly' | ||
points: Point[] | ||
} | ||
interface Ring { | ||
type: 'ring' | ||
r: number | ||
width: number | ||
cx: number | ||
cy: number | ||
} | ||
interface Clip { | ||
type: 'clip' | ||
shape: (Rect | Poly)[] | ||
clip: Ring | ||
} | ||
type Shape = Circle | Rect | Poly | Ring | ||
// ---------------------------------------------------------------------- | ||
// Segments | ||
interface Line { | ||
type: 'line' | ||
start: Point | ||
end: Point | ||
} | ||
interface Arc { | ||
type: 'arc' | ||
start: [number, number, number] // start x,y, angle | ||
end: [number, number, number] // end x,y, angle | ||
center: Point | ||
sweep: number | ||
radius: number | ||
dir: Direction | ||
} | ||
type Segment = Line | Arc | ||
// ---------------------------------------------------------------------- | ||
// Chunks | ||
interface ChunkShape { | ||
type: 'shape' | ||
tool: ToolId | ||
shape: Shape[] | ||
} | ||
interface ChunkPad { | ||
type: 'pad' | ||
x: number | ||
y: number | ||
tool: ToolId | ||
} | ||
interface ChunkFill { | ||
type: 'fill' | ||
path: Segment[] | ||
} | ||
interface ChunkStroke { | ||
type: 'stroke' | ||
width: number | ||
path: Segment[] | ||
} | ||
interface ChunkPolarity { | ||
type: 'polarity' | ||
polarity: Polarity | ||
} | ||
interface ChunkRepeat { | ||
type: 'repeat' | ||
offsets: Offset[] | ||
box: Box | ||
} | ||
interface ChunkSize { | ||
type: 'size' | ||
box: Box | ||
units: Units | ||
} | ||
type Chunk = | ||
| ChunkShape | ||
| ChunkPad | ||
| ChunkFill | ||
| ChunkStroke | ||
| ChunkPolarity | ||
| ChunkRepeat | ||
| ChunkSize | ||
} | ||
export = gerberPlotter |
{ | ||
"name": "gerber-plotter", | ||
"version": "4.2.2", | ||
"version": "4.2.4", | ||
"description": "Streaming Gerber / NC drill layer image plotter", | ||
@@ -44,3 +44,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "c3690c37fc17cdc3d15ce034e30e09bc084fffe1" | ||
"gitHead": "56dc0a6765937a1c62aa82fe85e007d379a70bc3" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
614464
4036