fix non-outlined supports
This commit is contained in:
parent
69f246efb9
commit
3e8e9e3455
3 changed files with 13 additions and 6 deletions
|
|
@ -1060,7 +1060,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
factor = (widget.getVertices().count / defvert);
|
||||
|
||||
// compensate for zcut (widget moved through floor)
|
||||
widget.stack.obj.view.position.z = widget.track.zcut;
|
||||
widget.stack.obj.view.position.z = widget.track.zcut || 0;
|
||||
|
||||
widget.slice(settings, function(sliced, error) {
|
||||
widget.rotinfo = null;
|
||||
|
|
|
|||
|
|
@ -903,7 +903,7 @@
|
|||
if (!near && !found) {
|
||||
if (start === 0 && lastIndex === -1) {
|
||||
console.log('infinite loop', lines, {
|
||||
marked, options, i, group, start, lastIndex,
|
||||
marked, i, group, start, lastIndex,
|
||||
points: lines.map(p => p.index).join(', ')
|
||||
});
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -545,22 +545,29 @@
|
|||
// and zig/zag lines connectd by shell segments
|
||||
if (!outline) {
|
||||
let newlines = [];
|
||||
let op1, op2;
|
||||
let op2;
|
||||
let eo = 0;
|
||||
let idx = 1;
|
||||
for (let i=0; i<lines.length; i += 2) {
|
||||
let p1 = lines[i];
|
||||
let p2 = lines[i+1];
|
||||
p1.index = idx;
|
||||
p2.index = idx++;
|
||||
if (eo++ % 2 === 1) {
|
||||
let t = p1;
|
||||
p1 = p2;
|
||||
p2 = t;
|
||||
}
|
||||
if (op2) {
|
||||
let op1 = p1.clone();
|
||||
op1.index = op2.index;
|
||||
newlines.push(op2);
|
||||
newlines.push(p1);
|
||||
newlines.push(op1);
|
||||
}
|
||||
newlines.push(op1 = p1);
|
||||
newlines.push(op2 = p2);
|
||||
newlines.push(p1);
|
||||
newlines.push(p2);
|
||||
op2 = p2.clone();
|
||||
op2.index = idx++;
|
||||
}
|
||||
rec.top.fill_lines = newlines;
|
||||
rec.top.shells = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue