Skip to content

Instantly share code, notes, and snippets.

@keisisqrl
Created March 21, 2020 00:25
Show Gist options
  • Save keisisqrl/fe3242a4b7cb9e900278539cbb194bce to your computer and use it in GitHub Desktop.
Save keisisqrl/fe3242a4b7cb9e900278539cbb194bce to your computer and use it in GitHub Desktop.
basic dl44 muzzle attachment (under development)
use <threads.scad>
test = true;
$fn = 32;
bottom_height=25;
add_to_muz=50;
thread_len = 10.16;
module bottom () {
height = bottom_height;
module threaded_hole () {
english_thread(0.5,28,0.4,internal=true,leadin=3,test=test);
}
module outside () {
cylinder(height,d=25.5, $fn=100);
}
module core () {
translate([0,0,-0.5]) cylinder(height+1,d=10);
//cylinder(25,d=10);
}
module chamfer_cut () {
radius=2;
translate([0,0,height-radius])
rotate_extrude(angle=360, $fn=100)
translate([25.5/2-radius,0,0])
difference() {
square(radius);
circle(radius, $fn= 64);
}
}
difference() {
outside();
core();
threaded_hole();
chamfer_cut();
}
}
//bottom();
module top() {
height = add_to_muz - (bottom_height - thread_len);
echo("top height: ", height);
translate([0,0,bottom_height])
union() {
difference() {
cylinder(h=height,d1=12,d2=24);
cylinder(h=height,d1=10,d2=22);
};
translate([0,0,height])
rotate_extrude(angle=360)
translate([11.5,0,0])
circle(0.5);
}
}
bottom();
top();
//cylinder(h=25,d=2,center=true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment