Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $fn = 100;
- // width of top round part
- d1 = 12.5 * 25.4;
- // radius of rounding of top round part
- r1 = 20;
- // diameter of small ring below round top
- d2 = 12.0 * 25.4;
- // diameter or larger wider straight part.
- d3 = 11.25 * 25.4;
- // height of the larger wider straight part.
- h3 = 80;
- // width of smaller round ring
- d4 = 11.5 * 25.4;
- // radius of rounding of smaller ring
- r4 = 12;
- // diameter of pillar
- d5 = 10 * 25.4;
- // total height of the piller,
- // inlusive profile part.
- h5 = 1000;
- // length of the indents around the pillar
- h6 = 800;
- // radius of indents
- r6 = 16;
- epsilon = 0.001;
- difference()
- {
- rotate_extrude()
- PillerProfile2D();
- for(a=[0:20:360-20])
- rotate(a)
- translate([d5/2,0,h5-h6])
- hull()
- for(z=[0,h6])
- translate([0,0,z])
- sphere(r=r6);
- }
- module PillerProfile2D()
- {
- // The profile is only one half.
- // It is build upside down.
- // The top round part
- x1 = d1/2 - r1;
- square([x1,2*r1]);
- translate([x1,r1])
- circle(r1);
- // small ring below the top part
- y2 = 3;
- translate([0,r1])
- square([d2/2,r1+y2]);
- // larger wider straight part
- y3 = r1+r1+y2-epsilon;
- translate([0,y3])
- square([d3/2,h3]);
- // smaller round ring
- x4 = d4/2 - r4;
- y4 = y3 + h3 - r4;
- translate([0,y4])
- {
- square([x4,2*r4]);
- translate([x4,r4])
- circle(r4);
- }
- // The piller is inside everything.
- // It can start at the bottom
- square([d5/2,h5]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement