Last active
July 19, 2021 15:26
-
-
Save arnholm/24d750acf39b701f5c915d54fb7c8453 to your computer and use it in GitHub Desktop.
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
// AngelCAD code. | |
shape@ main_shape(as_args@ args) | |
{ | |
double l = 20.5; // mm | |
double w = 10.5; // mm | |
double diam = 16.0; // mm | |
double tol = 0.75; // mm | |
solid@ pipe = rotate_y(deg:-90) | |
*translate(diam*1.5,0,10) | |
*cylinder(r:diam/2+tol,h:100); | |
solid@ leg = translate(-3,0,0) | |
* rotate_z(deg:-90) | |
* translate(0,0,diam) | |
* linear_extrude(rectangle(l+tol,w+tol,center:true),height:100); | |
solid@ cutoff = translate(-1.0*diam,0,2.4*diam) | |
* rotate_x(deg:90) | |
*cylinder(r:18,h:100,center:true); | |
solid@ box = translate(0,0,diam) | |
*cuboid(dx:2*diam,dy:1.5*diam,dz:2*diam,center:true); | |
return box - cutoff - translate(0.7*diam,0,-0.85*diam)*(pipe+leg); | |
} | |
void main() | |
{ | |
shape@ obj = main_shape(GetArgs()); | |
obj.write_xcsg(GetInputFullPath(),secant_tolerance:0.001); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment