<commit_before># mdsSpurGear

Simple OpenSCAD script for parametric spur gear generation.  

Based on Boston Gear design rules https://www.bostongear.com/pdf/gear_theory.pdf

The script has several options including:

1. Number of teeth
2. Diametral pitch (*default is __24__*)
3. Pressure angle (*default is __20__*)
4. Shaft diameter
5. Gear thickness
6. Major holes (*default is __on__*)
7. Minor holes (*default is __on__*)
8. Number of holes (*default is __4__*)
9. Hub thickness (*default is __no hub__*)
10. Smooth teeth (*default is __off__*)

Images of Example gears:

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Gear24.png "24 tooth gear")

**24 tooth gear, 24 diametral pitch, major holes enabled**

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Gear24minor.png "24 tooth gear")

**24 tooth gear, 24 diametral pitch, major and minor holes enabled**

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Gear48.png "48 tooth gear")

**48 tooth gear, 24 diametral pitch, major and minor holes enabled**

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Stacked Gear.png "Stacked gear")

**10 tooth gear stacked on a 48 tooth gear, 24 diametral pitch, major and minor holes enabled**

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Gear 2D.png "2D Gear")

**2D Projection of a 24 tooth gear, 24 diametral pitch, major and minor holes enabled**

## Release Notes

1. If you use a hub thickness ratio of greater than 1.0 you will need to consider printing with supports.
2. The new *experimental* **smooth_teeth** option generates a bezier curve rather than a simple polygon for the tooth profile
3. Unless you need to change the diametral pitch to match a mating gear the default option is a good choice.<commit_msg>Revised.<commit_after># mdsSpurGear

Simple OpenSCAD script for parametric spur gear generation.  

Based on Boston Gear design rules https://www.bostongear.com/pdf/gear_theory.pdf

The script has several options including:

1. Number of teeth
2. Diametral pitch (*default is __24__*)
3. Pressure angle (*default is __20__*)
4. Shaft diameter (*default is __0.125__*)
5. Gear thickness (*default is __0.125__*)
6. Major holes (*default is __on__*)
7. Minor holes (*default is __on__*)
8. Number of holes (*default is __4__*)
9. Hub thickness ratio (*default is __1.0__ which means __no hub__*)
10. Smooth teeth (Experimental so *default is __off__*)

##Example images of various gears

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Gear24.png "24 tooth gear")

**24 tooth gear, 24 diametral pitch, major holes enabled**

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Gear24minor.png "24 tooth gear")

**24 tooth gear, 24 diametral pitch, major and minor holes enabled**

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Gear48.png "48 tooth gear")

**48 tooth gear, 24 diametral pitch, major and minor holes enabled**

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Stacked Gear.png "Stacked gear")

**10 tooth gear stacked on a 48 tooth gear, 24 diametral pitch, major and minor holes enabled**

![alt text](https://github.com/mseminatore/mdsSpurGear/blob/master/Examples/Gear 2D.png "2D Gear")

**2D Projection of a 24 tooth gear, 24 diametral pitch, major and minor holes enabled**

## Release Notes

1. If you use a hub thickness ratio of greater than 1.0 you __will__ need to consider printing with supports.
2. The new *experimental* **smooth_teeth** option generates a bezier curve rather than a simple polygon for the tooth profile.
3. Unless you need to change the **diametral_pitch** to match a mating gear the default option is a good choice.
4. The tooth thickness seems to be incorrect.  It appears to be smaller by a few thousandths, investigating.
{'fraction_non_alphanumeric': 0.1004566210045662, 'fraction_numerical': 0.03221714865550482, 'mean_word_length': 4.7311046511627906, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '696148', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1198, 'n_words': 491}