add gcode macro link, rm dynamic style loader, add contributed ender 7 profile
This commit is contained in:
parent
3ced33f11b
commit
fd8a374eed
8 changed files with 183 additions and 160 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
// back end for device export in dev mode
|
// back end for device export in dev mode
|
||||||
module.exports = function(server) {
|
module.exports = function(server) {
|
||||||
server.inject("kiri", "kiri.js");
|
|
||||||
if (!server.env.debug) {
|
if (!server.env.debug) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
server.inject("kiri", "kiri.js");
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
server.api.postDevice = (req, res, next) => {
|
server.api.postDevice = (req, res, next) => {
|
||||||
server.handler.decodePost(req, res, () => {
|
server.handler.decodePost(req, res, () => {
|
||||||
|
|
@ -16,7 +16,7 @@ module.exports = function(server) {
|
||||||
}
|
}
|
||||||
const { mode } = device;
|
const { mode } = device;
|
||||||
const { deviceName } = device;
|
const { deviceName } = device;
|
||||||
const path = `${server.const.rootdir}/src/kiri-dev/${mode.toLowerCase()}/${deviceName.replace(/\ /g,'.')}`;
|
const path = `${server.const.rootdir}/src/kiri/dev/${mode.toLowerCase()}/${deviceName.replace(/\ /g,'.')}`;
|
||||||
// console.log({ mode, device, process, path });
|
// console.log({ mode, device, process, path });
|
||||||
fs.writeFileSync(path, JSON.stringify(device, undefined, 4));
|
fs.writeFileSync(path, JSON.stringify(device, undefined, 4));
|
||||||
res.end('profile saved');
|
res.end('profile saved');
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ self.kiri.load(api => {
|
||||||
let deviceExport = api.device.export;
|
let deviceExport = api.device.export;
|
||||||
api.device.export = (exp, name, opt = {}) => {
|
api.device.export = (exp, name, opt = {}) => {
|
||||||
const { event, record } = opt;
|
const { event, record } = opt;
|
||||||
if (event && event.shiftKey & api.const.LOCAL) {
|
if (event && event.shiftKey) {
|
||||||
const { code, process, profiles } = record;
|
const { code, process, profiles } = record;
|
||||||
fetch("/api/postDevice", {
|
fetch("/api/postDevice", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
@ -12,7 +12,7 @@ self.kiri.load(api => {
|
||||||
})
|
})
|
||||||
.then(r => r.text())
|
.then(r => r.text())
|
||||||
.then(t => {
|
.then(t => {
|
||||||
// console.log({server_said: t});
|
console.log({server_said: t});
|
||||||
api.show.alert('profile saved to server');
|
api.show.alert('profile saved to server');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1579,16 +1579,6 @@ function init_two() {
|
||||||
api.event.emit('load.lib', lib);
|
api.event.emit('load.lib', lib);
|
||||||
});
|
});
|
||||||
|
|
||||||
// load CSS extensions
|
|
||||||
if (SETUP.ss) SETUP.ss.forEach(function(style) {
|
|
||||||
style = style.charAt(0) === '/' ? style : `/kiri/style-${style}`;
|
|
||||||
let ss = DOC.createElement('link');
|
|
||||||
ss.setAttribute("type", "text/css");
|
|
||||||
ss.setAttribute("rel", "stylesheet");
|
|
||||||
ss.setAttribute("href", `${style}.css?${version}`);
|
|
||||||
DOC.body.appendChild(ss);
|
|
||||||
});
|
|
||||||
|
|
||||||
// override stored settings
|
// override stored settings
|
||||||
if (SETUP.v) SETUP.v.forEach(function(kv) {
|
if (SETUP.v) SETUP.v.forEach(function(kv) {
|
||||||
kv = kv.split('=');
|
kv = kv.split('=');
|
||||||
|
|
|
||||||
166
src/kiri/dev/fdm/Creality.Ender.7
Normal file
166
src/kiri/dev/fdm/Creality.Ender.7
Normal file
|
|
@ -0,0 +1,166 @@
|
||||||
|
{
|
||||||
|
"mode": "FDM",
|
||||||
|
"internal": 0,
|
||||||
|
"bedHeight": 2.5,
|
||||||
|
"bedWidth": 252,
|
||||||
|
"bedDepth": 252,
|
||||||
|
"bedRound": false,
|
||||||
|
"bedBelt": false,
|
||||||
|
"deviceZMax": 0,
|
||||||
|
"gcodeTime": 1,
|
||||||
|
"maxHeight": 302,
|
||||||
|
"originCenter": false,
|
||||||
|
"gcodeFan": [
|
||||||
|
"M106 S{fan_speed}"
|
||||||
|
],
|
||||||
|
"gcodeFeature": [],
|
||||||
|
"gcodeTrack": [],
|
||||||
|
"gcodeLayer": [],
|
||||||
|
"gcodePre": [
|
||||||
|
"M140 S{bed_temp}",
|
||||||
|
"M105",
|
||||||
|
"M190 S{bed_temp}",
|
||||||
|
"M104 S{temp}",
|
||||||
|
"M105",
|
||||||
|
"M109 S{temp}",
|
||||||
|
"M82 ; absolute extrusion mode",
|
||||||
|
"G28 ; Home",
|
||||||
|
"G92 E0 ; Reset Extruder",
|
||||||
|
"G1 Z2.0 F3000 ; Move Z Axis up",
|
||||||
|
"G1 X10.1 Y20 Z0.28 F5000.0 ; Move to start position",
|
||||||
|
"G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ; Draw the first line",
|
||||||
|
"G1 X10.4 Y200.0 Z0.28 F5000.0 ; Move to side a little",
|
||||||
|
"G1 X10.4 Y20 Z0.28 F1500.0 E30 ; Draw the second line",
|
||||||
|
"G92 E0 ; Reset Extruder",
|
||||||
|
"G1 Z2.0 F3000 ; Move Z Axis up"
|
||||||
|
],
|
||||||
|
"gcodePost": [
|
||||||
|
"G91 ; Relative positionning",
|
||||||
|
"G1 E-2 F2700 ; Retract a bit",
|
||||||
|
"G1 E-2 Z0.2 F2400 ; Retract and raise Z",
|
||||||
|
"G1 X5 Y5 F3000 ; Wipe out",
|
||||||
|
"G1 Z10 ; Raise Z more",
|
||||||
|
"G90 ; Absolute positionning",
|
||||||
|
"G28 X Y ; Present print",
|
||||||
|
"M106 S0 ; Turn-off fan",
|
||||||
|
"M104 S0 ; Turn-off hotend",
|
||||||
|
"M140 S0 ; Turn-off bed",
|
||||||
|
"M84 X Y E ; Disable all steppers but Z"
|
||||||
|
],
|
||||||
|
"gcodeProc": "",
|
||||||
|
"gcodeChange": [],
|
||||||
|
"gcodeFExt": "gcode",
|
||||||
|
"extruders": [
|
||||||
|
{
|
||||||
|
"extFilament": 1.75,
|
||||||
|
"extNozzle": 0.4,
|
||||||
|
"extOffsetX": 0,
|
||||||
|
"extOffsetY": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extFilament": 1.75,
|
||||||
|
"extNozzle": 0.4,
|
||||||
|
"extOffsetX": 0,
|
||||||
|
"extOffsetY": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"new": false,
|
||||||
|
"deviceName": "Creality.Ender.7",
|
||||||
|
"imageURL": "",
|
||||||
|
"fwRetract": false,
|
||||||
|
"filamentSource": "direct",
|
||||||
|
"profiles": [
|
||||||
|
{
|
||||||
|
"antiBacklash": 0,
|
||||||
|
"arcTolerance": 0,
|
||||||
|
"firstLayerBedTemp": 60,
|
||||||
|
"firstLayerBeltBump": 0,
|
||||||
|
"firstLayerBeltLead": 3,
|
||||||
|
"firstLayerBeltFact": 1,
|
||||||
|
"firstLayerBrim": 0,
|
||||||
|
"firstLayerBrimGap": 0,
|
||||||
|
"firstLayerBrimIn": 0,
|
||||||
|
"firstLayerBrimTrig": 0,
|
||||||
|
"firstLayerFanSpeed": 0,
|
||||||
|
"firstLayerFillRate": 35,
|
||||||
|
"firstLayerFlatten": 0,
|
||||||
|
"firstLayerNozzleTemp": 210,
|
||||||
|
"firstLayerRate": 30,
|
||||||
|
"firstLayerYOffset": 0,
|
||||||
|
"firstSliceHeight": 0.25,
|
||||||
|
"outputAlternating": false,
|
||||||
|
"outputAvoidGaps": true,
|
||||||
|
"outputBedTemp": 65,
|
||||||
|
"outputBeltFirst": false,
|
||||||
|
"outputBrimCount": 2,
|
||||||
|
"outputBrimOffset": 2,
|
||||||
|
"outputCoastDist": 0,
|
||||||
|
"outputDraftShield": false,
|
||||||
|
"outputFanLayer": 1,
|
||||||
|
"outputFanSpeed": 255,
|
||||||
|
"outputFeedrate": 50,
|
||||||
|
"outputFillMult": 1.25,
|
||||||
|
"outputFinishrate": 50,
|
||||||
|
"outputInvertX": false,
|
||||||
|
"outputInvertY": false,
|
||||||
|
"outputLayerRetract": false,
|
||||||
|
"outputLoops": 0,
|
||||||
|
"outputMaxFlowrate": 15,
|
||||||
|
"outputMinLayerTime": 10,
|
||||||
|
"outputMinSpeed": 5,
|
||||||
|
"outputPurgeTower": 0,
|
||||||
|
"outputRaft": false,
|
||||||
|
"outputRaftSpacing": 0.2,
|
||||||
|
"outputRetractDist": 10,
|
||||||
|
"outputRetractDwell": 20,
|
||||||
|
"outputRetractSpeed": 40,
|
||||||
|
"outputRetractWipe": 0,
|
||||||
|
"outputScarfLength": 0,
|
||||||
|
"outputSeekrate": 250,
|
||||||
|
"outputShellMult": 1.25,
|
||||||
|
"outputShortPoly": 0,
|
||||||
|
"outputSparseMult": 1.25,
|
||||||
|
"outputTemp": 220,
|
||||||
|
"processName": "Ender 7 PLA",
|
||||||
|
"ranges": [],
|
||||||
|
"sliceAdaptive": false,
|
||||||
|
"sliceAngle": 45,
|
||||||
|
"sliceBottomLayers": 3,
|
||||||
|
"sliceCompInner": 0,
|
||||||
|
"sliceCompOuter": 0,
|
||||||
|
"sliceDetectThin": "basic",
|
||||||
|
"sliceFillAngle": 45,
|
||||||
|
"sliceFillGrow": 0,
|
||||||
|
"sliceFillOverlap": 0.35,
|
||||||
|
"sliceFillRepeat": 1,
|
||||||
|
"sliceFillSparse": 0.25,
|
||||||
|
"sliceFillType": "hex",
|
||||||
|
"sliceFillWidth": 1,
|
||||||
|
"sliceHeight": 0.25,
|
||||||
|
"sliceLayerStart": "last",
|
||||||
|
"sliceLayerStartX": 0,
|
||||||
|
"sliceLayerStartY": 0,
|
||||||
|
"sliceLineWidth": 0,
|
||||||
|
"sliceMinHeight": 0,
|
||||||
|
"sliceShellOrder": "in-out",
|
||||||
|
"sliceShells": 3,
|
||||||
|
"sliceSolidMinArea": 1,
|
||||||
|
"sliceSupportAngle": 50,
|
||||||
|
"sliceSupportArea": 0.1,
|
||||||
|
"sliceSupportDensity": 0.1,
|
||||||
|
"sliceSupportEnable": true,
|
||||||
|
"sliceSupportExtra": 0,
|
||||||
|
"sliceSupportGap": 1,
|
||||||
|
"sliceSupportGrow": 0,
|
||||||
|
"sliceSupportNozzle": 0,
|
||||||
|
"sliceSupportOffset": 1,
|
||||||
|
"sliceSupportOutline": true,
|
||||||
|
"sliceSupportSize": 5,
|
||||||
|
"sliceSupportSpan": 5,
|
||||||
|
"sliceTopLayers": 3,
|
||||||
|
"sliceZInterleave": false,
|
||||||
|
"zHopDistance": 0.2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"extras": {}
|
||||||
|
}
|
||||||
|
|
@ -2024,6 +2024,18 @@ details[open] summary::after {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* background-color: #f8f8f8; */
|
/* background-color: #f8f8f8; */
|
||||||
}
|
}
|
||||||
|
#device-action {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
#device-action a {
|
||||||
|
right: 0;
|
||||||
|
position: absolute;
|
||||||
|
border-bottom: 1px dotted;
|
||||||
|
}
|
||||||
|
#device-action a:hover {
|
||||||
|
color: #888;
|
||||||
|
border-bottom: 1px transparent;
|
||||||
|
}
|
||||||
#device-action button, #tool-action button {
|
#device-action button, #tool-action button {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
||||||
|
|
@ -546,6 +546,7 @@
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
<button id="device-save" lk="save">save</button>
|
<button id="device-save" lk="save">save</button>
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
|
<a href="https://docs.grid.space/kiri-moto/gcode-macros" target="docs">gcode macro docs</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,114 +0,0 @@
|
||||||
/** atom3dp css */
|
|
||||||
|
|
||||||
button {
|
|
||||||
color: #000;
|
|
||||||
border: 1px solid rgba(20,20,20,0.5);
|
|
||||||
background-color: rgba(210,210,210,0.8);
|
|
||||||
padding: 2px 7px 3px 7px;
|
|
||||||
margin-bottom: 2px !important;
|
|
||||||
}
|
|
||||||
button:hover {
|
|
||||||
border-color: #000;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
label {
|
|
||||||
border-bottom: 1px solid rgba(220,220,225,1);
|
|
||||||
}
|
|
||||||
.dialog {
|
|
||||||
background-color: rgba(220,220,220,0.75);
|
|
||||||
border-color: #bbb;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#device-cols > div {
|
|
||||||
background-color: rgba(250,250,250,0.75);
|
|
||||||
}
|
|
||||||
#device-list select {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
#device-list option[local="1"] {
|
|
||||||
color: #00f;
|
|
||||||
}
|
|
||||||
#device-labels span {
|
|
||||||
background-color: rgba(170,221,255,0.75);
|
|
||||||
border: 1px dashed #aaa;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tool-cols > div {
|
|
||||||
background-color: rgba(250,250,250,0.75);
|
|
||||||
}
|
|
||||||
#tool-list select {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
#tool-list option[local="1"] {
|
|
||||||
color: #00f;
|
|
||||||
}
|
|
||||||
#tool-labels span {
|
|
||||||
background-color: rgba(170,221,255,0.75);
|
|
||||||
border: 1px dashed #aaa;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#catalog span {
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 0;
|
|
||||||
background-color: rgba(170,221,255,0.75);
|
|
||||||
border: 1px dashed #aaa;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
#catalog button {
|
|
||||||
background-color: rgba(250,250,250,0.8);
|
|
||||||
}
|
|
||||||
#catalog button:hover {
|
|
||||||
background-color: rgba(200,200,200,0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
#settings span {
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 0;
|
|
||||||
background-color: rgba(170,221,255,0.75);
|
|
||||||
border: 1px dashed #aaa;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
#settings button {
|
|
||||||
background-color: rgba(250,250,250,0.8);
|
|
||||||
}
|
|
||||||
#settings button:hover {
|
|
||||||
background-color: rgba(200,200,200,0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
.grouphead {
|
|
||||||
color: black;
|
|
||||||
border-top-left-radius: 3px;
|
|
||||||
border-top-right-radius: 0;
|
|
||||||
border-bottom-right-radius: 3px;
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
border: 1px dashed #aaa;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
padding: 3px 2px 2px 3px;
|
|
||||||
background-color: rgba(170,221,255,0.75);
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
#control-left {
|
|
||||||
border-top: 0;
|
|
||||||
border-bottom: 0;
|
|
||||||
background-color: rgba(220,220,225,0.25);
|
|
||||||
}
|
|
||||||
#control-right {
|
|
||||||
color: #000;
|
|
||||||
border-top: 0;
|
|
||||||
border-bottom: 0;
|
|
||||||
background-color: rgba(220,220,225,0.25);
|
|
||||||
}
|
|
||||||
#appid span {
|
|
||||||
x-background-color: rgba(220,220,225,0.5) !important;
|
|
||||||
}
|
|
||||||
#selection span {
|
|
||||||
background-color: rgba(220,220,225,0.5) !important;
|
|
||||||
}
|
|
||||||
#layer-view span {
|
|
||||||
background-color: rgba(220,220,225,0.5) !important;
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
/** atom3dp css */
|
|
||||||
|
|
||||||
button {
|
|
||||||
color: #000;
|
|
||||||
border: 1px solid rgba(20,20,20,0.5);
|
|
||||||
}
|
|
||||||
label {
|
|
||||||
border-bottom: 1px solid rgba(200,200,0,0.75);
|
|
||||||
}
|
|
||||||
.grouphead {
|
|
||||||
color: white;
|
|
||||||
background-color: rgba(0,0,0,0.85);
|
|
||||||
}
|
|
||||||
#control-left {
|
|
||||||
background-color: rgba(240,240,20,0.5);
|
|
||||||
}
|
|
||||||
#control-right {
|
|
||||||
color: #000;
|
|
||||||
background-color: rgba(240,240,20,0.5);
|
|
||||||
}
|
|
||||||
#appid span {
|
|
||||||
background-color: rgba(240,240,20,0.5) !important;
|
|
||||||
}
|
|
||||||
#selection span {
|
|
||||||
background-color: rgba(240,240,20,0.5) !important;
|
|
||||||
}
|
|
||||||
#layer-view span {
|
|
||||||
background-color: rgba(240,240,20,0.5) !important;
|
|
||||||
}
|
|
||||||
#modeCAM {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue