fabmetheus_utilities.geometry.creation.gear ($Date: 2008/02/05 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/fabmetheus_utilities/geometry/creation/gear.py

Previous / Next / Contents

`
The gear script can generate a spur gear couple, a bevel gear couple, a ring gear couple and a rack & pinion couple.
A helix pattern can be added to each gear type. All the gear types have a clearance and all the teeth can be beveled. A keyway, shaft and lightening holes can be added to all the round gears, and rack holes can be added to the rack. The script can output solid gears or only the gear profiles. Both gears of the couple can be generated or just one.
The couple has a pinion gear and a complement.
Examples
Bevel
Collar
Default Gear
Keyway
Rack
Rack Hole
Ring
Shaft
Shaft Top
Spur Helix
Spur Herringbone
Spur Parabolic
Spur Profile
Parameters
Center Distance
Clearance Couplet
Clearance Over Wavelength
Clearance
Collar Width Couplet
Collar Width Over Radius
Collar Width
Complement Collar Thickness Couplet
Complement Collar Thickness Over Thickness
Complement Collar Thickness
Creation Type
Both
Complement
Pinion
Gear Hole Paths
Helix Angle
Helix Path
Helix Type
Basic
Herringbone
Parabolic
Keyway Radius Couplet
Keyway Radius Over Radius
Keyway Radius
Lightening Hole Margin Couplet
Lightening Hole Margin Over Rim Width
Lightening Hole Margin
Lightening Hole Minimum Radius
Move Type
None
Mesh
Separate
Vertical
Operating Angle
Pinion Collar Thickness Over Thickness Couplet
Pinion Collar Thickness Over Thickness
Pinion Collar Thickness
Pitch Radius
Plate Clearance Over Thickness Couplet
Plate Clearance Over Thickness
Plate Clearance
Plate Thickness Over Thickness Couplet
Plate Thickness Over Thickness
Plate Thickness
Pressure Angle
Profile Surfaces
Rack Hole Radius Over Width Couplet
Rack Hole Radius Over Width
Rack Hole Radius
Rack Hole Below Over Width Couplet
Rack Hole Below Over Width
Rack Hole Below
Rack Hole Step Over Width Couplet
Rack Hole Step Over Width
Rack Hole Step
Rack Length Over Radius Couplet
Rack Length Over Radius
Rack Length
Rack Width Over Thickness Couplet
Rack Width Over Thickness
Rack Width
Rim Width Over Thickness Couplet
Rim Width Over Thickness
Rim Width
Root Bevel Over Clearance Couplet
Root Bevel Over Clearance
Root Bevel
Shaft Depth Bottom Couplet
Shaft Depth Bottom Over Radius
Shaft Depth Bottom
Shaft Depth Top Couplet
Shaft Depth Top Over Radius
Shaft Depth Top
Shaft Path
Shaft Radius Over Pitch Radius Couplet
Shaft Radius Over Pitch Radius
Shaft Radius
Shaft Sides
Teeth Pinion
Teeth Complement
Thickness
Tip Bevel Over Clearance Couplet
Tip Bevel Over Clearance
Tip Bevel
Tooth Width Multiplier
`

## Examples

The link text includes the distinguishing parameters. Each svg page was generated from an xml page of the same root name using carve. For example, default_gear.svg was generated by clicking 'Carve' on the carve tool panel and choosing default_gear.xml in the file chooser.
Each generated svg file has the xml fabmetheus element without comments towards the end of the file. To see it, open the svg file in a text editor and search for 'fabmetheus' If you copy that into a new text document, add the line '<?xml version='1.0' ?>' at the beginning and then give it a file name with the extension '.xml', you could then generate another svg file using carve.

### Bevel

Bevel gear couple.
gear operatingAngle=90

### Collar

Spur gear couple and each gear has a collar.
gear complementCollarThicknessOverThickness='1' pinionCollarThicknessOverThickness='1' shaftRadius='5'

### Default Gear

Default spur gear with no parameters.
gear

### Keyway

Spur gear couple and each gear has a collar and defined keyway.
gear complementCollarThicknessOverThickness='1' keywayRadius='2' pinionCollarThicknessOverThickness='1' shaftRadius='5'

### Rack

Rack and pinion couple.
gear teethComplement='0'

### Rack Hole

Rack and pinion couple, with holes in the rack.
gear rackHoleRadiusOverWidth='0.2' rackWidthOverThickness='2' teethComplement='0'

### Ring

Pinion and ring gear.
gear teethComplement='-23'

### Shaft

Spur gear couple and each gear has a square shaft hole.
gear shaftRadius='5'

### Shaft Top

Spur gear couple and each gear has a round shaft hole, truncated on top.
gear shaftRadius='5' shaftSides='13' shaftDepthTop='2'

### Spur Helix

Spur gear couple with the gear teeth following a helix path.
gear helixAngle='45'

### Spur Herringbone

Spur gear couple with the gear teeth following a herringbone path.
gear helixAngle='45' helixType='herringbone'

### Spur Parabolic

Spur gear couple with the gear teeth following a parabolic path.
gear helixAngle='45' helixType='parabolic'

### Spur Profile

Spur gear couple profile. Since this is just a horizontal path, it can not be sliced, so the path is then extruded to create a solid which can be sliced and viewed.
gear id='spurProfile' thickness='0' | extrude target='=document.getElementByID(spurProfile)

## Parameters

### Center Distance

Default is such that the pitch radius works out to twenty.
Defines the distance between the gear centers.

### Clearance Couplet

#### Clearance Over Wavelength

Default is 0.1.
Defines the ratio of the clearance over the wavelength of the gear profile. The wavelength is the arc distance between the gear teeth.

#### Clearance

Default is the 'Clearance Over Wavelength' times the wavelength.
Defines the clearance between the gear tooth and the other gear of the couple. If the clearance is zero, the outside of the gear tooth will touch the other gear. If the clearance is too high, the gear teeth will be long and weak.

### Collar Width Couplet

#### Collar Width Over Radius

Default is one.
Defines the ratio of the collar width over the shaft radius.

#### Collar Width

Default is the 'Collar Width Over Radius' times the shaft radius.
Defines the collar width.

### Complement Collar Thickness Couplet

#### Complement Collar Thickness Over Thickness

Default is zero.
Defines the ratio of the complement collar thickness over the tooth thickness.

#### Complement Collar Thickness

Default is the 'Complement Collar Thickness Over Thickness' times the tooth thickness.
Defines the complement collar thickness. If the complement collar thickness is zero, there will not be a collar on the complement gear.

### Creation Type

Default is 'both'.

#### Both

When selected, the pinion and complement will be generated.

#### Complement

When selected, only the complement gear or rack will be generated.

#### Pinion

When selected, only the pinion will be generated.

### Gear Hole Paths

Default is empty.
Defines the centers of the gear holes. If the gear hole paths parameter is the default empty, then the centers of the gear holes will be generated from other parameters.

### Helix Angle

Default is zero.

### Helix Path

Default is empty.
Defines the helix path of the gear teeth. If the helix path is the default empty, then the helix will be generated from the helix angle and helix type.

### Helix Type

Default is 'basic'.

#### Basic

When selected, the helix will be basic.

#### Herringbone

When selected, the helix will have a herringbone pattern.

#### Parabolic

When selected, the helix will have a parabolic pattern.

### Keyway Radius Couplet

#### Keyway Radius Over Radius

Default is half.
Defines the ratio of the keyway radius over the shaft radius.

#### Keyway Radius

Default is the 'Keyway Radius Over Radius' times the shaft radius.
Defines the keyway radius. If the keyway radius is zero, there will not be a keyway on the collar.

### Lightening Hole Margin Couplet

#### Lightening Hole Margin Over Rim Width

Default is one.
Defines the ratio of the lightening hole margin over the rim width.

#### Lightening Hole Margin

Default is the 'Lightening Hole Margin Over Rim Width' times the rim width.
Defines the minimum margin between lightening holes.

### Lightening Hole Minimum Radius

Default is one.
Defines the minimum radius of the lightening holes.

### Move Type

Default is 'separate'.

#### None

When selected, the gears will be not be moved and will therefore overlap. Afterwards the write plugin could be used to write each gear to a different file, so they can be fabricated in separate operations.

#### Mesh

When selected, the gears will be separated horizontally so that they just mesh. This is useful to test if the gears mesh properly.

#### Separate

When selected, the gears will be separated horizontally with a gap between them.

#### Vertical

When selected, the gears will be separated vertically.

### Operating Angle

Default is 180 degrees.
Defines the operating angle between the gear axes. If the operating angle is not 180 degrees, a bevel gear couple will be generated.

### Pinion Collar Thickness Over Thickness Couplet

#### Pinion Collar Thickness Over Thickness

Default is zero.
Defines the ratio of the pinion collar thickness over the tooth thickness.

#### Pinion Collar Thickness

Default is the 'Pinion Collar Thickness Over Thickness' times the tooth thickness.
Defines the pinion collar thickness. If the pinion collar thickness is zero, there will not be a collar on the pinion gear.

### Pitch Radius

Default is twenty if the pitch radius has not been set. If the center distance is set, the default pitch radius is the center distance times the number of pinion teeth divided by the total number of gear teeth.
Defines the pinion pitch radius.

### Plate Clearance Over Thickness Couplet

#### Plate Clearance Over Thickness

Default is 0.2.
Defines the ratio of the plate clearance over the plate thickness.

#### Plate Clearance

Default is the 'Plate Clearance Over Thickness' times the plate thickness.
Defines the clearance between the pinoin and the plate of the ring gear. If the clearance is zero, they will touch.

### Plate Thickness Over Thickness Couplet

#### Plate Thickness Over Thickness

Default is half.
Defines the ratio of the plate thickness over the tooth thickness.

#### Plate Thickness

Default is the 'Plate Thickness Over Thickness' times the tooth thickness.
Defines the thickness of the plate of the ring gear.

### Pressure Angle

Default is twenty degrees.
Defines the pressure angle of the gear couple.

### Profile Surfaces

Default is eleven.
Defines the number of profile surfaces.

### Rack Hole Radius Over Width Couplet

#### Rack Hole Radius Over Width

Default is zero.
Defines the ratio of the rack hole radius over the rack width.

#### Rack Hole Radius

Default is the 'Rack Hole Radius Over Width' times the rack width.
Defines the radius of the rack holes. If the rack hole radius is zero, there won't be any rack holes.

### Rack Hole Below Over Width Couplet

#### Rack Hole Below Over Width

Default is 0.6.
Defines the ratio of the distance below the pitch of the rack holes over the rack width.

#### Rack Hole Below

Default is the 'Rack Hole Below Over Width' times the rack width.
Defines the the distance below the pitch of the rack holes.

### Rack Hole Step Over Width Couplet

#### Rack Hole Step Over Width

Default is one.
Defines the ratio of the rack hole step over the rack width.

#### Rack Hole Step

Default is the 'Rack Hole Step Over Width' times the rack width.
Defines the horizontal step distance between the rack holes.

### Rack Length Over Radius Couplet

#### Rack Length Over Radius

Default is two times pi.
Defines the ratio of the rack length over the pitch radius.

#### Rack Length

Default is the 'Rack Length Over Radius' times the pitch radius.
Defines the rack length.

### Rack Width Over Thickness Couplet

#### Rack Width Over Thickness

Default is one.
Defines the ratio of the rack width over the tooth thickness.

#### Rack Width

Default is the 'Rack Width Over Thickness' times the tooth thickness.
Defines the rack width.

### Rim Width Over Thickness Couplet

#### Rim Width Over Thickness

Default is 0.2.
Defines the ratio of the rim width over the pitch radius.

#### Rim Width

Default is the 'Rim Width Over Thickness' times the pitch radius.
Defines the rim width of the gear.

### Root Bevel Over Clearance Couplet

#### Root Bevel Over Clearance

Default is half.
Defines the ratio of the root bevel over the clearance.

#### Root Bevel

Default is the 'Root Bevel Over Clearance' times the clearance.
Defines the bevel at the root of the gear tooth.

### Shaft Depth Bottom Couplet

#### Shaft Depth Bottom Over Radius

Default is zero.
Defines the ratio of the bottom shaft depth over the shaft radius.

#### Shaft Depth Bottom

Default is the 'Shaft Depth Bottom Over Radius' times the shaft radius.
Defines the bottom shaft depth.

### Shaft Depth Top Couplet

#### Shaft Depth Top Over Radius

Default is zero.
Defines the ratio of the top shaft depth over the shaft radius.

#### Shaft Depth Top

Default is the 'Shaft Depth Top Over Radius' times the shaft radius.
Defines the top shaft depth.

### Shaft Path

Default is empty.
Defines the path of the shaft hole. If the shaft path is the default empty, then the shaft path will be generated from the shaft depth bottom, shaft depth top, shaft radius and shaft sides.

### Shaft Radius Over Pitch Radius Couplet

#### Shaft Radius Over Pitch Radius

Default is zero.
Defines the ratio of the shaft radius over the pitch radius.

#### Shaft Radius

Default is the 'Shaft Radius Over Pitch Radius' times the pitch radius.
Defines the shaft radius.

### Shaft Sides

Default is four.
Defines the number of shaft sides.

### Teeth Pinion

Default is seven.
Defines the number of teeth in the pinion.

### Teeth Complement

Default is seventeen.
Defines the number of teeth in the complement of the gear couple. If the number of teeth is positive, the gear couple will be a spur or bevel type. If the number of teeth is zero, the gear couple will be a rack and pinion. If the number of teeth is negative, the gear couple will be a spur and ring.

### Thickness

Default is ten.
Defines the tooth thickness.

### Tip Bevel Over Clearance Couplet

#### Tip Bevel Over Clearance

Default is 0.1.
Defines the ratio of the tip bevel over the clearance.

#### Tip Bevel

Default is the 'Tip Bevel Over Clearance' times the clearance.
Defines the bevel at the tip of the gear tooth.

### Tooth Width Multiplier

Default is 0.99999.
Defines the amount the width of the tooth will multiplied. If when the gears are produced, they mesh too tightly, you can reduce the tooth width multiplier so that they mesh with reasonable tightness.

Previous / Next / Contents

Modules
`` |  |
__init__ fabmetheus_utilities.euclidean fabmetheus_utilities.geometry.geometry_utilities.evaluate | fabmetheus_utilities.geometry.creation.extrude fabmetheus_utilities.geometry.creation.lineation math | fabmetheus_utilities.geometry.manipulation_matrix.matrix fabmetheus_utilities.geometry.geometry_tools.path fabmetheus_utilities.geometry.creation.shaft | fabmetheus_utilities.geometry.creation.solid fabmetheus_utilities.geometry.creation.teardrop fabmetheus_utilities.geometry.solids.triangle_mesh

Classes
`` |  | GearDerivation
class GearDerivation
`` | `Class to hold gear variables.`
| Methods defined here: __init__(self, xmlElement) `Set defaults.` __repr__(self) `Get the string representation of this GearDerivation.`

Functions
`` |  | addBevelGear(derivation, extrudeDerivation, pitchRadius, positives, teeth, vector3GearProfile) `Get extrude output for a cylinder gear.` addBottomLoop(deltaZ, loops) `Add bottom loop to loops.` addCollarShaft(collarThickness, derivation, negatives, positives, xmlElement) `Add collar.` addCollarShaftSetDerivation(collarDerivation, collarThickness, derivation, negatives, positives, xmlElement) `Add collar and shaft.` addLighteningHoles(derivation, gearHolePaths, negatives, pitchRadius, positives) `Add lightening holes.` addRackHole(derivation, vector3RackProfiles, x, xmlElement) `Add rack hole to vector3RackProfiles.` addRackHoles(derivation, vector3RackProfiles, xmlElement) `Add rack holes to vector3RackProfiles.` addShaft(derivation, negatives, positives) `Add shaft.` getAxialMargin(circleRadius, numberOfSides, polygonRadius) `Get axial margin.` getBevelPath(begin, bevel, center, end) `Get bevel path.` getGearPaths(derivation, pitchRadius, teeth, toothProfile) `Get gear paths.` getGearProfileAnnulus(derivation, pitchRadius, teeth, toothProfile) `Get gear profile for an annulus gear.` getGearProfileCylinder(teeth, toothProfile) `Get gear profile for a cylinder gear.` getGearProfileRack(derivation, toothProfile) `Get gear profile for rack.` getGeometryOutput(derivation, xmlElement) `Get vector3 vertexes from attribute dictionary.` getGeometryOutputByArguments(arguments, xmlElement) `Get vector3 vertexes from attribute dictionary by arguments.` getHalfwave(pitchRadius, teeth) `Get tooth halfwave.` getHelixComplexPath(derivation, xmlElement) `Set gear helix path.` getLiftedOutput(derivation, geometryOutput, xmlElement) `Get extrude output for a rack.` getLighteningHoles(derivation, gearHolePaths, pitchRadius) `Get cutout circles.` getOutputCylinder(collarThickness, derivation, gearHolePaths, pitchRadius, teeth, twist, vector3GearProfile, xmlElement) `Get extrude output for a cylinder gear.` getOutputRack(derivation, vector3GearProfile, xmlElement) `Get extrude output for a rack.` getPathOutput(creationFirst, derivation, translation, vector3ComplementPaths, vector3PinionProfile, xmlElement) `Get gear path output.` getToothProfile(derivation, pitchRadius, teeth) `Get profile for one tooth.` getToothProfileAnnulus(derivation, pitchRadius, teeth) `Get profile for one tooth of an annulus.` getToothProfileCylinder(derivation, pitchRadius, teeth) `Get profile for one tooth of a cylindrical gear.` getToothProfileCylinderByProfile(derivation, pitchRadius, teeth, toothProfileHalf) `Get profile for one tooth of a cylindrical gear.` getToothProfileHalfCylinder(derivation, pitchRadius) `Get profile for half of a one tooth of a cylindrical gear.` getToothProfileRack(derivation) `Get profile for one rack tooth.` getWidthMultipliedPath(path, widthMultiplier) `Get width multiplied path.` processXMLElement(xmlElement) `Process the xml element.`

Data
`` |  | __author__ = 'Enrique Perez (perez_enrique@yahoo.com)' __credits__ = 'Art of Illusion <http://www.artofillusion.org/>' __date__ = '$Date: 2008/02/05 $' __license__ = 'GPL 3.0' absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

Author
`` |  | Enrique Perez (perez_enrique@yahoo.com)

Credits
`` |  | Art of Illusion <http://www.artofillusion.org/>