language checkpoint

This commit is contained in:
Stewart Allen 2020-03-16 13:11:02 -04:00
commit 5045dd2b0c
3 changed files with 244 additions and 213 deletions

View file

@ -72,25 +72,23 @@ var gs_kiri_init = exports;
SPACE.platform.setRound(true);
Object.assign(UI, {
// from static HTML
alert: {
dialog: $('alert-area'),
text: $('alert-text')
},
container: container,
assets: assets,
control: control,
ctrlLeft: $('control-left'),
ctrlRight: $('control-right'),
layerView: $('layer-view'),
layerSlider: $('layer-slider'),
modelOpacity: $('opacity'),
assets: assets,
control: control,
modal: $('modal'),
print: $('print'),
local: $('local'),
help: $('help'),
alert: {
dialog: $('alert-area'),
text: $('alert-text')
},
devices: $('devices'),
deviceAdd: $('device-add'),
deviceDelete: $('device-del'),
@ -99,6 +97,46 @@ var gs_kiri_init = exports;
deviceSelect: $('device-select'),
deviceFavorites: $('device-favorites'),
deviceAll: $('device-all'),
tools: $('tools'),
toolsSave: $('tools-save'),
toolsClose: $('tools-close'),
toolSelect: $('tool-select'),
toolAdd: $('tool-add'),
toolDelete: $('tool-del'),
toolType: $('tool-type'),
toolName: $('tool-name'),
toolNum: $('tool-num'),
toolFluteDiam: $('tool-fdiam'),
toolFluteLen: $('tool-flen'),
toolShaftDiam: $('tool-sdiam'),
toolShaftLen: $('tool-slen'),
// toolTaperAngle: $('tool-tangle'),
toolTaperTip: $('tool-ttip'),
toolMetric: $('tool-metric'),
catalog: $('catalog'),
catalogBody: $('catalogBody'),
catalogList: $('catalogList'),
settings: $('settings'),
settingsBody: $('settingsBody'),
settingsList: $('settingsList'),
layerID: $('layer-id'),
layerSpan: $('layer-span'),
layerRange: $('layer-range'),
loading: $('loading').style,
progress: $('progress').style,
prostatus: $('prostatus'),
selection: $('selection'),
selWidth: $('sel_width'),
selHeight: $('sel_height'),
selDepth: $('sel_depth'),
scaleX: $('scale_x'),
scaleY: $('scale_y'),
scaleZ: $('scale_z'),
scaleUniform: $('scale_uni'),
stock: $('stock'),
stockWidth: $('stock-width'),
stockDepth: $('stock-width'),
stockHeight: $('stock-width'),
device: UC.newGroup(LANG.dv_gr_dev, $('device')),
deviceName: UC.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:20, text:true}),
@ -129,52 +167,6 @@ var gs_kiri_init = exports;
setDevicePre: UC.newText(LANG.dv_head_s, {title:LANG.dv_head_l, modes:ALL, size:14, height:3}),
setDevicePost: UC.newText(LANG.dv_foot_s, {title:LANG.dv_foot_l, modes:ALL, size:14, height:3}),
tools: $('tools'),
toolsSave: $('tools-save'),
toolsClose: $('tools-close'),
toolSelect: $('tool-select'),
toolAdd: $('tool-add'),
toolDelete: $('tool-del'),
toolType: $('tool-type'),
toolName: $('tool-name'),
toolNum: $('tool-num'),
toolFluteDiam: $('tool-fdiam'),
toolFluteLen: $('tool-flen'),
toolShaftDiam: $('tool-sdiam'),
toolShaftLen: $('tool-slen'),
// toolTaperAngle: $('tool-tangle'),
toolTaperTip: $('tool-ttip'),
toolMetric: $('tool-metric'),
catalog: $('catalog'),
catalogBody: $('catalogBody'),
catalogList: $('catalogList'),
settings: $('settings'),
settingsBody: $('settingsBody'),
settingsList: $('settingsList'),
layerID: $('layer-id'),
layerSpan: $('layer-span'),
layerRange: $('layer-range'),
loading: $('loading').style,
progress: $('progress').style,
prostatus: $('prostatus'),
selection: $('selection'),
selWidth: $('sel_width'),
selHeight: $('sel_height'),
selDepth: $('sel_depth'),
scaleX: $('scale_x'),
scaleY: $('scale_y'),
scaleZ: $('scale_z'),
scaleUniform: $('scale_uni'),
stock: $('stock'),
stockWidth: $('stock-width'),
stockDepth: $('stock-width'),
stockHeight: $('stock-width'),
mode: UC.newGroup(LANG.mo_menu, assets),
modeTable: UC.newTableRow([
[
@ -255,7 +247,7 @@ var gs_kiri_init = exports;
autoLayout: UC.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
freeLayout: UC.newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}),
reverseZoom: UC.newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
units: UC.newSelectField(LANG.op_unit_s, {title: LANG.op_unit_l, modes:CAM}, "units"),
units: UC.newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, modes:CAM}, "units"),
// allow modules to insert new items at the bottom of the left menu
appendLeft: UC.checkpoint(),
@ -292,30 +284,29 @@ var gs_kiri_init = exports;
]),
process: UC.newGroup(LANG.sl_menu, control, {modes:FDM_LASER}),
sliceHeight: UC.newInput(LANG.sl_lahi_s, {title:LANG.sl_lahi_l, convert:UC.toFloat, modes:FDM}),
sliceShells: UC.newInput(LANG.sl_shel_s, {title:LANG.sl_shel_l, convert:UC.toInt, modes:FDM}),
sliceTopLayers: UC.newInput(LANG.sl_ltop_s, {title:LANG.sl_ltop_l, convert:UC.toInt, modes:FDM}),
sliceSolidLayers: UC.newInput(LANG.sl_lsld_s, {title:LANG.sl_lsld_l, convert:UC.toInt, modes:FDM}),
sliceBottomLayers: UC.newInput(LANG.sl_lbot_s, {title:LANG.sl_lbot_l, convert:UC.toInt, modes:FDM}),
sliceHeight: UC.newInput("layer height", {title:"millimeters", convert:UC.toFloat, modes:FDM}),
sliceShells: UC.newInput("shell count", {convert:UC.toInt, modes:FDM}),
sliceTopLayers: UC.newInput("top layers", {title:"top solid layer count", convert:UC.toInt, modes:FDM}),
sliceSolidLayers: UC.newInput("solid layers", {title:"flat area fill projections\nbased on layer deltas", convert:UC.toInt, modes:FDM}),
sliceBottomLayers: UC.newInput("base layers", {title:"bottom solid layer count", convert:UC.toInt, modes:FDM}),
process: UC.newGroup(LANG.fi_menu, control, {modes:FDM}),
sliceFillType: UC.newSelect(LANG.fi_type, {modes:FDM}, "infill"),
sliceFillSparse: UC.newInput(LANG.fi_pcnt_s, {title:LANG.fi_pcnt_l, convert:UC.toFloat, bound:UC.bound(0.0,1.0), modes:FDM}),
sliceFillAngle: UC.newInput(LANG.fi_angl_s, {title:LANG.fi_angl_l, convert:UC.toFloat, modes:FDM, expert:true}),
sliceFillOverlap: UC.newInput(LANG.fi_over_s, {title:LANG.fi_over_l, convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM, expert:true}),
process: UC.newGroup("fill", control, {modes:FDM}),
sliceFillType: UC.newSelectField("type", {modes:FDM}, "infill"),
sliceFillSparse: UC.newInput("percentage", {title:"for infill areas\n0.0 - 1.0", convert:UC.toFloat, bound:UC.bound(0.0,1.0), modes:FDM}),
sliceFillAngle: UC.newInput("solid angle", {title:"base angle in degrees", convert:UC.toFloat, modes:FDM, expert:true}),
sliceFillOverlap: UC.newInput("overlap", {title:"overlap with shell and fill\nas % of nozzle width\nhigher bonds better\n0.0 - 1.0", convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM, expert:true}),
firstLayer: UC.newGroup(LANG.fl_menu, null, {modes:FDM}),
firstSliceHeight: UC.newInput(LANG.fl_lahi_s, {title:LANG.fl_lahi_l, convert:UC.toFloat, modes:FDM}),
firstLayerRate: UC.newInput(LANG.fl_rate_s, {title:LANG.fl_rate_l, convert:UC.toFloat, modes:FDM}),
firstLayerFillRate: UC.newInput(LANG.fl_frat_s, {title:LANG.fl_frat_l, convert:UC.toFloat, modes:FDM}),
firstLayerPrintMult: UC.newInput(LANG.fl_mult_s, {title:LANG.fl_mult_l, convert:UC.toFloat, modes:FDM, expert: true}),
outputBrimCount: UC.newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:UC.toInt, modes:FDM}),
outputBrimOffset: UC.newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:UC.toFloat, modes:FDM}),
firstLayerNozzleTemp:UC.newInput(LANG.fl_nozl_s, {title:LANG.fl_nozl_l, convert:UC.toInt, modes:FDM, expert: true}),
firstLayerBedTemp: UC.newInput(LANG.fl_bedd_s, {title:LANG.fl_bedd_l, convert:UC.toInt, modes:FDM, expert: true}),
firstLayer: UC.newGroup("first layer", null, {modes:FDM}),
firstSliceHeight: UC.newInput("layer height", {title:"in millimeters\nshould be >= slice height", convert:UC.toFloat, modes:FDM}),
firstLayerRate: UC.newInput("shell speed", {title:"print move max speed\nmillimeters / minute", convert:UC.toFloat, modes:FDM}),
firstLayerFillRate: UC.newInput("fill speed", {title:"fill move max speed\nmillimeters / minute", convert:UC.toFloat, modes:FDM}),
firstLayerPrintMult: UC.newInput("print factor", {title:"extrusion multiplier\n0.0 - 2.0", convert:UC.toFloat, modes:FDM, expert: true}),
outputBrimCount: UC.newInput("skirt count", {title:"number of skirts", convert:UC.toInt, modes:FDM}),
outputBrimOffset: UC.newInput("skirt offset", {title:"millimeters", convert:UC.toFloat, modes:FDM}),
firstLayerNozzleTemp: UC.newInput("nozzle temp", {title:"degrees celsius\nused when non-zero", convert:UC.toInt, modes:FDM, expert: true}),
firstLayerBedTemp: UC.newInput("bed temp", {title:"degrees celsius\nused when non-zero", convert:UC.toInt, modes:FDM, expert: true}),
support: UC.newGroup("support", null, {modes:FDM}),
support: UC.newGroup(LANG.sp_menu, null, {modes:FDM}),
sliceSupportDensity: UC.newInput("density", {title:"0.0 - 1.0\nrecommended 0.15\n0 to disable", convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:FDM}),
sliceSupportSize: UC.newInput("pillar size", {title:"width in millimeters", bound:UC.bound(1.0,200.0), convert:UC.toFloat, modes:FDM}),
sliceSupportOffset: UC.newInput("part offset", {title:"millimeters\noffset from part", bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
@ -333,7 +324,7 @@ var gs_kiri_init = exports;
camFastFeed: UC.newInput("rapid feed", {title:"rapid moves feedrate\nin workspace units / minute", convert:UC.toInt, modes:CAM}),
roughing: UC.newGroup("roughing", null, {modes:CAM}),
roughingTool: UC.newSelectField("tool", {modes:CAM}),
roughingTool: UC.newSelect("tool", {modes:CAM}),
roughingSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
roughingOver: UC.newInput("step over", {title:"0.1 - 1.0\npercentage of\ntool diameter", convert:UC.toFloat, bound:UC.bound(0.1,1.0), modes:CAM}),
roughingDown: UC.newInput("step down", {title:"step down depth\nfor each pass\nin workspace units\n0 to disable", convert:UC.toFloat, modes:CAM}),
@ -345,7 +336,7 @@ var gs_kiri_init = exports;
roughingOn: UC.newBoolean("enable", onBooleanClick, {modes:CAM}),
finishing: UC.newGroup("finishing", null, {modes:CAM}),
finishingTool: UC.newSelectField("tool", {modes:CAM}),
finishingTool: UC.newSelect("tool", {modes:CAM}),
finishingSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
finishingOver: UC.newInput("step over", {title:"0.05 - 1.0\npercentage of\ntool diameter\nfor linear XY", convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
finishingDown: UC.newInput("step down", {title:"step down depth\nfor each pass\nin workspace units\n0 to disable", convert:UC.toFloat, modes:CAM}),
@ -359,7 +350,7 @@ var gs_kiri_init = exports;
finishCurvesOnly: UC.newBoolean("curves only", onBooleanClick, {title:"limit linear cleanup\nto curved surfaces\nto reduce time", modes:CAM}),
drilling: UC.newGroup("drilling", null, {modes:CAM}),
drillTool: UC.newSelectField("tool", {modes:CAM}),
drillTool: UC.newSelect("tool", {modes:CAM}),
drillSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
drillDown: UC.newInput("plunge per", {title:"max plunge between\ndwell periods\nin workspace units\n0 to disable", convert:UC.toFloat, modes:CAM}),
drillDownSpeed: UC.newInput("plunge rate", {title:"plunge rate\nin workspace units / minute\n0 to disable", convert:UC.toFloat, modes:CAM}),
@ -385,7 +376,6 @@ var gs_kiri_init = exports;
outputLaserSpeed: UC.newInput("speed", {title:"millimeters / minute", convert:UC.toInt, modes:LASER}),
outputLaserMerged: UC.newBoolean("merged", onBooleanClick, {title:"merge all layers using\ncolor coding to denote\nstacking depth", modes:LASER}),
outputLaserGroup: UC.newBoolean("grouped", onBooleanClick, {title:"retain each layer as\na unified grouping\ninstead of separated\npolygons", modes:LASER}),
outputTemp: UC.newInput("nozzle temp", {title:"degrees celsius", convert:UC.toInt, modes:FDM}),
outputBedTemp: UC.newInput("bed temp", {title:"degrees celsius", convert:UC.toInt, modes:FDM}),
outputFeedrate: UC.newInput("print speed", {title:"print move max speed\nmillimeters / minute", convert:UC.toInt, modes:FDM}),
@ -395,7 +385,6 @@ var gs_kiri_init = exports;
outputFillMult: UC.newInput("solid factor", {title:"extrusion multiplier\n0.0 - 2.0", convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM}),
outputSparseMult: UC.newInput("infill factor", {title:"extrusion multiplier\n0.0 - 2.0", convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM}),
outputFanLayer: UC.newInput("fan layer", {title:"layer to enable fan", convert:UC.toInt, bound:UC.bound(0,100), modes:FDM, expert: true}),
camTolerance: UC.newInput("tolerance", {title:"surface precision\nin workspace units", convert:UC.toFloat, bound:UC.bound(0.001,1.0), modes:CAM}),
camZTopOffset: UC.newInput("z top offset", {title:"offset from stock surface\nto top face of part\nin workspace units", convert:UC.toFloat, modes:CAM}),
camZBottom: UC.newInput("z bottom", {title:"offset from part bottom\nto limit cutting depth\nin workspace units", convert:UC.toFloat, modes:CAM}),

View file

@ -186,7 +186,49 @@ let gs_kiri_lang = exports;
se_bsic: "basic",
// SLICING menu
sl_menu: "slicing"
sl_menu: "slicing",
sl_lahi_s: "layer height",
sl_lahi_l: "height of each slice\nlayer in millimeters",
sl_shel_s: "shell count",
sl_shel_l: "number of perimeter\nwalls to generate",
sl_ltop_s: "top layers",
sl_ltop_l: "number of solid layers\nto enforce at the\ntop of the print",
sl_lsld_s: "solid layers",
sl_lsld_l: "solid fill areas computed\nfrom layer deltas. see\nlayer pop menu",
sl_lbot_s: "base layers",
sl_lbot_l: "number of solid layers\nto enforce at the\nbottom of the print",
// FILL menu
fi_menu: "fill",
fi_type: "type",
fi_pcnt_s: "percentage",
fi_pcnt_l: "fill density values\n0.0 - 1.0",
fi_angl_s: "solid angle",
fi_angl_l: "base angle in degrees",
fi_over_s: "overlap",
fi_over_l: "overlap with shell and fill\nas % of nozzle width\nhigher bonds better\n0.0 - 1.0",
// FIRST LAYER menu
fl_menu: "first layer",
fl_lahi_s: "layer height",
fl_lahi_l: "height of each slice\nin millimeters\nshould be >= slice height",
fl_rate_s: "shell speed",
fl_rate_h: "printing max speed\nin millimeters / minute",
fl_frat_s: "fill speed",
fl_frat_l: "printing max speed\nin millimeters / minute",
fl_mult_s: "print factor",
fl_mult_l: "extrusion multiplier\n0.0 - 2.0",
fl_skrt_s: "skirt count",
fl_skrt_l: "number of first-layer offset\nbrims to generate",
fl_skro_s: "skirt offset",
fl_skro_l: "skirt offset from part\nin millimeters",
fl_nozl_s: "nozzle temp",
fl_nozl_l: "degrees in celsius\noutput setting used\nwhen this is zero",
fl_bedd_s: "bed temp",
fl_bedd_l: "degrees in celsius\noutput setting used\nwhen this is zero",
// SUPPORT menu
sp_menu: "support",
};

View file

@ -37,11 +37,11 @@ var gs_moto_ui = exports;
isPopped: isPopped,
newText: newTextArea,
newLabel: newLabel,
newRange: newRangeField,
newRange: newRange,
newInput: newInputField,
newButton: newButton,
newBoolean: newBooleanField,
newSelectField: newSelectField,
newSelect: newSelect,
newTable: newTables,
newTableRow: newTableRow,
newRow: newRow,
@ -323,7 +323,7 @@ var gs_moto_ui = exports;
return ip;
}
function newRangeField(label, options) {
function newRange(label, options) {
var row = newDiv(options),
ip = DOC.createElement('input'),
hide = options && options.hide,
@ -348,7 +348,7 @@ var gs_moto_ui = exports;
return ip;
}
function newSelectField(label, options, source) {
function newSelect(label, options, source) {
var row = newDiv(options),
ip = DOC.createElement('select'),
hide = options && options.hide,