Skip to content

Instantly share code, notes, and snippets.

@feromes
Last active June 24, 2017 13:15
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 feromes/e59835af7c370e7acd9e3340969f2b88 to your computer and use it in GitHub Desktop.
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
//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 <feromes@gmail.com>
//
// 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/>.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment