Bug Report/Help Wanted with involute_gears

69 views
Skip to first unread message

Marcio Teixeira

unread,
Aug 8, 2015, 2:50:40 PM8/8/15
to MCAD

Hello, I am trying to construct a simple gear using "MCAD/involute_gears.scad" and I have run into numerous problems with misshapen teeth or non-manifold surfaces.

It seems like each time I find a workaround, something else crops up and I am back to square one.

I am posting code that reproduces the problem in the hopes that it can serve either as a bug report, or someone can point out what I am doing wrong.

I've already spent several hours trying to get around this and I'm out of options. Any help would be very much appreciated!

Thank you,

-- Marcio


/* This bug report pertains to the "MCAD/involute_gears.scad" included
 * in version 2015.03-1 of OpenSCAD
 */

use <MCAD/involute_gears.scad>;

$fn = 40;

teeth          = 9;
backlash       = 0.7;
circular_pitch = 143;
bore_diameter  = 1.5;

module non_manifold_and_mishapen() {
    // My first attempt at a gear of the correct size for
    // my project gave me this. The surface is non-manifold,
    // and the tips of the teeth are mishapen (when backlash
    // != 0 and for this particular combination of teeth and
    // circular pitch.)
    gear (
        number_of_teeth = teeth,
        circular_pitch  = circular_pitch,
        backlash        = backlash,
        bore_diameter   = bore_diameter,
        hub_thickness   = 1,
        gear_thickness  = 1,
        rim_thickness   = 1,
        flat            = false
    );
}

module mishapen_gear() {
    // It seems possible to work around the non-manifoldness
    // by making the gear flat and extruding it, but this won't
    // fix the teeth
    gear (
        number_of_teeth = teeth,
        circular_pitch  = circular_pitch,
        backlash        = backlash,
        bore_diameter   = bore_diameter,
        flat            = true
    );
}

module mishapen_gear_hack() {
    // Here is a hack, showing the results I expect.
    intersection() {
        mishapen_gear();
        circle(d=8.51);
    }
}

module non_manifold_combo() {
    // However, combining this into more complex assemblies
    // invariably makes it non-manifold again.
    difference() {
        union() {
            linear_extrude(1)
                mishapen_gear_hack();
            translate([0, 0, 0.1])
                mirror([0,0,1]) {
                    cylinder( d = 10, h = 1 );
                    cylinder( d = 3,  h = 5 );
                }
        }
        cylinder( d = 2, h = 15,center=true);
    }
}


translate([-10,0,0])                    non_manifold_and_mishapen();
translate([  0,0,0])  linear_extrude(1) mishapen_gear();
translate([ 10,0,0])  linear_extrude(1) mishapen_gear_hack();
translate([ 20,0,0])                    non_manifold_combo();


Reply all
Reply to author
Forward
0 new messages