diff --git a/notes.md b/notes.md index 5740cdd9..47b686d0 100644 --- a/notes.md +++ b/notes.md @@ -24,38 +24,38 @@ ## `C` cosmetic, `F` functional, `P` performance, `B` bug fix * `F` mesh / stl export (like w/ images, rotate, scale, future cleanup ops) -* `F` detect and report slow framerates * `F` right click / context menu (object deletion, etc) +* `F` detect and report slow framerates * `P` duplicate objects should share same slice data unless rotated or scaled +* `P` optimize object import to vertices + indexes to save memory * `P` allow selection to me decimated on demand (context menu?) * `P` improve decimation speed by avoiding in/out of Point? -* `P` optimize object import to vertices + indexes to save memory * `P` client/worker interface normalization # FDM -* `B` sparse infill should follow polys between intersect points * `B` fix adaptive slicing with multi-extruder * `B` fix supports with grouped parts * `B` multi-extruder rendering of raft fails to offset the rest of the print * `B` multi-extruder purge blocks fail to generate properly for rafts -* `F` control layer start position * `F` redo auto supports to use poly faces rather than deltas * `F` control for size of purge block (with 0=disabled) +* `F` control layer start position * `F` add separate fill speed control * `F` polishing and other non-planar work * `F` gradient infill https://www.youtube.com/watch?v=hq53gsYREHU&feature=emb_logo -* `F` feather sharp tips by reducing extrusion in area of overlap * `F` first layer segment large flat areas for better fill reliability +* `F` feather sharp tips by reducing extrusion in area of overlap * `F` enable purge blocks when quick layers are detected +* `F` option to support interior bridges when 0% infill +* `F` trim support offset from layer below +* `F` calculate filament use per extruder per print +* `F` first layer support speed should be same as shell speed * `F` apply finish speed to exposed top and underside flat areas * `F` expand internal supporting flats / solids before projection -* `F` first layer support speed should be same as shell speed -* `F` trim support offset from layer below -* `F` option to support interior bridges when 0% infill -* `F` calculate filament use per extruder per print * `P` implement infill clipping in wasm * `P` solid fill the tops of supports for down facing flats +* `P` sparse infill should follow polys between intersect points # SLA diff --git a/src/dev/fdm/GridBot.One b/src/dev/fdm/GridBot.One index ceabd449..83378dbe 100644 --- a/src/dev/fdm/GridBot.One +++ b/src/dev/fdm/GridBot.One @@ -32,6 +32,8 @@ "progress": "M117 {progress}% layer {layer} / {layers}" }, "settings":{ + "image_url": "gridbot.png", + "image_scale": 0.7, "origin_center": false, "bed_width": 300, "bed_depth": 300, diff --git a/src/kiri/conf.js b/src/kiri/conf.js index b00c73f3..f8e2508b 100644 --- a/src/kiri/conf.js +++ b/src/kiri/conf.js @@ -101,6 +101,8 @@ noclone: valueOf(code.no_clone, false), mode: mode || code.mode || '', internal: 0, + imageURL: valueOf(set.image_url, ""), + imageScale: valueOf(set.image_scale, 0.75), bedHeight: valueOf(set.bed_height, 2.5), bedWidth: valueOf(set.bed_width, 300), bedDepth: valueOf(set.bed_depth, 175), @@ -247,6 +249,8 @@ d:{ new: true, mode: "", + deviceName: "", + imageURL: "", internal: 0, bedWidth: 300, bedDepth: 175, @@ -337,9 +341,10 @@ // device defaults SLA:Device d:{ new: true, - deviceName: "", - noclone: false, mode: "", + deviceName: "", + imageURL: "", + noclone: false, internal: 0, bedWidth: 150, bedDepth: 150, @@ -380,6 +385,8 @@ d:{ new: true, mode: "", + deviceName: "", + imageURL: "", internal: 0, bedWidth: 300, bedDepth: 175, @@ -468,6 +475,8 @@ d:{ new: true, mode: "", + deviceName: "", + imageURL: "", internal: 0, bedWidth: 300, bedDepth: 175, diff --git a/src/kiri/init.js b/src/kiri/init.js index 2b8db45e..edd885d3 100644 --- a/src/kiri/init.js +++ b/src/kiri/init.js @@ -46,7 +46,8 @@ platform = API.platform, selection = API.selection; - let deviceLock = false, + let deviceImage = null, + deviceLock = false, selectedTool = null, editTools = null, maxTool = 0, @@ -733,6 +734,36 @@ } API.conf.save(); + + if (deviceImage) { + SPACE.world.remove(deviceImage); + deviceImage = null; + } + if (dev.imageURL) { + new THREE.TextureLoader().load(dev.imageURL, texture => { + if (deviceImage) { + SPACE.world.remove(deviceImage); + deviceImage = null; + } + if (!texture) { + return; + } + let { width, height } = texture.image; + let scale = dev.imageScale || 0.75; + let dev_ratio = dev.bedWidth / dev.bedDepth; + let img_ratio = width / height; + if (dev_ratio > img_ratio) { + scale *= dev.bedDepth / height; + } else { + scale *= dev.bedWidth / width; + } + let geometry = new THREE.PlaneBufferGeometry(width * scale, height * scale, 1), + material = new THREE.MeshBasicMaterial({ map: texture, transparent: true }), + mesh = new THREE.Mesh(geometry, material); + mesh.position.z = -dev.bedHeight; + SPACE.world.add(deviceImage = mesh); + }); + } } catch (e) { console.log({error:e, device:code, devicename}); API.show.alert(`invalid or deprecated device: "${devicename}"`, 10); diff --git a/web/kiri/gridbot.png b/web/kiri/gridbot.png new file mode 100644 index 00000000..0df6ccc8 Binary files /dev/null and b/web/kiri/gridbot.png differ