@mylasertools/kerfscript 0.8.0 → 0.10.0

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +157 -0
  2. package/LANGUAGE.md +200 -84
  3. package/README.md +4 -3
  4. package/dist/assembly.d.cts +4 -1
  5. package/dist/assembly.d.ts +4 -1
  6. package/dist/ast.d.cts +6 -0
  7. package/dist/ast.d.ts +6 -0
  8. package/dist/bores.d.cts +15 -0
  9. package/dist/bores.d.ts +15 -0
  10. package/dist/cli.js +8959 -6064
  11. package/dist/customizer.d.cts +4 -0
  12. package/dist/customizer.d.ts +4 -0
  13. package/dist/effects.d.cts +31 -0
  14. package/dist/effects.d.ts +31 -0
  15. package/dist/evaluator.d.cts +10 -0
  16. package/dist/evaluator.d.ts +10 -0
  17. package/dist/export/mesh.d.cts +53 -0
  18. package/dist/export/mesh.d.ts +53 -0
  19. package/dist/export/model.d.cts +12 -0
  20. package/dist/export/model.d.ts +12 -0
  21. package/dist/export/triangulate.d.cts +5 -0
  22. package/dist/export/triangulate.d.ts +5 -0
  23. package/dist/export/zip.d.cts +5 -0
  24. package/dist/export/zip.d.ts +5 -0
  25. package/dist/functions.d.cts +2 -0
  26. package/dist/functions.d.ts +2 -0
  27. package/dist/geometry.d.cts +7 -0
  28. package/dist/geometry.d.ts +7 -0
  29. package/dist/halving.d.cts +8 -0
  30. package/dist/halving.d.ts +8 -0
  31. package/dist/highlight.cjs +3 -2
  32. package/dist/highlight.js +3 -2
  33. package/dist/import/dbg.d.cts +1 -0
  34. package/dist/import/dbg.d.ts +1 -0
  35. package/dist/index.cjs +522 -56
  36. package/dist/index.d.cts +6 -2
  37. package/dist/index.d.ts +6 -2
  38. package/dist/index.js +522 -56
  39. package/dist/language.cjs +495 -36
  40. package/dist/language.js +495 -36
  41. package/dist/libraries.cjs +474 -16
  42. package/dist/libraries.js +474 -16
  43. package/dist/plot.d.cts +16 -0
  44. package/dist/plot.d.ts +16 -0
  45. package/dist/render.d.cts +3 -0
  46. package/dist/render.d.ts +3 -0
  47. package/dist/signatures.cjs +182 -5
  48. package/dist/signatures.js +182 -5
  49. package/dist/text.d.cts +6 -0
  50. package/dist/text.d.ts +6 -0
  51. package/docs/3d-files.md +72 -0
  52. package/docs/cli.md +27 -21
  53. package/docs/compatibility.md +0 -8
  54. package/docs/customizer.md +74 -0
  55. package/docs/javascript.md +46 -0
  56. package/docs/library.md +162 -1
  57. package/docs/openscad.md +15 -13
  58. package/docs/parts-and-sheets.md +57 -1
  59. package/docs/versions.md +2 -2
  60. package/package.json +1 -1
package/dist/ast.d.cts CHANGED
@@ -81,6 +81,11 @@ export type Expr = {
81
81
  body: Expr;
82
82
  pos: Pos;
83
83
  end?: number;
84
+ } | {
85
+ kind: 'chain';
86
+ check: Expr;
87
+ body: Expr;
88
+ pos: Pos;
84
89
  };
85
90
  export type ListItem = {
86
91
  kind: 'item';
@@ -153,6 +158,7 @@ export type Stmt = ({
153
158
  assigns: Assign[];
154
159
  body: Stmt[];
155
160
  pos: Pos;
161
+ intersect?: boolean;
156
162
  } | {
157
163
  kind: 'if';
158
164
  cond: Expr;
package/dist/ast.d.ts CHANGED
@@ -81,6 +81,11 @@ export type Expr = {
81
81
  body: Expr;
82
82
  pos: Pos;
83
83
  end?: number;
84
+ } | {
85
+ kind: 'chain';
86
+ check: Expr;
87
+ body: Expr;
88
+ pos: Pos;
84
89
  };
85
90
  export type ListItem = {
86
91
  kind: 'item';
@@ -153,6 +158,7 @@ export type Stmt = ({
153
158
  assigns: Assign[];
154
159
  body: Stmt[];
155
160
  pos: Pos;
161
+ intersect?: boolean;
156
162
  } | {
157
163
  kind: 'if';
158
164
  cond: Expr;
@@ -0,0 +1,15 @@
1
+ import type { HardwareItem } from './evaluator.cjs';
2
+ import { type Poly } from './geometry.cjs';
3
+ import type { Solid } from './slots.cjs';
4
+ type Vec3 = [number, number, number];
5
+ export declare const FITS: Record<string, number>;
6
+ /** A rod's axes: along it, and across it, v towards `up` (a [w, h]
7
+ * section's h, a polygon's first corner) and u square to both (its w). The
8
+ * 3D files use the same, so a rod fits the bore cut for it. */
9
+ export declare function rodFrame(h: HardwareItem): {
10
+ axis: Vec3;
11
+ u: Vec3;
12
+ v: Vec3;
13
+ };
14
+ export declare function boreFor(target: Solid, h: HardwareItem, room: number): Poly | undefined;
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { HardwareItem } from './evaluator.js';
2
+ import { type Poly } from './geometry.js';
3
+ import type { Solid } from './slots.js';
4
+ type Vec3 = [number, number, number];
5
+ export declare const FITS: Record<string, number>;
6
+ /** A rod's axes: along it, and across it, v towards `up` (a [w, h]
7
+ * section's h, a polygon's first corner) and u square to both (its w). The
8
+ * 3D files use the same, so a rod fits the bore cut for it. */
9
+ export declare function rodFrame(h: HardwareItem): {
10
+ axis: Vec3;
11
+ u: Vec3;
12
+ v: Vec3;
13
+ };
14
+ export declare function boreFor(target: Solid, h: HardwareItem, room: number): Poly | undefined;
15
+ export {};