@mylasertools/kerfscript 0.7.0 → 0.8.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.
- package/CHANGELOG.md +34 -0
- package/LANGUAGE.md +16 -7
- package/dist/cli.js +205 -18
- package/dist/geometry.d.cts +5 -0
- package/dist/geometry.d.ts +5 -0
- package/dist/highlight.cjs +1 -1
- package/dist/highlight.js +1 -1
- package/dist/index.cjs +383 -46
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +383 -46
- package/dist/language.cjs +381 -44
- package/dist/language.js +381 -44
- package/dist/libraries.cjs +353 -16
- package/dist/libraries.js +351 -14
- package/dist/signatures.cjs +29 -4
- package/dist/signatures.js +29 -4
- package/dist/verify/solids.d.cts +2 -1
- package/dist/verify/solids.d.ts +2 -1
- package/dist/verify/types.d.cts +2 -0
- package/dist/verify/types.d.ts +2 -0
- package/docs/library.md +206 -4
- package/docs/parts-and-sheets.md +31 -18
- package/docs/versions.md +2 -2
- package/package.json +1 -1
package/dist/geometry.d.cts
CHANGED
|
@@ -50,6 +50,11 @@ export declare function offset(regions: Poly[], delta: number, join?: 'round' |
|
|
|
50
50
|
export declare function strokeLines(lines: Poly[], width: number): Poly[];
|
|
51
51
|
export declare function pieces(regions: Poly[]): Poly[][];
|
|
52
52
|
export declare function area(p: Poly): number;
|
|
53
|
+
/** The area of regions (holes counting against it) and their centroid. */
|
|
54
|
+
export declare function regionMoments(regions: Poly[]): {
|
|
55
|
+
area: number;
|
|
56
|
+
centroid: [number, number];
|
|
57
|
+
};
|
|
53
58
|
export declare function multiply(m: Matrix, n: Matrix): Matrix;
|
|
54
59
|
export declare function apply(m: Matrix, [x, y]: Pt): Pt;
|
|
55
60
|
export declare function transform(s: Shape, m: Matrix): Shape;
|
package/dist/geometry.d.ts
CHANGED
|
@@ -50,6 +50,11 @@ export declare function offset(regions: Poly[], delta: number, join?: 'round' |
|
|
|
50
50
|
export declare function strokeLines(lines: Poly[], width: number): Poly[];
|
|
51
51
|
export declare function pieces(regions: Poly[]): Poly[][];
|
|
52
52
|
export declare function area(p: Poly): number;
|
|
53
|
+
/** The area of regions (holes counting against it) and their centroid. */
|
|
54
|
+
export declare function regionMoments(regions: Poly[]): {
|
|
55
|
+
area: number;
|
|
56
|
+
centroid: [number, number];
|
|
57
|
+
};
|
|
53
58
|
export declare function multiply(m: Matrix, n: Matrix): Matrix;
|
|
54
59
|
export declare function apply(m: Matrix, [x, y]: Pt): Pt;
|
|
55
60
|
export declare function transform(s: Shape, m: Matrix): Shape;
|
package/dist/highlight.cjs
CHANGED
|
@@ -42,7 +42,7 @@ var KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
42
42
|
var CONSTANTS = /* @__PURE__ */ new Set(["true", "false", "undef", "PI"]);
|
|
43
43
|
var LAYERS = /* @__PURE__ */ new Set(["cut", "score", "engrave", "guide", "layer"]);
|
|
44
44
|
var BUILTINS = new Set(
|
|
45
|
-
"rect square circle ellipse regular_polygon star polygon path text line polyline arc translate rotate scale mirror multmatrix union group difference intersection hull offset pattern spline hatch paint measure fill_holes close stroke outline part place call step hardware material finger_rect finger_holes tslot living_hinge children echo assert box divider kerf_gauge slot_gauge joint_test slotted_divider grid_dividers enclosure enclosure_cutouts vents spur_gear gear_window rack lantern_disc peg_wheel eccentric snail_cam tappets world_map keyhole keyholes hanging_hole hanging_loop flex_rect flex_box flex_panel narrow_hinge flex_strip cam_lock lock_key ring_stack halved_pair symbol tabs slots tab_rect abs sign floor ceil round sqrt exp ln log sin cos tan asin acos atan atan2 pow min max clamp lerp norm cross path_length point_at heading_at path_points spline_points rotation euler orient len keys merge concat reverse sum slice str chr ord upper lower split join search contains lookup is_num is_string is_bool is_list is_undef is_function is_record type_of rands text_width text_metrics finger_count".split(" ")
|
|
45
|
+
"rect square circle ellipse regular_polygon star polygon path text line polyline arc translate rotate scale mirror multmatrix union group difference intersection hull offset pattern spline hatch paint measure fill_holes close stroke outline part place call step hardware material finger_rect finger_holes tslot living_hinge children echo assert box divider kerf_gauge slot_gauge joint_test slotted_divider grid_dividers enclosure enclosure_cutouts vents spur_gear gear_window rack lantern_disc peg_wheel eccentric snail_cam tappets cone_flat cam geneva_wheel geneva_lock geneva_crank ratchet pawl world_map keyhole keyholes hanging_hole hanging_loop flex_rect flex_box flex_panel narrow_hinge flex_strip cam_lock lock_key ring_stack halved_pair symbol tabs slots tab_rect abs sign floor ceil round sqrt exp ln log sin cos tan asin acos atan atan2 pow min max clamp lerp norm cross path_length point_at heading_at offset_path train_for path_points spline_points rotation euler orient len keys merge concat reverse sum slice str chr ord upper lower split join search contains lookup is_num is_string is_bool is_list is_undef is_function is_record type_of rands text_width text_metrics finger_count".split(" ")
|
|
46
46
|
);
|
|
47
47
|
var NUMBER = /(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?(?:(?:mm|cm|m|in|ft)(?![A-Za-z0-9_]))?/y;
|
|
48
48
|
var WORD = /\$?[A-Za-z_][A-Za-z0-9_]*/y;
|
package/dist/highlight.js
CHANGED
|
@@ -15,7 +15,7 @@ var KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
15
15
|
var CONSTANTS = /* @__PURE__ */ new Set(["true", "false", "undef", "PI"]);
|
|
16
16
|
var LAYERS = /* @__PURE__ */ new Set(["cut", "score", "engrave", "guide", "layer"]);
|
|
17
17
|
var BUILTINS = new Set(
|
|
18
|
-
"rect square circle ellipse regular_polygon star polygon path text line polyline arc translate rotate scale mirror multmatrix union group difference intersection hull offset pattern spline hatch paint measure fill_holes close stroke outline part place call step hardware material finger_rect finger_holes tslot living_hinge children echo assert box divider kerf_gauge slot_gauge joint_test slotted_divider grid_dividers enclosure enclosure_cutouts vents spur_gear gear_window rack lantern_disc peg_wheel eccentric snail_cam tappets world_map keyhole keyholes hanging_hole hanging_loop flex_rect flex_box flex_panel narrow_hinge flex_strip cam_lock lock_key ring_stack halved_pair symbol tabs slots tab_rect abs sign floor ceil round sqrt exp ln log sin cos tan asin acos atan atan2 pow min max clamp lerp norm cross path_length point_at heading_at path_points spline_points rotation euler orient len keys merge concat reverse sum slice str chr ord upper lower split join search contains lookup is_num is_string is_bool is_list is_undef is_function is_record type_of rands text_width text_metrics finger_count".split(" ")
|
|
18
|
+
"rect square circle ellipse regular_polygon star polygon path text line polyline arc translate rotate scale mirror multmatrix union group difference intersection hull offset pattern spline hatch paint measure fill_holes close stroke outline part place call step hardware material finger_rect finger_holes tslot living_hinge children echo assert box divider kerf_gauge slot_gauge joint_test slotted_divider grid_dividers enclosure enclosure_cutouts vents spur_gear gear_window rack lantern_disc peg_wheel eccentric snail_cam tappets cone_flat cam geneva_wheel geneva_lock geneva_crank ratchet pawl world_map keyhole keyholes hanging_hole hanging_loop flex_rect flex_box flex_panel narrow_hinge flex_strip cam_lock lock_key ring_stack halved_pair symbol tabs slots tab_rect abs sign floor ceil round sqrt exp ln log sin cos tan asin acos atan atan2 pow min max clamp lerp norm cross path_length point_at heading_at offset_path train_for path_points spline_points rotation euler orient len keys merge concat reverse sum slice str chr ord upper lower split join search contains lookup is_num is_string is_bool is_list is_undef is_function is_record type_of rands text_width text_metrics finger_count".split(" ")
|
|
19
19
|
);
|
|
20
20
|
var NUMBER = /(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?(?:(?:mm|cm|m|in|ft)(?![A-Za-z0-9_]))?/y;
|
|
21
21
|
var WORD = /\$?[A-Za-z_][A-Za-z0-9_]*/y;
|