Last active
June 24, 2017 13:15
-
-
Save feromes/e59835af7c370e7acd9e3340969f2b88 to your computer and use it in GitHub Desktop.
Simple example to solve 2d cut dogbone using a router CNC, write in OpenScad
This file contains 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
//dogbone.scad - Simple example to solve 2d cut dogbone using a router CNC | |
square_side = 100; | |
half_square_side = square_side / 2; | |
radius = 5; | |
dog_bone_offset = sin(45) * radius; | |
square_vertex = [[1, 1], [1, -1], [-1, -1], [-1, 1]]; | |
difference () { | |
square([square_side, square_side] * 2, center=true); | |
square([square_side, square_side], center=true); | |
for(i = square_vertex * (half_square_side - dog_bone_offset)) { | |
translate(i) { | |
circle(r = radius); | |
} | |
} | |
} | |
echo(version=version()); | |
// Written by Fernando Gomes <[email protected]> | |
// | |
// To the extent possible under law, the author(s) have dedicated all | |
// copyright and related and neighboring rights to this software to the | |
// public domain worldwide. This software is distributed without any | |
// warranty. | |
// | |
// You should have received a copy of the CC0 Public Domain | |
// Dedication along with this software. | |
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment