Skip to content

Instantly share code, notes, and snippets.

@jonathanperret
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanperret/dfa1f773f8714133752d to your computer and use it in GitHub Desktop.
Save jonathanperret/dfa1f773f8714133752d to your computer and use it in GitHub Desktop.
OpenJSSCAD X/Y calibration object
// - Set nozzle diameter and layer height below
// - Print with no top/bottom, one shell, same layer height
var nozzle = 0.35,
layer = 0.2;
function fence(side) {
var inside=side-10-nozzle,
outside=side+nozzle;
return cube([outside,outside,0.2])
.center([true,true,false])
.subtract(
cube([inside,inside,20])
.center([true,true,false]))
;
}
function main() {
var list=[];
for(var i=20; i<=80; i+=20) {
list.push(i);
}
return union(list.map(function (side) {
return fence(side);
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment