add test slicing poly pumping (rounding)
This commit is contained in:
parent
f53d6da12b
commit
8e75ad718f
2 changed files with 21 additions and 2 deletions
|
|
@ -21,7 +21,26 @@ export function slicePost(data, options) {
|
|||
const { useAssembly, post_args, zIndexes } = options;
|
||||
const { process, isSynth, vaseMode } = post_args;
|
||||
const { shellOffset, fillOffset, clipOffset } = post_args;
|
||||
data.tops = POLY.nest(groups);
|
||||
|
||||
if (options.pump) {
|
||||
let nugroups = [];
|
||||
let pump = shellOffset / 10;
|
||||
for (let p of groups) {
|
||||
let retop = POLY.offset([ p ], -pump, {
|
||||
join: ClipperLib.JoinType.jtRound,
|
||||
arc: (1/pump) * 4
|
||||
});
|
||||
retop = POLY.offset(retop, pump, {
|
||||
join: ClipperLib.JoinType.jtRound,
|
||||
arc: (1/pump) * 4
|
||||
});
|
||||
nugroups.push(...retop);
|
||||
}
|
||||
data.tops = POLY.nest(nugroups);
|
||||
} else {
|
||||
data.tops = POLY.nest(groups);
|
||||
}
|
||||
|
||||
if (isSynth) {
|
||||
const process = post_args.process;
|
||||
if (process.sliceSupportGrow > 0) {
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ export function fdm_slice(settings, widget, onupdate, ondone) {
|
|||
}
|
||||
}
|
||||
if (process.xray) {
|
||||
slice.index = process.xrayi.shift();
|
||||
slice.index = process.xray.shift();
|
||||
slice.lines = lines;
|
||||
slice.groups = groups;
|
||||
slice.xray = process.xray;
|
||||
|
|
|
|||
Loading…
Reference in a new issue