Skip to content

Commit

Permalink
Add screenshot
Browse files Browse the repository at this point in the history
jes committed Apr 12, 2022
1 parent f68d8a7 commit b1e2be4
Showing 3 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Meshmill

![Screenshot](img/screenshot.png)

Meshmill is open source 3D CAM software.

*** This is not even beta-quality software. Use it at your own peril. ***
Binary file added img/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions js/toolpath.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function ToolpathViewer(file) {
window.api.receive('toolpath-points', function(path) {
renderToolpath(path);
});
window.api.send('plot-toolpath', {
file: file,
});
}

function renderToolpath(path) {
let points = path.map(function(p) {
return new THREE.Vector3(p[0]-scenemiddle.x,p[1]-scenemiddle.y,p[2]-scenemiddle.z);
});
let geometry = new THREE.BufferGeometry().setFromPoints(points);
let material = new THREE.LineBasicMaterial({
color: 0xb674c7,
});
let line = new THREE.Line(geometry, material);
// TODO: re-initialise the scene from scratch, with the relevant heightmap
scene.add(line);
}

0 comments on commit b1e2be4

Please sign in to comment.