Giter Club home page Giter Club logo

gear_generator's Introduction

========================================================
gear_generator: a simple interactive javascript gear generator
(c) James Gregson 2016
[email protected]

License
======================================================== 
Use for whatever you want, at your own risk. Bug reports and feature requests are welcome.

Description 
======================================================== 
These files implement a simple involute spur gear generator in javascript with a html interface. The code is based on two simple javascript libraries: gears.js and graphics.js which handle generating the gear profiles and drawing the profiles to the canvas respectively.  The profiles can be output in SVG, DXF or comma-separated values (CSV) for inclusion in graphics, CAD or other applications. DXF export was guided by Paul Bourke's minimal DXF example (http://paulbourke.net/dataformats/dxf/min3d.html)

The generated profiles are checked for self-intersection with the tooth sector. Intersections here indicate profile self-intersection the top-land and/or bottom-land. If such intersections are detected, the profiles are chopped to ensure a simple polygon output. I have no idea if such profiles will actually mesh correctly but they are at least not valid geometry.

The module is built using the python-based Jinja template system to incorporate gears.js and graphics.js into the template spur_gear_ui.html in order to produce gear_generator.html, which has no external dependencies except JQuery.  This allows the module to be embedded into a <div> element using AJAX without encountering issues related to relative paths. If changes are needed, gear_generator.html can be rebuilt by running the build.py script (provided python and Jinja are installed). You will probably have to tweak the styling of the various elements

gear_generator's People

Contributors

jamesgregson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.