@mylasertools/kerfscript 0.2.0 → 0.2.1
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/CHANGELOG.md +18 -0
- package/CLA.md +8 -5
- package/COMMERCIAL-LICENSE.md +23 -28
- package/LANGUAGE.md +149 -46
- package/README.md +68 -29
- package/THIRD-PARTY-NOTICES.md +55 -0
- package/TRADEMARKS.md +16 -10
- package/dist/cli.js +273 -83
- package/dist/evaluator.d.cts +23 -0
- package/dist/evaluator.d.ts +23 -0
- package/dist/export/svg.d.cts +2 -0
- package/dist/export/svg.d.ts +2 -0
- package/dist/index.cjs +14 -14
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -14
- package/dist/render.d.cts +2 -1
- package/dist/render.d.ts +2 -1
- package/docs/cli.md +43 -28
- package/docs/compatibility.md +40 -65
- package/docs/customizer.md +40 -28
- package/docs/getting-started.md +48 -31
- package/docs/javascript.md +106 -51
- package/docs/kerf.md +36 -39
- package/docs/layers.md +71 -37
- package/docs/openscad.md +52 -48
- package/docs/parts-and-sheets.md +45 -31
- package/docs/versions.md +20 -30
- package/package.json +5 -4
package/dist/evaluator.d.cts
CHANGED
|
@@ -14,7 +14,19 @@ export interface EvalOptions {
|
|
|
14
14
|
resolve?: (path: string) => string | undefined;
|
|
15
15
|
fonts?: FontBook;
|
|
16
16
|
maxSteps?: number;
|
|
17
|
+
limits?: Partial<Limits>;
|
|
17
18
|
}
|
|
19
|
+
export interface Limits {
|
|
20
|
+
maxParts: number;
|
|
21
|
+
maxSegments: number;
|
|
22
|
+
maxListLength: number;
|
|
23
|
+
maxListItems: number;
|
|
24
|
+
maxTextLength: number;
|
|
25
|
+
maxPoints: number;
|
|
26
|
+
maxOutputPoints: number;
|
|
27
|
+
maxSheets: number;
|
|
28
|
+
}
|
|
29
|
+
export declare const DEFAULT_LIMITS: Limits;
|
|
18
30
|
interface ModDef {
|
|
19
31
|
params: Param[];
|
|
20
32
|
body: Stmt[];
|
|
@@ -63,6 +75,10 @@ export declare class Evaluator {
|
|
|
63
75
|
private steps;
|
|
64
76
|
private depth;
|
|
65
77
|
private maxSteps;
|
|
78
|
+
readonly limits: Limits;
|
|
79
|
+
private pointCount;
|
|
80
|
+
private itemCount;
|
|
81
|
+
private copies;
|
|
66
82
|
readonly echoes: string[];
|
|
67
83
|
readonly warnings: string[];
|
|
68
84
|
readonly layers: Map<string, LayerDef>;
|
|
@@ -73,6 +89,7 @@ export declare class Evaluator {
|
|
|
73
89
|
private tick;
|
|
74
90
|
private load;
|
|
75
91
|
private hoist;
|
|
92
|
+
private included;
|
|
76
93
|
private assign;
|
|
77
94
|
block(stmts: Stmt[], env: Env, top?: boolean): Shape;
|
|
78
95
|
private stmt;
|
|
@@ -86,8 +103,11 @@ export declare class Evaluator {
|
|
|
86
103
|
callFunction(f: FnDef | Closure, args: Args, caller: Env, name: string): Value;
|
|
87
104
|
expr(x: Expr, env: Env): Value;
|
|
88
105
|
private listItem;
|
|
106
|
+
private grow;
|
|
107
|
+
private charge;
|
|
89
108
|
private call;
|
|
90
109
|
private specialFunction;
|
|
110
|
+
private echo;
|
|
91
111
|
private echoText;
|
|
92
112
|
private arith;
|
|
93
113
|
private arg;
|
|
@@ -95,6 +115,9 @@ export declare class Evaluator {
|
|
|
95
115
|
private vec2;
|
|
96
116
|
private points;
|
|
97
117
|
private dyn;
|
|
118
|
+
private spend;
|
|
119
|
+
private checkValue;
|
|
120
|
+
private checkSize;
|
|
98
121
|
private segs;
|
|
99
122
|
private thickness;
|
|
100
123
|
private fingerWidth;
|
package/dist/evaluator.d.ts
CHANGED
|
@@ -14,7 +14,19 @@ export interface EvalOptions {
|
|
|
14
14
|
resolve?: (path: string) => string | undefined;
|
|
15
15
|
fonts?: FontBook;
|
|
16
16
|
maxSteps?: number;
|
|
17
|
+
limits?: Partial<Limits>;
|
|
17
18
|
}
|
|
19
|
+
export interface Limits {
|
|
20
|
+
maxParts: number;
|
|
21
|
+
maxSegments: number;
|
|
22
|
+
maxListLength: number;
|
|
23
|
+
maxListItems: number;
|
|
24
|
+
maxTextLength: number;
|
|
25
|
+
maxPoints: number;
|
|
26
|
+
maxOutputPoints: number;
|
|
27
|
+
maxSheets: number;
|
|
28
|
+
}
|
|
29
|
+
export declare const DEFAULT_LIMITS: Limits;
|
|
18
30
|
interface ModDef {
|
|
19
31
|
params: Param[];
|
|
20
32
|
body: Stmt[];
|
|
@@ -63,6 +75,10 @@ export declare class Evaluator {
|
|
|
63
75
|
private steps;
|
|
64
76
|
private depth;
|
|
65
77
|
private maxSteps;
|
|
78
|
+
readonly limits: Limits;
|
|
79
|
+
private pointCount;
|
|
80
|
+
private itemCount;
|
|
81
|
+
private copies;
|
|
66
82
|
readonly echoes: string[];
|
|
67
83
|
readonly warnings: string[];
|
|
68
84
|
readonly layers: Map<string, LayerDef>;
|
|
@@ -73,6 +89,7 @@ export declare class Evaluator {
|
|
|
73
89
|
private tick;
|
|
74
90
|
private load;
|
|
75
91
|
private hoist;
|
|
92
|
+
private included;
|
|
76
93
|
private assign;
|
|
77
94
|
block(stmts: Stmt[], env: Env, top?: boolean): Shape;
|
|
78
95
|
private stmt;
|
|
@@ -86,8 +103,11 @@ export declare class Evaluator {
|
|
|
86
103
|
callFunction(f: FnDef | Closure, args: Args, caller: Env, name: string): Value;
|
|
87
104
|
expr(x: Expr, env: Env): Value;
|
|
88
105
|
private listItem;
|
|
106
|
+
private grow;
|
|
107
|
+
private charge;
|
|
89
108
|
private call;
|
|
90
109
|
private specialFunction;
|
|
110
|
+
private echo;
|
|
91
111
|
private echoText;
|
|
92
112
|
private arith;
|
|
93
113
|
private arg;
|
|
@@ -95,6 +115,9 @@ export declare class Evaluator {
|
|
|
95
115
|
private vec2;
|
|
96
116
|
private points;
|
|
97
117
|
private dyn;
|
|
118
|
+
private spend;
|
|
119
|
+
private checkValue;
|
|
120
|
+
private checkSize;
|
|
98
121
|
private segs;
|
|
99
122
|
private thickness;
|
|
100
123
|
private fingerWidth;
|
package/dist/export/svg.d.cts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { LayerDef } from '../evaluator.cjs';
|
|
2
|
+
import { type Poly } from '../geometry.cjs';
|
|
2
3
|
import type { Placed } from '../render.cjs';
|
|
3
4
|
export declare const n: (v: number) => string;
|
|
5
|
+
export declare function tidy(p: Poly, closed: boolean): [string, string][];
|
|
4
6
|
export interface LayerPath {
|
|
5
7
|
name: string;
|
|
6
8
|
mode: LayerDef['mode'];
|
package/dist/export/svg.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { LayerDef } from '../evaluator.js';
|
|
2
|
+
import { type Poly } from '../geometry.js';
|
|
2
3
|
import type { Placed } from '../render.js';
|
|
3
4
|
export declare const n: (v: number) => string;
|
|
5
|
+
export declare function tidy(p: Poly, closed: boolean): [string, string][];
|
|
4
6
|
export interface LayerPath {
|
|
5
7
|
name: string;
|
|
6
8
|
mode: LayerDef['mode'];
|