Friday, August 24, 2018

Cad Exercises - Pipe

Revisiting Cad Exercises

source: https://goo.gl/xLKvB8.




$fn=60;
assembly();
module assembly()
{
    rotate([0,-45,0])translate([-225,0,0])flange();
    rotate([0,-45,0])translate([-225,0,0])flangerim();
    translate([-225,0,0])mirror([0,0,1])flange();
    rotate([90,0,0]) pipe();
}

module flange()
{
rotate_extrude()
    translate([0,-37]){
            hull(){
                polygon([[44,0],[112.5,0],[44,37.1]]);
                translate([102.5,27])circle(10,$fn=15);
            }
        fillet([68.5+15,37-0.5],[68.5-1,37],[68.5-1,37+15]);
// fillet is a tiny bit smaller to smooth with the pipe
        translate([44,36])square([23.5,15]);
    }
}

module flangerim()
{
rotate_extrude()
    translate([0,-37]){
    translate([44,-10])square([65-44,10]);
}
}

module pipe()
{
rotate_extrude(angle =45,$fn=60, convexity = 20)
    translate([-225,0,0])
    difference(){
        circle(68.5);
        circle(44);
    }
}

module fillet(a,b,c)
{
difference(){
    polygon([a,b,c]);
    translate(a+(c-b))circle(norm(a-b),$fn=24);
}}



 



No comments:

Post a Comment