Skip to content

Instantly share code, notes, and snippets.

@dylan-sessler
Created March 4, 2022 20:02
Show Gist options
  • Save dylan-sessler/109e8e32ab2e9ed82fa4a0ec5b1c771a to your computer and use it in GitHub Desktop.
Save dylan-sessler/109e8e32ab2e9ed82fa4a0ec5b1c771a to your computer and use it in GitHub Desktop.
other code point
function cncRoughingToolsToRoughingTime(accumulator, cncRoughingTool, feedRate, perPartVolumeRemoved) {
const volumeToRemove = perPartVolumeRemoved * cncRoughingTool.volumeRatio
const widthOfCut = cncRoughingTool.diameter / 4
const depthOfCut = cncRoughingTool.diameter / 4
const removalRate = widthOfCut * depthOfCut * feedRate
const toolRoughingTime = volumeToRemove / removalRate
return accumulator + toolRoughingTime
}
function cncFinishingToolsToFinishingTime(accumulator, cncFinishingTool, feedRate, partSurfaceArea) {
const surfaceAreaToRemove = partSurfaceArea * cncFinishingTool.surfaceAreaRatio
const widthOfCut = cncFinishingTool.diameter / 4
const FINISHING_PASSES = 1
const removalRate = widthOfCut * FINISHING_PASSES * feedRate
const toolFinishingTime = surfaceAreaToRemove / removalRate
return accumulator + toolFinishingTime
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment