fix tab dissociation in rotated asymmetric parts
This commit is contained in:
parent
12cb62f4c9
commit
e1d3a95aae
3 changed files with 4 additions and 3 deletions
1
notes.md
1
notes.md
|
|
@ -58,7 +58,6 @@
|
||||||
* `B` starting export during animation unleashes chaos
|
* `B` starting export during animation unleashes chaos
|
||||||
* `B` climb vs conventional not fully consistent after refactor
|
* `B` climb vs conventional not fully consistent after refactor
|
||||||
* `B` outside cutting direction in roughing mode inverted
|
* `B` outside cutting direction in roughing mode inverted
|
||||||
* `B` on rotation, tabs dissociate from parts whose center changes with rotation
|
|
||||||
|
|
||||||
* `F` new registration style: offset cutout
|
* `F` new registration style: offset cutout
|
||||||
* `F` add climb/conventional into each operation
|
* `F` add climb/conventional into each operation
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,7 @@
|
||||||
dx = bm.x + bd.x,
|
dx = bm.x + bd.x,
|
||||||
dy = bm.y + bd.y,
|
dy = bm.y + bd.y,
|
||||||
dz = bm.z;
|
dz = bm.z;
|
||||||
|
this.track.center = { dx, dy, dz };
|
||||||
// move mesh for each widget in group
|
// move mesh for each widget in group
|
||||||
if (!init) {
|
if (!init) {
|
||||||
this.group.forEach(w => {
|
this.group.forEach(w => {
|
||||||
|
|
|
||||||
|
|
@ -742,6 +742,7 @@
|
||||||
let tabs = API.widgets.annotate(widget.id).tab || [];
|
let tabs = API.widgets.annotate(widget.id).tab || [];
|
||||||
tabs.forEach(rec => {
|
tabs.forEach(rec => {
|
||||||
let { id, pos, rot } = rec;
|
let { id, pos, rot } = rec;
|
||||||
|
let coff = widget.track.center;
|
||||||
let tab = widget.tabs[id];
|
let tab = widget.tabs[id];
|
||||||
let m4 = new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(x || 0, y || 0, z || 0));
|
let m4 = new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(x || 0, y || 0, z || 0));
|
||||||
// update position vector
|
// update position vector
|
||||||
|
|
@ -752,8 +753,8 @@
|
||||||
new THREE.Quaternion().setFromRotationMatrix(m4)
|
new THREE.Quaternion().setFromRotationMatrix(m4)
|
||||||
);
|
);
|
||||||
tab.box.geometry.applyMatrix4(m4);
|
tab.box.geometry.applyMatrix4(m4);
|
||||||
tab.box.position.x = pos.x = vc.x;
|
tab.box.position.x = pos.x = vc.x - coff.dx;
|
||||||
tab.box.position.y = pos.y = vc.y;
|
tab.box.position.y = pos.y = vc.y - coff.dy;
|
||||||
tab.box.position.z = pos.z = vc.z;
|
tab.box.position.z = pos.z = vc.z;
|
||||||
});
|
});
|
||||||
SPACE.update();
|
SPACE.update();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue