Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX of MCAD/involute_gears.scad gear(), having difficulties in figuring out how to create a simple gear without inner hub #103

Open
mofosyne opened this issue Apr 15, 2022 · 0 comments

Comments

@mofosyne
Copy link

mofosyne commented Apr 15, 2022

Currently trying to just make a simple flat gear using MCAD lib used in OpenSCAD version 2019.05

Not sure if the latest lib already fixed this, but I've found difficulties with just creating a simple flat gear without a spoke for decorative purpose.

I ended up just copying the gear() module and manually modifying it to throw away the inner hub.

Is this something that can already be done with the right setting, if so is this documented yet?

The other approach is to include a simple_gear() module like below for those who don't want to fiddle with extra features like the hub.

use <MCAD/involute_gears.scad>

module simple_gear (
	number_of_teeth=15,
	circular_pitch=false, 
    diametral_pitch=false,
	pressure_angle=28,
	clearance = 0.2,
	backlash=0,
	twist=0,
	involute_facets=0,
	flat=false)
{
    pi=3.1415926535897932384626433832795;
    
	if (circular_pitch==false && diametral_pitch==false)
		echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch");

	//Convert diametrial pitch to our native circular pitch
	circular_pitch = (circular_pitch!=false?circular_pitch:180/diametral_pitch);

	// Pitch diameter: Diameter of pitch circle.
	pitch_diameter  =  number_of_teeth * circular_pitch / 180;
	pitch_radius = pitch_diameter/2;
	echo ("Teeth:", number_of_teeth, " Pitch radius:", pitch_radius);

	// Base Circle
	base_radius = pitch_radius*cos(pressure_angle);

	// Diametrial pitch: Number of teeth per unit length.
	pitch_diametrial = number_of_teeth / pitch_diameter;

	// Addendum: Radial distance from pitch circle to outside circle.
	addendum = 1/pitch_diametrial;

	//Outer Circle
	outer_radius = pitch_radius+addendum;

	// Dedendum: Radial distance from pitch circle to root diameter
	dedendum = addendum + clearance;

	// Root diameter: Diameter of bottom of tooth spaces.
	root_radius = pitch_radius-dedendum;
	backlash_angle = backlash / pitch_radius * 180 / pi;
	half_thick_angle = (360 / number_of_teeth - backlash_angle) / 4;

    linear_exturde_flat_option(flat=flat, height=rim_thickness, convexity=10, twist=twist)
    gear_shape (
        number_of_teeth,
        pitch_radius = pitch_radius,
        root_radius = root_radius,
        base_radius = base_radius,
        outer_radius = outer_radius,
        half_thick_angle = half_thick_angle,
        involute_facets=involute_facets);
}

simple_gear(number_of_teeth=20, circular_pitch=200, rim_thickness = 2);

Which gives what I want

image

If i use gear(number_of_teeth=20, circular_pitch=200, rim_thickness = 2) then i get an unexpected extra hub

image


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant