add cnc animation mesh density control
This commit is contained in:
parent
91bb6945c9
commit
9515ce5451
6 changed files with 20 additions and 5 deletions
1
notes.md
1
notes.md
|
|
@ -77,7 +77,6 @@
|
|||
* `F` add support for tapered ball mills
|
||||
* `F` warn when part > stock or cuts go outside bed
|
||||
* `P` crossing open space check point is outside camshell before returning max z
|
||||
* `P` control of animation mesh density
|
||||
|
||||
# Laser
|
||||
|
||||
|
|
|
|||
|
|
@ -609,7 +609,8 @@
|
|||
exportGhost: false,
|
||||
exportLocal: true,
|
||||
decimate: true,
|
||||
detail: "good"
|
||||
detail: "good",
|
||||
animesh: "200"
|
||||
},
|
||||
// for passing temporary slice hints (topo currently)
|
||||
synth: {},
|
||||
|
|
|
|||
|
|
@ -86,6 +86,11 @@
|
|||
platform.update_size();
|
||||
}
|
||||
|
||||
function aniMeshSave() {
|
||||
API.conf.update({controller:true});
|
||||
API.conf.save();
|
||||
}
|
||||
|
||||
function lineTypeSave() {
|
||||
const sel = UI.lineType.options[UI.lineType.selectedIndex];
|
||||
if (sel) {
|
||||
|
|
@ -1405,13 +1410,14 @@
|
|||
showRulers: UC.newBoolean(LANG.op_shru_s, booleanSave, {title:LANG.op_shru_l}),
|
||||
showSpeeds: UC.newBoolean(LANG.op_sped_s, speedSave, {title:LANG.op_sped_l}),
|
||||
lineType: UC.newSelect(LANG.op_line_s, {title: LANG.op_line_l, action: lineTypeSave, modes:FDM}, "linetype"),
|
||||
animesh: UC.newSelect(LANG.op_anim_s, {title: LANG.op_anim_l, action: aniMeshSave, modes:CAM}, "animesh"),
|
||||
units: UC.newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action:unitsSave, modes:CAM, trace:true}, "units"),
|
||||
|
||||
layout: UC.newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}),
|
||||
alignTop: UC.newBoolean(LANG.op_alig_s, booleanSave, {title:LANG.op_alig_l}),
|
||||
autoLayout: UC.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
|
||||
freeLayout: UC.newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}),
|
||||
autoSave: UC.newBoolean(LANG.op_save_s, booleanSave, {title:LANG.op_save_l}),
|
||||
units: UC.newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action:unitsSave, modes:CAM, trace:true}, "units"),
|
||||
|
||||
export: UC.newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}),
|
||||
exportOcto: UC.newBoolean(`OctoPrint`, booleanSave),
|
||||
|
|
|
|||
|
|
@ -167,8 +167,14 @@
|
|||
{ name: "path" },
|
||||
{ name: "flat" },
|
||||
{ name: "line" }
|
||||
],
|
||||
animesh: [
|
||||
{ name: "100" },
|
||||
{ name: "200" },
|
||||
{ name: "300" },
|
||||
{ name: "400" },
|
||||
{ name: "500" }
|
||||
]
|
||||
|
||||
};
|
||||
|
||||
const tweak = {
|
||||
|
|
|
|||
|
|
@ -163,12 +163,13 @@ self.kiri.loader.push(function() {
|
|||
if (KIRI.worker)
|
||||
KIRI.worker.animate_setup = function(data, send) {
|
||||
const { settings } = data;
|
||||
const density = parseInt(settings.controller.animesh) * 1000;
|
||||
|
||||
pathIndex = 0;
|
||||
tools = settings.tools;
|
||||
stock = settings.stock;
|
||||
path = current.print.output.flat();
|
||||
rez = 1/Math.sqrt(100000/(stock.x * stock.y));
|
||||
rez = 1/Math.sqrt(density/(stock.x * stock.y));
|
||||
|
||||
// const center = stock.center;
|
||||
const step = rez;
|
||||
|
|
|
|||
|
|
@ -145,6 +145,8 @@ kiri.lang['en-us'] = {
|
|||
op_line_l: "line style for path rendering\nimpacts 3d performance\npath: 3d best\nflat: 2d good\nline = 1d fast",
|
||||
op_unit_s: "units",
|
||||
op_unit_l: "workspace units affects\nspeeds and distances",
|
||||
op_anim_s: "animate",
|
||||
op_anim_l: "animation mesh density\nhigher is more dense\ntakes more memory\nand is slower",
|
||||
|
||||
lo_menu: "layout",
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue