translate([77.8, 239.8, 0]) {
    //import("Crossfire_2/C2APMmount.stl");
}

$fn= 30;

module bumper_hole() {
    translate([0, 0, 1.5]) union() {
        cylinder(d =  8.5, center = true, h = 3.1);
        translate([0, 0, 0.76])
            cylinder(d = 14.5, center = true, h = 1.5);
    }
}

difference() {
    union() {
        rotate([0, 0, 45]) 
            translate([0, 0, 1.5]) {
                difference() {
                    cube(size=[ 55, 55, 3], center = true);
                    cube(size=[ 37, 37, 3.3], center = true);
                }
                difference() {
                    cube(size=[ 45, 75, 3], center = true);
                    cube(size=[ 37, 37, 3.3], center = true);
                }
            }
        /*
        translate([ 15.5,  15.5, 3]) cylinder(d = 5, center = true, h = 6);
        translate([-15.5,  15.5, 3]) cylinder(d = 5, center = true, h = 6);
        translate([ 15.5, -15.5, 3]) cylinder(d = 5, center = true, h = 6);
        translate([-15.5, -15.5, 3]) cylinder(d = 5, center = true, h = 6);
        */
        translate([   0  ,  22  , 5]) cylinder(d = 5, center = true, h = 10);
        translate([   0  ,- 22  , 5]) cylinder(d = 5, center = true, h = 10);
        translate([  22  ,   0  , 5]) cylinder(d = 5, center = true, h = 10);
        translate([- 22  ,   0  , 5]) cylinder(d = 5, center = true, h = 10);
        
        // bumper corners
        translate([  0,  32, 1.5]) cylinder(d =  18, center = true, h = 3);
        translate([  0,- 32, 1.5]) cylinder(d =  18, center = true, h = 3);
        translate([ 32,   0, 1.5]) cylinder(d =  18, center = true, h = 3);
        translate([-32,   0, 1.5]) cylinder(d =  18, center = true, h = 3);
    }

    /*
    translate([ 15.5,  15.5, 5]) cylinder(d = 3, center = true, h = 10);
    translate([-15.5,  15.5, 5]) cylinder(d = 3, center = true, h = 10);
    translate([ 15.5, -15.5, 5]) cylinder(d = 3, center = true, h = 10);
    translate([-15.5, -15.5, 5]) cylinder(d = 3, center = true, h = 10);
    */
    translate([   0  ,  22  , 5]) cylinder(d = 3, center = true, h = 11);
    translate([   0  ,- 22  , 5]) cylinder(d = 3, center = true, h = 11);
    translate([  22  ,   0  , 5]) cylinder(d = 3, center = true, h = 11);
    translate([- 22  ,   0  , 5]) cylinder(d = 3, center = true, h = 11);

    // bumper holes are removed

    translate([  0,  32, 0]) bumper_hole();
    translate([  0,- 32, 0]) bumper_hole();
    translate([ 32,   0, 0]) bumper_hole();
    translate([-32,   0, 0]) bumper_hole();
}