a=.79;b=1.59;c=3.18;d=5.93;e=10.68;f=15.49;g=18.67;h=20.26;$fn=64;module c(r,x,y){translate([x,y])circle(r);}module s(h,w,x,y){translate([x,y])square([h,w]);}module e(h){linear_extrude(h){children();};}module P(j,k){polygon([for(i=[j:k])[X[i],Y[i]]]);}X=[0,0,2.76,3.56,3.56,4.35,14.7,f,f,17.08,23.91,24.34,28.51,29.12,33.95,35.11,39.9,39.31,37,h,37,37,36.03,34,26.5,18.46,18.68,h,h];Y=[0,13.1,13.1,12.3,3.97,c,c,3.97,e,13.43,17.37,17.73,22.7,23,23,22.07,1.75,.8,.25,0,0,.25,.84,9.46,14.21,12.5,8.59,7,0];module z(){difference(){union(){P(0,19);c(a,2.76,12.3);c(c,g,e);c(a,29.12,22.19);c(1.19,33.95,21.8);c(a,39.12,1.57);}c(a,4.35,4);c(a,14.7,4);c(b,23.12,18.75);c(2,18.9,10.56);c(6.35,27.82,8);P(20,28);}c(a,36.81,1.03);c(b,g,7);}module y(){difference(){s(22.43,13,0,-13);hull(){s(1,1,22,0);c(d,5.3,-6.5);c(d,5.3,-5.81);c(d,17.46,-6.64);}}c(a,23.1,-10.32);s(b,2.68,22.3,-13);}module x(){difference(){s(.4,.4,-12.45,20.24);c(.4,-12.05,20.64);}hull(){s(1,1,-13,19.24);s(c,1,-12.7,0);c(b,-11.11,18.65);}}difference(){e(12.44)z();rotate([-90,0,0])e(23)y();translate([23.1,0])rotate([0,90,0])e(17)x();}
Discussion
GM. If you copy and paste this text into OpenSCAD you can create and 3D print an object that is legally classified as a machine gun in the US.
Can somebody please report it so it gets deleted?
Is there a non-minified version of it somewhere? I just realized how nice some of the curves are. My openscad models are lucky to get a fillet lmao.
Sorry, switched keys and just saw this.
No, I never published anything but the minified script. My formatted source file still has a bunch of shorthand module I use for the primatives, but it's small enough I just went through and replaced them so.
$fn=64;
difference(){
/// Z PROFILE
linear_extrude(12.44){
difference(){
union(){
polygon(
[ [0, 0],
[0, 13],
[2.76, 13],
[3.56, 12.3],
[3.56, 4],
[4.35, 3.2],
[14.7, 3.2],
[15.5, 4],
[15.5, 10.68],
[17.08, 13.43],
[23.91, 17.37],
[24.34, 17.73],
[28.51, 22.7],
[29.12, 23],
[33.95, 23],
[35.11, 22.07],
[39.9, 1.75],
[39.31, 0.8],
[37, 0.25],
[20.26, 0] ]
);
translate([18.67,10.68])circle(3.18);
}
translate([23.12,18.75])circle(1.59);
translate([18.9,10.56])circle(2);
translate([27.82,8])circle(6.35);
polygon(
[ [37, 0],
[37, 0.25],
[36, 0.84],
[34, 9.46],
[26.5, 14.2],
[18.46, 12.5],
[18.68, 8.6],
[20.26, 7],
[20.26, 0] ]
);
}
translate([18.67,7])circle(1.59);
}
/// Y PROFILE
rotate([-90,0,0])linear_extrude(23){
difference(){
translate([0,-13])square([22.43,13]);
hull(){
translate([22,0])square([1,1]);
translate([5.3,-6.5])circle(5.93);
translate([5.3,-5.81])circle(5.93);
translate([17.46,-6.64])circle(5.93);
}
}
translate([23.1,-10.32])circle(.79);
translate([22.3,-13])square([1.59,2.68]);
}
/// X PROFILE
translate([23.1,0])rotate([0,90,0])linear_extrude(17)hull(){
translate([-13,19.24])square([1,1]);
translate([-12.7,0])square([3.18,1]);
translate([-11.11,18.65])circle(1.59);
}
}