adjust tool pos to units. fix slicer bucketing
This commit is contained in:
parent
882efb8efa
commit
b3cbd701a9
3 changed files with 6 additions and 5 deletions
1
notes.md
1
notes.md
|
|
@ -4,7 +4,6 @@
|
|||
* `cnc`
|
||||
* - tracing (chamfer, engrave)
|
||||
* - auto feature detection (slicing)
|
||||
* - show tool x,y,z during animation
|
||||
* `laser`
|
||||
* - drag knife support
|
||||
* `all`
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@
|
|||
|
||||
if (bucketCount > 1) {
|
||||
// create empty buckets
|
||||
for (let i = 0; i < bucketCount + 1; i++) {
|
||||
for (let i = 0; i <= bucketCount + 1; i++) {
|
||||
buckets.push([]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ self.kiri.loader.push(function() {
|
|||
CAM = KIRI.driver.CAM,
|
||||
API, WORLD, SPACE,
|
||||
meshes = {},
|
||||
unitScale = 1,
|
||||
toolPosX, toolPosY, toolPosZ,
|
||||
speedValues = [ 25, 12, 6, 3 ],
|
||||
speedNames = [ "1x", "2x", "4x", "8x" ],
|
||||
|
|
@ -96,9 +97,9 @@ self.kiri.loader.push(function() {
|
|||
mesh.position.z = pos.z;
|
||||
SPACE.update();
|
||||
if (id !== 0) {
|
||||
toolPosX.value = pos.x.toFixed(2);
|
||||
toolPosY.value = pos.y.toFixed(2);
|
||||
toolPosZ.value = pos.z.toFixed(2);
|
||||
toolPosX.value = (pos.x * unitScale).toFixed(2);
|
||||
toolPosY.value = (pos.y * unitScale).toFixed(2);
|
||||
toolPosZ.value = (pos.z * unitScale).toFixed(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -169,6 +170,7 @@ self.kiri.loader.push(function() {
|
|||
|
||||
if (KIRI.client)
|
||||
KIRI.client.animate_setup = function(settings, ondone) {
|
||||
unitScale = settings.controller.units === 'in' ? 1/25.4 : 1;
|
||||
send("animate_setup", {settings}, ondone);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue