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

refactoring for gear trains #8

Open
Neon22 opened this issue Mar 23, 2014 · 4 comments
Open

refactoring for gear trains #8

Neon22 opened this issue Mar 23, 2014 · 4 comments

Comments

@Neon22
Copy link
Contributor

Neon22 commented Mar 23, 2014

I had an idea. When we've got it working. How about refactoring it so effect() calls a routine to print a gear with given parameters.

If we did that then we could have the UI define a number of gears and do a gear train. One tab for each gear (another tab for the common settings). We can then also annotate the ratios of driven to other gears and show the simple spur gear calculations.

The user could then choose to cut each out and mount then in any way (stacked or chained edge to edge, etc) but because we did the calcs - they would know reduction ratios etc.

I'm thinking something like seen in this:
http://uqu.edu.sa/files2/tiny_mce/plugins/filemanager/files/4280336/machines/GEARS%20Lec-12.pdf

Where the user defines for each tab whether gear is locked to previous tab or meshes with previous. First tab is driver.
We'd make (4 or 6) tabs and let user use only those they needed (probably just first two for classic pinion/spur).

Visually - layout each gear non meshing (so they can be printed,laser cut, whatever..) but maybe draw a simple representation of stacked or meshed layout with just circles as a layout guide.

What do you think of this idea.

@Neon22
Copy link
Contributor Author

Neon22 commented Mar 23, 2014

Here's an instructable showing an end result. IMHO it would be good to enable this kind of end result.
http://www.instructables.com/id/Laser-Cut-Display-Gears/

@Neon22
Copy link
Contributor Author

Neon22 commented Mar 23, 2014

The internal function might look like this:

# add to center hole a D for a key (width, height defined on pg 737
def generate_gear_path(teeth_count, module, pressure_angle, mount_hole_dia,
                       clearance=0, unit_factor=1,
                       mount_radius=0, spoke_count=0, spoke_border=0,
                       accuracy=20, draw_guides=False,
                       ):
        """ returns a path (for svg) of the gear where:
            - unit_factor is precomputed based on document and dialog dimension
            - spoke_count equivalent to hole_count
            - draw_guides shows both centercross and pitch circle.
            Missing parameters:
            - key - an (x,y) tuple of box shape to cut out of mount hole
            - spoke_rounding - for smoother internal hole corners
            - 
        """
        # Calls a function to calculate pitch circle (so can be called to show layout of simplified gears)
        # - draw pitch circle using draw_SVG_circle()
        pass

def generate_rack_path(teeth_count, module, pressure_angle, tab_length
                       clearance=0, unit_factor=1,
                       accuracy=20, draw_guides=False
                      ):
        """ Just draw the rack """
        pass

@Neon22
Copy link
Contributor Author

Neon22 commented Mar 24, 2014

I've refactored the rack out - I will be stopping here until you've fixed the scale issues and module bugs I may have added. :)

@Neon22
Copy link
Contributor Author

Neon22 commented Apr 6, 2014

Its clear that when undercutting occurs on low toth count gears the balance of the fix can be profile shifted to either gear in the couple.

This suggests we make the current plugin allow manual mod of the profile shift.
It also suggests we calculate this in a new plgin for gear trains so that this can be shared amongst gears in the chain.

New gear-chain plugin only when this one is all done :)

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