Simple and precise DIY tool setter for a hobby CNC milling machine.
Copy paste following code to maker.js playground to create the sketch.
-----
var m = require('makerjs');
var $ = m.$;
this.units = 'mm';
var diameter = 36;
var switchCenterOffset = 3;
var sideWidth = 2.5;
var rodDiameter = 8.1;
$(new ToolSetter(diameter, rodDiameter, sideWidth))
.addTo(this, 'bottom')
.clone()
.moveRelative([diameter + 8, 0])
.addTo(this, 'top');
$(new m.models.Rectangle(6.5, 20))
.center()
.moveRelative([0, switchCenterOffset])
.addTo(this, 'switchTop');
$(new m.models.Rectangle(3.4, 19))
.center()
.moveRelative([0, switchCenterOffset])
.addTo(this, 'switchBottom');
function ToolSetter(diameter, rodDiameter, sideWidth) {
this.paths = {
outside: new m.paths.Circle([0, 0], diameter / 2),
inside: new m.paths.Circle([0, 0], diameter / 2 - sideWidth),
rod: new m.paths.Circle([0, 0], rodDiameter / 2)
};
}
-----
5 сен 2024