-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathcal.html
57 lines (51 loc) · 3.34 KB
/
cal.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<html>
<head>
<script>
function validateForm(){
var image = document.getElementById("image").value;
var name = document.getElementById("name").value;
if (image =='')
{
return false;
}
if(name =='')
{
return false;
}
else
{
return true;
}
return false;
}
</script>
</head>
<body>
<form method="post" action="cal.php" enctype="multipart/form-data">
Laser Min Power [0-255]: <input type="text" value="22" name="LaserMin" size="8"/><br />
Laser Max Power [0-255]: <input type="text" value="65" name="LaserMax" size="8"/><br />
Laser 'Off' Power [0-255]: <input type="text" value="13" name="LaserOff" size="8"/><br />
Skip over values above [0-255]: <input type="text" value="253" name="whiteLevel" size="8"/><br />
Tune Min <input type="checkbox" name="tuneMin" value="1">
Tune Max <input type="checkbox" name="tuneMax" value="1"><br />
Travel (noncutting) Rate [mm/min]: <input type="text" value="3000" name="travelRate" size="8"/><br />
Scan (cutting) Rate [mm/min]: <input type="text" value="800" name="feedRate" size="8"/><br />
Overscan Distance (prevents twang from showing) [mm]: <input value="3" type="text" name="overScan" size="8"/><br />
Height (width autocalculated) [mm]: <input type="text" name="sizeY" size="8"/><br />
Horizontal Resolution [mm/pixel]: <input value="0.254" type="text" name="resX" size="8"/><br />
Scangap [mm/line]: <input type="text" value="0.1" name="scanGap" size="8"/><br />
Start X [mm from 0 for right of image]: <input value="25" type="text" name="offsetX" size="8"/><br />
Start Y [mm from 0 for top of image]: <input value="25" type="text" name="offsetY" size="8"/><br />
Image File: <input type="file" accept="image/*" name="image" id="image" /><br />
<input type="submit" value='Save' onclick="return validateForm()"/>
</form>
<p> <b>About this tool:</b> This tool was created because I could not find any useable image to gcode converters suitable for lasers based on 3D printers.
It assumes that your fan PWM (M106 Sxxx) is used to drive a TTL driver.</p>
<p> <b>Laser Power and Speed:</b>You should set laser min to a level just below where it makes a mark on
your given material and the laser max to a level where it makes a nice black mark and where increasing power does not make the mark any darker.
Trial and error is certainly required here, so please test your material BEFORE you ruin that nice thing you were trying to make.
Here's a script to generate some test gcode at a given feedrate.</p>
<p><b>A note on commands per second:</b> My Printrboard can handle about 280 commands per second over USB and about 380 when printing from the SDcard.
This is somewhat abstracted to this program only because commands can vary considerably in length.</p>
</body>
</html>