This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The tooth profile of a 2GT belt | |
//A support function to generate arcs | |
function arc(x, xOffset, yOffset, radius, sign){ | |
if(sign){ | |
return yOffset + Math.sqrt(Math.pow(radius, 2) - Math.pow(x - xOffset, 2)); | |
} | |
else{ | |
return yOffset - Math.sqrt(Math.pow(radius, 2) - Math.pow(x - xOffset, 2)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const numberOfTeeth = 30; | |
const toothLength = 20; | |
const circumference = numberOfTeeth*toothLength; | |
const radius = circumference/(2*3.14159); | |
const rampHeight = 9; | |
const resolution = 1; | |
var radialExtension = 0; | |
var upDownFlag = 1; | |
var stepsPerTooth = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//A basic saw tooth profile with length 2 | |
function sawTooth(i){ | |
//Ramp up | |
if(i>.75 && i<1.25){ | |
return 1; | |
} | |
//Ramp Down | |
else{ | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a bend and a tab which have connectors | |
function bend(attachedGeometry, settings){ | |
//Give this bend a unique ID...This should really be something more rigerous than random | |
const bendID = Math.floor((Math.random() * 1000)).toString().padStart(4, "0"); | |
settings.bendID = bendID; | |
const bendArc = assemble( | |
Square(settings.length,settings.thickness) | |
.moveY(settings.interiorRadius + settings.thickness/2) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder