Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//I want the larger end of this object:
translate([-73,0,0]) rotate([0,90,0]) cylinder(h=73, d1=16, d2=0, center=false, $fn=100);
// to resemble the corresponding end of this object:
intersection() {
translate([-73+16/2,0,0]) {
difference() { cylinder(h=16, d1=16, d2=16); translate([0,-10,0]) cube(73,16,16); }
}
translate([-73,0,0]) rotate([0,90,0]) cylinder(h=73, d1=16, d2=0, center=false, $fn=100);
}
@jfcaron3

This comment has been minimized.

Copy link

commented Mar 9, 2018

// Something like this?
//I want the larger end of this object:
union()
{
difference()
    {
    translate([-73,0,0])
    rotate([0,90,0])
    cylinder(h=73, d1=16, d2=0, center=false, $fn=100);
    
    translate([-50-73+8,0,0])
    cube([100,100,100],center=true);
    }
// to resemble the corresponding end of this object:
intersection() {
    translate([-73+16/2,0,0]) 
    {
        difference() 
        { 
            cylinder(h=16, d1=16, d2=16); 
            translate([0,-10,0]) 
            cube(73,16,16); 
        }
    }

    translate([-73,0,0]) 
    rotate([0,90,0]) 
    cylinder(h=73, d1=16, d2=0, center=false, $fn=100);
}
}
@advorak

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

    difference() {
        rotate([0,90,0])
        translate([0,0,-shell_radius/2])
        cylinder(h=shell_radius, d1=cylinder_diameter, d2=0, center=true, $fn=1024);
        difference() {
            translate([-shell_radius-cylinder_radius,-cylinder_radius,0-cylinder_radius]) cube(cylinder_diameter);
            translate([-shell_radius+cylinder_radius,0,-cylinder_radius]) cylinder(cylinder_diameter,cylinder_radius,cylinder_radius);
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.