[OpenSCAD] "Melting" models

caterpillar caterpillar at openhome.cc
Sat May 25 05:27:24 EDT 2019


Here's my quick and dirty code based on  my library
<https://github.com/JustinSDK/dotSCAD>  . 

include <shape_starburst.scad>;
include <bend_extrude.scad>;

gear_r = 30;
thickness = 2;
angle = 75;
frags = 24;

module gear() {
    rotate(1) difference() {
        polygon(shape_starburst(gear_r, 25, 24));
        circle(5);
        for(i = [0:5]) {
            rotate(60 * i) translate([15, 0, 0]) circle(5);
        }
    }
}

rotate([0, -angle / frags, 0]) 
    translate([gear_r / frags / 2, -gear_r, gear_r * 180 / (angle *
3.14159)])
        rotate([90, 0, 0]) 
            bend_extrude([gear_r, gear_r * 2], thickness, angle, frags) 
                translate([0, gear_r, 0]) gear();

linear_extrude(thickness) 
    intersection() {
        translate([-gear_r / 2, 0, 0]) 
            gear();
    }

bend_extrude is not documented currently, however, it's already in the
repository. 

      <http://forum.openscad.org/file/t1825/melting_gear.jpg>        
square([gear_r, gear_r * 2], center = true);



-----
http://openhome.cc
--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list