Skip to content

Instantly share code, notes, and snippets.

@thehans
Created May 2, 2022 19:39
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 thehans/feba6e1721efb5ab6b2676a2f154019a to your computer and use it in GitHub Desktop.
Save thehans/feba6e1721efb5ab6b2676a2f154019a to your computer and use it in GitHub Desktop.
arc_slot OpenSCAD example
use <FunctionalOpenSCAD/functional.scad>
// https://github.com/thehans/FunctionalOpenSCAD/blob/master/functional.scad
module arc_slot(R,r,a) {
polygon(concat(
arc(r=R-r, angle=a, offsetAngle=0, c=[0,0], endpoint=false),
arc(r=r, angle=-180, offsetAngle=a-180, c=R*[cos(a),sin(a)], endpoint=false),
arc(r=R+r, angle=-a, offsetAngle=a, c=[0,0], endpoint=false),
arc(r=r, angle=-180, offsetAngle=0, c=[R,0], endpoint=false)
));
}
$fs = 0.5;
$fa = 1;
arc_slot(10,3,90);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment