Improved hole detection algorithm

This commit is contained in:
casperlamboo
2015-07-28 12:28:05 +02:00
parent 13c1333ce8
commit 3b455377ba
3 changed files with 49 additions and 44 deletions

View File

@ -13,7 +13,7 @@ setTimeout(() => {
var slicer = new SLICER.Slicer();
//var slicer = new SLICER.SlicerWorker();
slicer.setGeometry(geometry);
slicer.setGeometry(geometry.clone());
slicer.onfinish = function (gCode) {
document.getElementById('gcode').innerHTML = gCode.replace(/(?:\r\n|\r|\n)/g, '<br />');
};

View File

@ -1,27 +1,27 @@
<!DOCTYPE>
<html>
<head>
<head>
<title>Doodle3D Slicer</title>
<title>Doodle3D Slicer</title>
<style>
#gcode {
font-family: monospace;
}
</style>
<style>
#gcode {
font-family: monospace;
}
</style>
<script type="text/javascript" src="../jspm_packages/system.js"></script>
<script type="text/javascript" src="../config.js"></script>
<script type="text/javascript" src="../jspm_packages/system.js"></script>
<script type="text/javascript" src="../config.js"></script>
<script type="text/javascript">
System.import('example/app.js');
</script>
<script type="text/javascript">
System.import('example/app.js');
</script>
</head>
</head>
<body>
<body>
<p id="gcode"></p>
<p id="gcode"></p>
</body>
</body>
</html>