Allows you to auto-level your PCB before milling. Most raw PCB boards have a slight warpage. This widget lets you probe the warpage and then it auto-scales your Gcode to match the warpage so you get very clean/predictable z-positions in your milling job.
requirejs.config({
paths: {
Three: 'http://threejs.org/build/three.min',
ThreeTextGeometry: 'http://chilipeppr.com/js/three/TextGeometry',
ThreeFontUtils: 'http://chilipeppr.com/js/three/FontUtils',
ThreeHelvetiker: 'http://chilipeppr.com/js/three/threehelvetiker',
},
shim: {
ThreeTextGeometry: ['Three'],
ThreeFontUtils: ['Three', 'ThreeTextGeometry'],
ThreeHelvetiker: ['Three', 'ThreeTextGeometry', 'ThreeFontUtils'],
}
});
// make sure Helvetiker loads
/*
var ThreeHelvetiker;
console.log("Making sure font load code run first.");
window["_typeface_js"] = {loadFace: function(data) {
console.log("apparently we're supposed to load Helvetiker here???");
ThreeHelvetiker = data;
}};
console.log(window["_typeface_js"]);
*/
// Test this element. This code is auto-removed by the chilipeppr.load()
cprequire_test(["inline:com-chilipeppr-widget-autolevel"], function (autolevel) {
console.log("test running of " + autolevel.id);
autolevel.init();
$('#com-chilipeppr-widget-autolevel').css('position', 'relative');
$('#com-chilipeppr-widget-autolevel').css('background', 'none');
$('body').prepend('<div id="3dviewer"></div>');
chilipeppr.load("#3dviewer", "http://fiddle.jshell.net/chilipeppr/y3HRF/show/light/", function() {
cprequire(['inline:com-chilipeppr-widget-3dviewer'], function (threed) {
threed.init({doMyOwnDragDrop: true});
$('#com-chilipeppr-widget-3dviewer .panel-heading').addClass('hidden');
//autolevel.addRegionTo3d();
//autolevel.loadFileFromLocalStorageKey('com-chilipeppr-widget-autolevel-recent8');
//autolevel.toggleShowMatrix();
});
});
// we mimic the /send and /recvline serial port methods here for testing
chilipeppr.subscribe("/com-chilipeppr-widget-serialport/send", this, function(data) {
// when we get a send of {"z":""} reply back as if the tinyg is...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.