add optional device images
This commit is contained in:
parent
44df978a67
commit
a4cbaa9d0d
5 changed files with 53 additions and 11 deletions
18
notes.md
18
notes.md
|
|
@ -24,38 +24,38 @@
|
||||||
## `C` cosmetic, `F` functional, `P` performance, `B` bug fix
|
## `C` cosmetic, `F` functional, `P` performance, `B` bug fix
|
||||||
|
|
||||||
* `F` mesh / stl export (like w/ images, rotate, scale, future cleanup ops)
|
* `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` 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` 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` allow selection to me decimated on demand (context menu?)
|
||||||
* `P` improve decimation speed by avoiding in/out of Point?
|
* `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
|
* `P` client/worker interface normalization
|
||||||
|
|
||||||
# FDM
|
# FDM
|
||||||
|
|
||||||
* `B` sparse infill should follow polys between intersect points
|
|
||||||
* `B` fix adaptive slicing with multi-extruder
|
* `B` fix adaptive slicing with multi-extruder
|
||||||
* `B` fix supports with grouped parts
|
* `B` fix supports with grouped parts
|
||||||
* `B` multi-extruder rendering of raft fails to offset the rest of the print
|
* `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
|
* `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` redo auto supports to use poly faces rather than deltas
|
||||||
* `F` control for size of purge block (with 0=disabled)
|
* `F` control for size of purge block (with 0=disabled)
|
||||||
|
* `F` control layer start position
|
||||||
* `F` add separate fill speed control
|
* `F` add separate fill speed control
|
||||||
* `F` polishing and other non-planar work
|
* `F` polishing and other non-planar work
|
||||||
* `F` gradient infill https://www.youtube.com/watch?v=hq53gsYREHU&feature=emb_logo
|
* `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` 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` 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` apply finish speed to exposed top and underside flat areas
|
||||||
* `F` expand internal supporting flats / solids before projection
|
* `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` implement infill clipping in wasm
|
||||||
* `P` solid fill the tops of supports for down facing flats
|
* `P` solid fill the tops of supports for down facing flats
|
||||||
|
* `P` sparse infill should follow polys between intersect points
|
||||||
|
|
||||||
# SLA
|
# SLA
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@
|
||||||
"progress": "M117 {progress}% layer {layer} / {layers}"
|
"progress": "M117 {progress}% layer {layer} / {layers}"
|
||||||
},
|
},
|
||||||
"settings":{
|
"settings":{
|
||||||
|
"image_url": "gridbot.png",
|
||||||
|
"image_scale": 0.7,
|
||||||
"origin_center": false,
|
"origin_center": false,
|
||||||
"bed_width": 300,
|
"bed_width": 300,
|
||||||
"bed_depth": 300,
|
"bed_depth": 300,
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,8 @@
|
||||||
noclone: valueOf(code.no_clone, false),
|
noclone: valueOf(code.no_clone, false),
|
||||||
mode: mode || code.mode || '',
|
mode: mode || code.mode || '',
|
||||||
internal: 0,
|
internal: 0,
|
||||||
|
imageURL: valueOf(set.image_url, ""),
|
||||||
|
imageScale: valueOf(set.image_scale, 0.75),
|
||||||
bedHeight: valueOf(set.bed_height, 2.5),
|
bedHeight: valueOf(set.bed_height, 2.5),
|
||||||
bedWidth: valueOf(set.bed_width, 300),
|
bedWidth: valueOf(set.bed_width, 300),
|
||||||
bedDepth: valueOf(set.bed_depth, 175),
|
bedDepth: valueOf(set.bed_depth, 175),
|
||||||
|
|
@ -247,6 +249,8 @@
|
||||||
d:{
|
d:{
|
||||||
new: true,
|
new: true,
|
||||||
mode: "",
|
mode: "",
|
||||||
|
deviceName: "",
|
||||||
|
imageURL: "",
|
||||||
internal: 0,
|
internal: 0,
|
||||||
bedWidth: 300,
|
bedWidth: 300,
|
||||||
bedDepth: 175,
|
bedDepth: 175,
|
||||||
|
|
@ -337,9 +341,10 @@
|
||||||
// device defaults SLA:Device
|
// device defaults SLA:Device
|
||||||
d:{
|
d:{
|
||||||
new: true,
|
new: true,
|
||||||
deviceName: "",
|
|
||||||
noclone: false,
|
|
||||||
mode: "",
|
mode: "",
|
||||||
|
deviceName: "",
|
||||||
|
imageURL: "",
|
||||||
|
noclone: false,
|
||||||
internal: 0,
|
internal: 0,
|
||||||
bedWidth: 150,
|
bedWidth: 150,
|
||||||
bedDepth: 150,
|
bedDepth: 150,
|
||||||
|
|
@ -380,6 +385,8 @@
|
||||||
d:{
|
d:{
|
||||||
new: true,
|
new: true,
|
||||||
mode: "",
|
mode: "",
|
||||||
|
deviceName: "",
|
||||||
|
imageURL: "",
|
||||||
internal: 0,
|
internal: 0,
|
||||||
bedWidth: 300,
|
bedWidth: 300,
|
||||||
bedDepth: 175,
|
bedDepth: 175,
|
||||||
|
|
@ -468,6 +475,8 @@
|
||||||
d:{
|
d:{
|
||||||
new: true,
|
new: true,
|
||||||
mode: "",
|
mode: "",
|
||||||
|
deviceName: "",
|
||||||
|
imageURL: "",
|
||||||
internal: 0,
|
internal: 0,
|
||||||
bedWidth: 300,
|
bedWidth: 300,
|
||||||
bedDepth: 175,
|
bedDepth: 175,
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@
|
||||||
platform = API.platform,
|
platform = API.platform,
|
||||||
selection = API.selection;
|
selection = API.selection;
|
||||||
|
|
||||||
let deviceLock = false,
|
let deviceImage = null,
|
||||||
|
deviceLock = false,
|
||||||
selectedTool = null,
|
selectedTool = null,
|
||||||
editTools = null,
|
editTools = null,
|
||||||
maxTool = 0,
|
maxTool = 0,
|
||||||
|
|
@ -733,6 +734,36 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
API.conf.save();
|
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) {
|
} catch (e) {
|
||||||
console.log({error:e, device:code, devicename});
|
console.log({error:e, device:code, devicename});
|
||||||
API.show.alert(`invalid or deprecated device: "${devicename}"`, 10);
|
API.show.alert(`invalid or deprecated device: "${devicename}"`, 10);
|
||||||
|
|
|
||||||
BIN
web/kiri/gridbot.png
Normal file
BIN
web/kiri/gridbot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 742 KiB |
Loading…
Reference in a new issue