rename group/ungroup to nest/flatten
This commit is contained in:
parent
71f94e30d5
commit
522103a0a6
3 changed files with 8 additions and 8 deletions
|
|
@ -494,12 +494,12 @@ let sketch = {
|
|||
},
|
||||
|
||||
boolean: {
|
||||
group() {
|
||||
sketch.selection.one?.boolean.group();
|
||||
nest() {
|
||||
sketch.selection.one?.boolean.nest();
|
||||
},
|
||||
|
||||
ungroup() {
|
||||
sketch.selection.one?.boolean.ungroup();
|
||||
flatten() {
|
||||
sketch.selection.one?.boolean.flatten();
|
||||
},
|
||||
|
||||
union() {
|
||||
|
|
|
|||
|
|
@ -433,8 +433,8 @@ function ui_build() {
|
|||
h.button({ _: 'intersect', onclick: sketch.boolean.intersect }),
|
||||
h.button({ _: 'difference', onclick: sketch.boolean.difference }),
|
||||
h.hr(),
|
||||
h.button({ _: 'group', onclick: sketch.boolean.group }),
|
||||
h.button({ _: 'ungroup', onclick: sketch.boolean.ungroup }),
|
||||
h.button({ _: 'nest', onclick: sketch.boolean.nest }),
|
||||
h.button({ _: 'flatten', onclick: sketch.boolean.flatten }),
|
||||
])
|
||||
]),
|
||||
h.div({ class: "sketch-off" }, [
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ mesh.sketch = class MeshSketch extends mesh.object {
|
|||
}
|
||||
},
|
||||
|
||||
group() {
|
||||
nest() {
|
||||
let items = sketch.selection.mesh_items();
|
||||
if (items.length < 2) return log('operation requires at least 2 items');
|
||||
let polys = items.map(i => i.sketch_item.poly).clone(true);
|
||||
|
|
@ -220,7 +220,7 @@ mesh.sketch = class MeshSketch extends mesh.object {
|
|||
}
|
||||
},
|
||||
|
||||
ungroup() {
|
||||
flatten() {
|
||||
let items = sketch.selection.mesh_items();
|
||||
let polys = items.map(i => i.sketch_item.poly).clone(true);
|
||||
let flat = POLYS.flatten(polys, [], true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue