three-slicer-viewer 0.3.3 → 0.3.4
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/TOOLPATH_SPEC.md +8 -1
- package/data/config-schema-lean.json +1 -1
- package/dist/gcode_parse.js +149 -110
- package/dist/index.js +4547 -4304
- package/dist/sl1_encode.worker.js +1 -1
- package/dist/sl1_write-B6nWmCUu.js +313 -0
- package/dist/sla_slice.worker.js +1 -1
- package/dist/toolpath.js +274 -220
- package/package.json +1 -1
- package/src/settings/bed_frame.js +28 -0
- package/src/settings/index.js +1 -0
- package/src/settings/kernel_setting_keys.js +51 -0
- package/src/settings/settings_core.js +143 -7
- package/types/gcode.d.ts +13 -0
- package/types/settings.d.ts +14 -1
- package/types/toolpath.d.ts +6 -0
- package/dist/sl1_write-BovHbg3k.js +0 -303
package/TOOLPATH_SPEC.md
CHANGED
|
@@ -53,7 +53,7 @@ being rewritten (`core/toolpath_views.js`, `use_move_scrub.js`). Everything else
|
|
|
53
53
|
| `nTrav` | number | travel segments |
|
|
54
54
|
| `nV` | number | vertices in the extrusion stream |
|
|
55
55
|
| `position` | Float32Array | per-vertex geometry input |
|
|
56
|
-
| `hwa` | Float32Array | per-vertex height / width /
|
|
56
|
+
| `hwa` | Float32Array | per-vertex height / width / joined heading / packed colour |
|
|
57
57
|
| `segIndex` | Uint32Array | per-vertex segment identity |
|
|
58
58
|
| `layerSegPrefix` | Uint32Array, length `layerCount + 1` | non-decreasing; `[0] === 0`, `[layerCount] === nSeg` |
|
|
59
59
|
| `travelPos`, `travelPrefix`, `nTrav` | — | the same, for travels |
|
|
@@ -94,6 +94,10 @@ Requirements:
|
|
|
94
94
|
0.2 mm layer: the bead spans half a layer height either side.
|
|
95
95
|
- Orientation follows the segment direction in the XY plane.
|
|
96
96
|
- Width and height come from `meta`, per vertex, so two segments in one draw call can differ.
|
|
97
|
+
- Consecutive beads meet. An endpoint shared with the next extrusion of the same layer (or, closing a loop, with
|
|
98
|
+
the first of its run) carries that neighbour's heading in `hwa[+2]`, and the side corners there sit on the
|
|
99
|
+
bisector of the two headings. Square ends left a wedge on the outside of every turn and a corner of every short
|
|
100
|
+
segment sticking out of a curved wall. Turns sharper than 140 degrees keep the square end.
|
|
97
101
|
|
|
98
102
|
`makeToolpath(THREE, data) -> ToolpathHandle` builds the scene objects. The `THREE` namespace is **passed
|
|
99
103
|
in, never imported** — that is what guarantees the consumer's own three.js instance is used, and it is why
|
|
@@ -106,7 +110,10 @@ setLayerRange(lo, hi) show only layers lo..hi inclusive
|
|
|
106
110
|
setVisibleLayers(n) === setLayerRange(0, n - 1)
|
|
107
111
|
setTravelVisible(bool) travels start hidden
|
|
108
112
|
setColors(Float32Array) swap the per-vertex colours in place, without rebuilding geometry
|
|
113
|
+
setMoveRange(at) draw the top shown layer up to its move `at` (null = whole range again); returns
|
|
114
|
+
moveCursor's answer plus the `layer` it walked — the move scrub (use_move_scrub.js)
|
|
109
115
|
dispose() release GPU resources
|
|
116
|
+
data the SegmentData it was built from — the move scrub counts moves in it
|
|
110
117
|
nSeg, layerCount mirrored from the data
|
|
111
118
|
```
|
|
112
119
|
|