fix model center on regroup, duplicate relative to group dimensions
This commit is contained in:
parent
d413861451
commit
0da9019acb
3 changed files with 9 additions and 5 deletions
|
|
@ -1154,7 +1154,11 @@ const tool = {
|
|||
models = fallback(models, true);
|
||||
if (models.length) {
|
||||
log(`regrouping ${models.length} model(s)`);
|
||||
return mesh.api.group.new(models.map(m => m.ungroup()));
|
||||
let group = mesh.api.group.new(models.map(m => m.ungroup()));
|
||||
let bounds = group.bounds;
|
||||
models.forEach(m => m.centerTo(bounds.mid));
|
||||
console.log({ bounds, group, models });
|
||||
return group;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue