all repos — visor @ 14576dfd4ee667265cad1d2a46176cad61eaa3ee

Unnamed repository; edit this file 'description' to name the repository.

models/3m_bayonet.scad (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
$fn = $preview ? 12 : 180;
tollerance=0.5;

attachment_od=30;
attachment_height=5.89;
bayonet_od=21.5+tollerance;
bayonet_extra=2; //radius
bayonet_height=3.5+tollerance;
bayonet_under=2;
bayonet_width=7;


module 3m_attachment() {
    difference(){
        cylinder(r=attachment_od/2, h=attachment_height-0.15);
        translate([0,0,-0.1])
        cylinder(r=bayonet_od/2, h=attachment_height+2);
        for(i=[0:2]){
            rotate([0,0,120*i]){
                translate([0,0,-0.1]){
                intersection(){
                    cylinder(r=bayonet_od/2+bayonet_extra, h=bayonet_height+bayonet_under);
                    translate([-bayonet_width/2, 0,0])
                    cube([bayonet_width, attachment_od, attachment_height]);
                }
                intersection(){
                    cylinder(r=bayonet_od/2+bayonet_extra, h=attachment_height);
                    translate([0,0,bayonet_under])
                    union(){
                        translate([-bayonet_width/2, 0,0])
                        cube([bayonet_width*4, attachment_od, bayonet_height]);
                        translate([bayonet_width/2, 0,-1.2])
                        rotate([0,-10,0])
                        cube([bayonet_width,attachment_od,bayonet_height]);
                    }
                }
                }
            }
        }
    }
}


//To use:
// Put in same folder as 3m_bayonet.scad and in your file: 
//use <3m_bayonet.scad>
3m_attachment();