/* 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();