Close



Results 1 to 8 of 8

Threaded View

  1. #4
    Staff Engineer
    Join Date
    Jun 2014
    Posts
    885
    Would this be the type of construction you seek?



    Code:
    $fn = 90;
    ring_diameter = 20;
    ring_wall = 4;
    ring_height = 5;
    clearance = 0.2;
    pin_diameter = ring_diameter;
    pin_height = 40;
    ring_placement = 20; // offset from origin for center of gap
    addabit = 0.1; // floating point error prevention
    
    module ring(){
        difference(){
            cylinder(d = ring_diameter, h = ring_height);
            translate([0, 0, - addabit / 2])
            cylinder(d = ring_diameter - ring_wall / 2, h = ring_height + addabit);
            translate([ring_diameter / 2, 0, ring_height / 2])
            cube([ring_diameter + addabit, ring_diameter + addabit, ring_height + addabit], center = true);
        }
    }
    
    
    
    
    module pin(){
        difference(){
            cylinder(d = pin_diameter, h = pin_height);
            translate([0, 0, ring_placement])
                difference(){
                    cylinder(d = ring_diameter + addabit, h = ring_height);
                    translate([0, 0, - addabit / 2])
                    cylinder(d = ring_diameter - ring_wall / 2 - clearance * 2, h = ring_height + addabit);
            }
        }
    }
    
    pin();
    translate([-ring_diameter, 0, ring_placement])
    ring();
    The lines above are a quick and dirty bit of code for OpenSCAD, previously referenced and quite easy to learn, in my opinion, of course. I used very little in the way of sophisticated code and the result took about five minutes or so. I also use Fusion 360 on occasion but find the learning curve to be quite steep. Fusion is very powerful, but my brain cells have trouble retaining all the features and menus and sequences, while OpenSCAD really does the trick for me. Great documentation and forum online as well.
    Last edited by curious aardvark; 08-18-2017 at 01:32 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •