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` climb vs conventional not fully consistent after refactor
|
||||
* `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` add climb/conventional into each operation
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@
|
|||
dx = bm.x + bd.x,
|
||||
dy = bm.y + bd.y,
|
||||
dz = bm.z;
|
||||
this.track.center = { dx, dy, dz };
|
||||
// move mesh for each widget in group
|
||||
if (!init) {
|
||||
this.group.forEach(w => {
|
||||
|
|
|
|||
|
|
@ -742,6 +742,7 @@
|
|||
let tabs = API.widgets.annotate(widget.id).tab || [];
|
||||
tabs.forEach(rec => {
|
||||
let { id, pos, rot } = rec;
|
||||
let coff = widget.track.center;
|
||||
let tab = widget.tabs[id];
|
||||
let m4 = new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(x || 0, y || 0, z || 0));
|
||||
// update position vector
|
||||
|
|
@ -752,8 +753,8 @@
|
|||
new THREE.Quaternion().setFromRotationMatrix(m4)
|
||||
);
|
||||
tab.box.geometry.applyMatrix4(m4);
|
||||
tab.box.position.x = pos.x = vc.x;
|
||||
tab.box.position.y = pos.y = vc.y;
|
||||
tab.box.position.x = pos.x = vc.x - coff.dx;
|
||||
tab.box.position.y = pos.y = vc.y - coff.dy;
|
||||
tab.box.position.z = pos.z = vc.z;
|
||||
});
|
||||
SPACE.update();
|
||||
|
|
|
|||
Loading…
Reference in a new issue