svg import behavior normalized for all modes
This commit is contained in:
parent
5107d1758c
commit
3fd79573e6
3 changed files with 12 additions and 15 deletions
1
notes.md
1
notes.md
|
|
@ -20,6 +20,7 @@
|
||||||
* `F` complete and expose grouping feature
|
* `F` complete and expose grouping feature
|
||||||
* `F` add svgnest-like arrange algorithm
|
* `F` add svgnest-like arrange algorithm
|
||||||
* `F` warn if part hanging in negative Z space or off bed in general
|
* `F` warn if part hanging in negative Z space or off bed in general
|
||||||
|
* `F` add instancing support for 3MF files on import
|
||||||
|
|
||||||
# FDM
|
# FDM
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2884,20 +2884,16 @@
|
||||||
load_dec();
|
load_dec();
|
||||||
}
|
}
|
||||||
else if (issvg) {
|
else if (issvg) {
|
||||||
if (MODE === MODES.LASER) {
|
let name = e.target.file.name;
|
||||||
loadCode(e.target.result, 'svg');
|
let svg = LOAD.SVG.parse(e.target.result);
|
||||||
} else {
|
let ind = 0;
|
||||||
let name = e.target.file.name;
|
for (let v of svg) {
|
||||||
let svg = LOAD.SVG.parse(e.target.result);
|
let num = ind++;
|
||||||
let ind = 0;
|
platform.add(
|
||||||
for (let v of svg) {
|
newWidget(undefined, group)
|
||||||
let num = ind++;
|
.loadVertices(svg[num].toFloat32())
|
||||||
platform.add(
|
.saveToCatalog(num ? `${name}-${num}` : name)
|
||||||
newWidget(undefined, group)
|
);
|
||||||
.loadVertices(svg[num].toFloat32())
|
|
||||||
.saveToCatalog(num ? `${name}-${num}` : name)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
load_dec();
|
load_dec();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
this.id = id || new Date().getTime().toString(36);
|
this.id = id || new Date().getTime().toString(36);
|
||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
this.widgets = widgets;
|
this.widgets = widgets;
|
||||||
debugE = settings.controller.devel ? 1 : 0;
|
debugE = settings ? (settings.controller.devel ? 1 : 0) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRO.addOutput = addOutput;
|
PRO.addOutput = addOutput;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue