diff --git a/src/geo/point.js b/src/geo/point.js index a4e18fdf..217de354 100644 --- a/src/geo/point.js +++ b/src/geo/point.js @@ -80,7 +80,10 @@ }; PRO.round = function(precision) { - return newPoint(ROUND(this.x,precision), ROUND(this.y,precision), ROUND(this.z,precision)); + return newPoint( + this.x.round(precision), + this.y.round(precision), + this.z.round(precision)); }; PRO.addFacet = function(facet) { @@ -91,7 +94,6 @@ PRO.rekey = function() { this._key = undefined; - // this.key = [this.x,this.y,this.z].join(','); }; PRO.toString = function() { @@ -394,7 +396,9 @@ let point = this, i; if (Array.isArray(poly)) { for (i=0; i !UI.sliceSupportEnable.checked}), + sliceSupportSpan: UC.newInput(LANG.sp_span_s, {title:LANG.sp_span_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM, show:() => UI.sliceSupportEnable.checked}), sliceSupportEnable: UC.newBoolean(LANG.sp_auto_s, onBooleanClick, {title:LANG.sp_auto_l, modes:FDM, show:isNotBelt}), sliceSupportGen: UC.newRow([ diff --git a/src/kiri/slicer.js b/src/kiri/slicer.js index 61fb8307..178d2f96 100644 --- a/src/kiri/slicer.js +++ b/src/kiri/slicer.js @@ -685,8 +685,8 @@ // create point map, unique point list and point group arrays input.forEach(function(line) { - p1 = cachedPoint(line.p1.round(4)); - p2 = cachedPoint(line.p2.round(4)); + p1 = cachedPoint(line.p1.round(5)); + p2 = cachedPoint(line.p2.round(5)); addConnected(p1,p2); addConnected(p2,p1); }); diff --git a/src/mode/fdm/slice.js b/src/mode/fdm/slice.js index ca3eec1b..a41742c8 100644 --- a/src/mode/fdm/slice.js +++ b/src/mode/fdm/slice.js @@ -1272,7 +1272,7 @@ .setLayer('pts', { line: 0xdd33dd, check: 0xdd33dd }) .addPolys(points.map(p => base.newPolygon().centerRectangle(p, 0.8, 0.8))) .setLayer('dtr', { line: 0x0, check: 0x0 }) - .addPolys(down_traces) + .addPolys(POLY.setZ(down_traces.clone(true),slice.z)); ; if (supports.length === 0) {