circuit-json-to-lbrn 0.0.34 → 0.0.35
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/dist/index.d.ts +4 -3
- package/lib/index.ts +26 -25
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CircuitJson } from 'circuit-json';
|
|
2
2
|
import { LightBurnProject } from 'lbrnts';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
interface ConvertCircuitJsonToLbrnOptions {
|
|
5
5
|
includeSilkscreen?: boolean;
|
|
6
6
|
origin?: {
|
|
7
7
|
x: number;
|
|
@@ -28,6 +28,7 @@ declare const convertCircuitJsonToLbrn: (circuitJson: CircuitJson, options?: {
|
|
|
28
28
|
pulseWidth?: number;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
|
+
declare const convertCircuitJsonToLbrn: (circuitJson: CircuitJson, options?: ConvertCircuitJsonToLbrnOptions) => LightBurnProject;
|
|
32
33
|
|
|
33
|
-
export { convertCircuitJsonToLbrn };
|
|
34
|
+
export { type ConvertCircuitJsonToLbrnOptions, convertCircuitJsonToLbrn };
|
package/lib/index.ts
CHANGED
|
@@ -17,33 +17,34 @@ import { addPcbCutout } from "./element-handlers/addPcbCutout"
|
|
|
17
17
|
import { createCopperShapesForLayer } from "./createCopperShapesForLayer"
|
|
18
18
|
import { createTraceClearanceAreasForLayer } from "./createTraceClearanceAreasForLayer"
|
|
19
19
|
|
|
20
|
+
export interface ConvertCircuitJsonToLbrnOptions {
|
|
21
|
+
includeSilkscreen?: boolean
|
|
22
|
+
origin?: { x: number; y: number }
|
|
23
|
+
margin?: number
|
|
24
|
+
includeCopper?: boolean
|
|
25
|
+
includeSoldermask?: boolean
|
|
26
|
+
globalCopperSoldermaskMarginAdjustment?: number
|
|
27
|
+
includeLayers?: Array<"top" | "bottom">
|
|
28
|
+
traceMargin?: number
|
|
29
|
+
laserSpotSize?: number
|
|
30
|
+
laserProfile?: {
|
|
31
|
+
copper?: {
|
|
32
|
+
speed?: number
|
|
33
|
+
numPasses?: number
|
|
34
|
+
frequency?: number
|
|
35
|
+
pulseWidth?: number
|
|
36
|
+
}
|
|
37
|
+
board?: {
|
|
38
|
+
speed?: number
|
|
39
|
+
numPasses?: number
|
|
40
|
+
frequency?: number
|
|
41
|
+
pulseWidth?: number
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
20
45
|
export const convertCircuitJsonToLbrn = (
|
|
21
46
|
circuitJson: CircuitJson,
|
|
22
|
-
options: {
|
|
23
|
-
includeSilkscreen?: boolean
|
|
24
|
-
origin?: { x: number; y: number }
|
|
25
|
-
margin?: number
|
|
26
|
-
includeCopper?: boolean
|
|
27
|
-
includeSoldermask?: boolean
|
|
28
|
-
globalCopperSoldermaskMarginAdjustment?: number
|
|
29
|
-
includeLayers?: Array<"top" | "bottom">
|
|
30
|
-
traceMargin?: number
|
|
31
|
-
laserSpotSize?: number
|
|
32
|
-
laserProfile?: {
|
|
33
|
-
copper?: {
|
|
34
|
-
speed?: number
|
|
35
|
-
numPasses?: number
|
|
36
|
-
frequency?: number
|
|
37
|
-
pulseWidth?: number
|
|
38
|
-
}
|
|
39
|
-
board?: {
|
|
40
|
-
speed?: number
|
|
41
|
-
numPasses?: number
|
|
42
|
-
frequency?: number
|
|
43
|
-
pulseWidth?: number
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
} = {},
|
|
47
|
+
options: ConvertCircuitJsonToLbrnOptions = {},
|
|
47
48
|
): LightBurnProject => {
|
|
48
49
|
const db = cju(circuitJson)
|
|
49
50
|
const project = new LightBurnProject({
|