add_rect now calls add_poly, refactor add_ to add.

This commit is contained in:
Stewart Allen 2024-07-28 11:10:44 -04:00
commit 611d3cac1c
3 changed files with 49 additions and 45 deletions

View file

@ -488,7 +488,7 @@ function load_files(files) {
for (let set of [ closed, open, circs, rects ]) {
let group = Date.now().toString(36);
for (let poly of set) {
sketch.add_polygon({ poly, group });
sketch.add.polygon({ poly, group });
}
}
}
@ -498,7 +498,7 @@ function load_files(files) {
load.File.load([...files], { flat: true })
.then(polys => polys.forEach(set => {
let group = Date.now().toString(36);
set.forEach(poly => sketch.add_polygon({ poly, group }))
set.forEach(poly => sketch.add.polygon({ poly, group }))
}))
.catch(error => dbug.error(error))
.finally(() => mesh.api.log.hide());