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

pitch_radius for beveled gears #68

Open
Equidamoid opened this issue Jul 4, 2020 · 1 comment
Open

pitch_radius for beveled gears #68

Equidamoid opened this issue Jul 4, 2020 · 1 comment
Assignees

Comments

@Equidamoid
Copy link

Is your feature request related to a problem? Please describe.
I want to use beveled gears. How do I space them? pitch_radius doesn't support bevelang argument and without it the gears are too far apart.

Describe the solution you'd like
Extend pitch_radius to support beveled gears. The obvious offset:

diff --git a/involute_gears.scad b/involute_gears.scad
index 66eddfb..45e07a2 100644
--- a/involute_gears.scad
+++ b/involute_gears.scad
@@ -91,8 +91,8 @@ function dedendum(mm_per_tooth=5, clearance=undef) =
 // Arguments:
 //   mm_per_tooth = Distance between teeth around the pitch circle, in mm.
 //   number of teeth = The number of teeth on the gear.
-function pitch_radius(mm_per_tooth=5, number_of_teeth=11) =
-       mm_per_tooth * number_of_teeth / PI / 2;
+function pitch_radius(mm_per_tooth=5, number_of_teeth=11, bevelang=0, thickness=0) =
+       mm_per_tooth * number_of_teeth / PI / 2 - sin(bevelang) * thickness / 2;


 // Function: outer_radius()

seems to produce something that looks reasonable in preview, but I have no clue about the proper way to calculate this offset.

Need someone who knows the gear kung-fu to check the formula.

Describe alternatives you've considered
Don't see reasonable alternatives.

Example Code

union() {
	gear(bevelang = 45, hole_diameter = 6, mm_per_tooth = 3, number_of_teeth = 30, thickness = 3.5000000000);
	translate(v = [
	pitch_radius(bevelang = 45, hole_diameter = 6, mm_per_tooth = 3, number_of_teeth = 30, thickness = 3.5000000000), 0, 
	pitch_radius(bevelang = 45, hole_diameter = 1, mm_per_tooth = 3, number_of_teeth = 10, thickness = 3.5000000000)]) {
		rotate(a = [0, -90, 0]) {
			gear(bevelang = 45, hole_diameter = 1, mm_per_tooth = 3, number_of_teeth = 10, thickness = 3.5000000000);
		}
	}
}
@revarbat
Copy link
Owner

It has become apparent to me recently that beveled gears in BOSL1 are just plain broken. I finally got them fixed in BOSL2, but back porting it to BOSL1 will be a pain.

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

No branches or pull requests

2 participants