add spiral layer start point option
This commit is contained in:
parent
35b48273bd
commit
ac956a3cac
3 changed files with 14 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ const LISTS = {
|
||||||
{ name: "center" },
|
{ name: "center" },
|
||||||
{ name: "origin" },
|
{ name: "origin" },
|
||||||
{ name: "random" },
|
{ name: "random" },
|
||||||
|
{ name: "spiral" },
|
||||||
],
|
],
|
||||||
infill: [
|
infill: [
|
||||||
{ name: "none" },
|
{ name: "none" },
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ export async function fdm_prepare(widgets, settings, update) {
|
||||||
zneg = 0,
|
zneg = 0,
|
||||||
zoff = 0,
|
zoff = 0,
|
||||||
zmin = 0,
|
zmin = 0,
|
||||||
|
zmax = 0,
|
||||||
shield,
|
shield,
|
||||||
output = [],
|
output = [],
|
||||||
layerout = [];
|
layerout = [];
|
||||||
|
|
@ -224,6 +225,7 @@ export async function fdm_prepare(widgets, settings, update) {
|
||||||
}
|
}
|
||||||
for (let slice of widget.slices) {
|
for (let slice of widget.slices) {
|
||||||
zmin = Math.min(zmin, slice.z);
|
zmin = Math.min(zmin, slice.z);
|
||||||
|
zmax = Math.max(zmax, slice.z);
|
||||||
if (!slice.supports) {
|
if (!slice.supports) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -469,6 +471,8 @@ export async function fdm_prepare(widgets, settings, update) {
|
||||||
let lastExt;
|
let lastExt;
|
||||||
let lastOut;
|
let lastOut;
|
||||||
|
|
||||||
|
print.zmax = zmax;
|
||||||
|
|
||||||
// walk cake layers bottom up
|
// walk cake layers bottom up
|
||||||
for (let layer of cake) {
|
for (let layer of cake) {
|
||||||
// track purge blocks generated for each layer
|
// track purge blocks generated for each layer
|
||||||
|
|
@ -1474,6 +1478,13 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) {
|
||||||
|
|
||||||
// control of layer start point
|
// control of layer start point
|
||||||
switch (process.sliceLayerStart) {
|
switch (process.sliceLayerStart) {
|
||||||
|
case "spiral": {
|
||||||
|
let center = top.poly.bounds.center();
|
||||||
|
let angle = (Math.PI * 2) * (slice.z / print.zmax);
|
||||||
|
let x = center.x + Math.cos(angle)*10000;
|
||||||
|
let y = center.y + Math.sin(angle)*10000;
|
||||||
|
startPoint = newPoint(x,y,startPoint.z);
|
||||||
|
} break;
|
||||||
case "last":
|
case "last":
|
||||||
break;
|
break;
|
||||||
case "random":
|
case "random":
|
||||||
|
|
|
||||||
|
|
@ -848,7 +848,7 @@ self.lang['en-us'] = {
|
||||||
|
|
||||||
// FDM ADVANCED
|
// FDM ADVANCED
|
||||||
ad_menu: "expert",
|
ad_menu: "expert",
|
||||||
ad_rdst_s: "retract dist",
|
ad_rdst_s: "retract distance",
|
||||||
ad_rdst_l: ["amount to retract filament","for long moves. in millimeters"],
|
ad_rdst_l: ["amount to retract filament","for long moves. in millimeters"],
|
||||||
ad_rrat_s: "retract rate",
|
ad_rrat_s: "retract rate",
|
||||||
ad_rrat_l: ["speed of filament","retraction in mm/s"],
|
ad_rrat_l: ["speed of filament","retraction in mm/s"],
|
||||||
|
|
@ -866,7 +866,7 @@ self.lang['en-us'] = {
|
||||||
ad_spol_l: ["polygons shorter than this","will have their print speed","scaled down to min speed","in millimeters"],
|
ad_spol_l: ["polygons shorter than this","will have their print speed","scaled down to min speed","in millimeters"],
|
||||||
ad_arct_s: "arc tolerance",
|
ad_arct_s: "arc tolerance",
|
||||||
ad_arct_l: ["convert faceted lines to arcs","center point drift tolerance","when matching arc points","consider values around 0.15","in millimeters","0 to disable"],
|
ad_arct_l: ["convert faceted lines to arcs","center point drift tolerance","when matching arc points","consider values around 0.15","in millimeters","0 to disable"],
|
||||||
ad_zhop_s: "z hop dist",
|
ad_zhop_s: "z hop distance",
|
||||||
ad_zhop_l: ["amount to raise z","on retraction moves","in millimeters","0 to disable"],
|
ad_zhop_l: ["amount to raise z","on retraction moves","in millimeters","0 to disable"],
|
||||||
ad_abkl_s: "anti-backlash",
|
ad_abkl_s: "anti-backlash",
|
||||||
ad_abkl_l: ["for better flat surface finish","use micro-movements to cancel","backlash in solid layer output","in millimeters","0 to disable","if your firmware has M425","put that in the gcode header","and leave this as 0"],
|
ad_abkl_l: ["for better flat surface finish","use micro-movements to cancel","backlash in solid layer output","in millimeters","0 to disable","if your firmware has M425","put that in the gcode header","and leave this as 0"],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue