stub in cam pocket op with surface selection
This commit is contained in:
parent
594a1daa07
commit
50dfba4e84
9 changed files with 182 additions and 40 deletions
|
|
@ -519,28 +519,7 @@ mesh.model = class MeshModel extends mesh.object {
|
|||
}
|
||||
|
||||
updateSelections() {
|
||||
let faces = this.sel.faces;
|
||||
let groups = [];
|
||||
if (faces && faces.length) {
|
||||
faces = faces.sort((a,b) => a - b).slice();
|
||||
let first = faces.shift();
|
||||
if (first > 0) {
|
||||
groups.push({ start: 0, count: first, mat: 0 });
|
||||
}
|
||||
let range = { start: first, count: 1, mat: 1 };
|
||||
groups.push(range);
|
||||
for (let face of faces) {
|
||||
if (face === range.start + range.count) {
|
||||
range.count++;
|
||||
} else {
|
||||
groups.push(range = { start: range.start + range.count, count: face - range.start - range.count });
|
||||
groups.push(range = { start: face, count: 1, mat: 1 });
|
||||
}
|
||||
}
|
||||
groups.push({ start: range.start + range.count, count: Infinity });
|
||||
} else {
|
||||
groups.push({ start: 0, count: Infinity });
|
||||
}
|
||||
let groups = mesh.util.facesToGroups(this.sel.faces);
|
||||
let geo = this.mesh.geometry;
|
||||
geo.clearGroups();
|
||||
for (let group of groups) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue