{"id":13626976,"url":"https://github.com/meadiode/cq_gears","last_synced_at":"2025-04-16T19:31:05.847Z","repository":{"id":41414111,"uuid":"387592473","full_name":"meadiode/cq_gears","owner":"meadiode","description":"CadQuery based involute gear parametric modelling","archived":false,"fork":false,"pushed_at":"2024-12-27T12:35:47.000Z","size":42488,"stargazers_count":96,"open_issues_count":8,"forks_count":4,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-12-27T13:32:41.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meadiode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-19T20:58:23.000Z","updated_at":"2024-12-27T12:35:52.000Z","dependencies_parsed_at":"2024-12-27T17:45:09.982Z","dependency_job_id":null,"html_url":"https://github.com/meadiode/cq_gears","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meadiode%2Fcq_gears","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meadiode%2Fcq_gears/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meadiode%2Fcq_gears/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meadiode%2Fcq_gears/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meadiode","download_url":"https://codeload.github.com/meadiode/cq_gears/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249268548,"owners_count":21240940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T22:00:28.156Z","updated_at":"2025-04-16T19:31:00.837Z","avatar_url":"https://github.com/meadiode.png","language":"Python","funding_links":[],"categories":["Part Libraries and Part Generators"],"sub_categories":[],"readme":"# CQ_Gears - CadQuery based involute profile gear generator\n![Gears](images/showcase01.png) \n\nWork in progress...\n\nMight be unstable, but somewhat usable.\n\n## v0.51\nCan generate the following types of gears:\n- Spur gear\n- Helical gear\n- Herringbone gear\n- Ring gear (helical/herringbone versions too)\n- Planetary gearsets\n- Straight and helical bevel gears\n- Gear rack\n\n## Installation\nAssuming you already have **CadQuery** environment installed (if not, please follow instructions [here](https://github.com/CadQuery/cadquery/blob/master/README.md) first).\nNote: The latest **developer version** of CadQuery is required. The release version 2.1 **will not work**.\n\nTo install with pip:\n```\n    pip install git+https://github.com/meadiode/cq_gears.git@main\n```\n\nOr, alternatively, clone this repo and run setup.py as follows:\n```\n    python3 setup.py install\n```\n\nCQ_Gears depend on **numpy**, which should be installed automatically if you don't have it.\n\nTo see provided examples (in a form of Jupyter notebooks) you also going to need [Jupyter](https://jupyter.org/) together with [jupyter-cadquery](https://github.com/bernhard-42/jupyter-cadquery/blob/master/README.md).\n\nAlso, some example notebooks use [matplotlib]() and [matplotlib widget(ipympl)](https://github.com/matplotlib/ipympl), you might want to install them as well.\n\n\n## Usage\n\nMinimal example:\n```python\nimport cadquery as cq\nfrom cq_gears import SpurGear\n\n# Create a gear object with the SpurGear class\nspur_gear = SpurGear(module=1.0, teeth_number=19, width=5.0, bore_d=5.0)\n\n# Build this gear using the gear function from cq.Workplane\nwp = cq.Workplane('XY').gear(spur_gear)\n\nshow(wp)\n```\nThe result should look like this:\n\n![SpurGear](images/spur_gear01.png)\n\nNote that instantiating **SpurGear** (or any other class from **cq_gears**) will not create a solid body right away. Creating object just pre-calculates some important parameters and curves that later will be used during build phase.\n\nTo actually build the solid object, you shall pass the created gear object to the **gear** or **addGear** functions from cq.Workplane\n\nAnother example:\n```python\nspur_gear = SpurGear(module=1.0, teeth_number=13, width=5.0, bore_d=5.0)\n\nwp = (cq.Workplane('XY')\n        # Pushing an array of 4 points with spacing equal to the gear's pitch diameter \n      .rarray(xSpacing=spur_gear.r0 * 2.0,\n              ySpacing=1.0, xCount=4, yCount=1, center=False)\n        # Create 4 meshing gears\n      .gear(spur_gear)\n      \n      .moveTo(spur_gear.r0 * 2 * 4, 0.0)\n        # Create an additional gear with the same profile but with different\n        # bore diameter and hub\n      .addGear(spur_gear, bore_d=3.0, hub_d=8.0, hub_length=4.0))\n      \nshow(wp)\n```\nThe result:\n\n![spur gear train](images/spur_gear02.png)\n\nHere multiple copies of a gear placed at each point on the stack.\nNote that you can use the spur_gear object to reference pre-calculated dimensions such as pitch-radius.\nAlso note that build parameters (such as *bore_d*, *hub_d*, *hub_length* etc.) could be passed either to the SpurGear constructor, or to the gear and add_gear functions.\n\nCheck out other examples from the examples directory:\n\n![ex1](images/bevel_gears01.png)\n\n![ex2](images/planetary01.png)\n\n![ex3](images/planetary02.png)\n\nFor research/educational purposes there is also a couple of notebooks that use matplotlib to plot various gear profiles:\n\n![ex1](images/pressure_angle_plot.png)\n\n![ex2](images/plot_bevel_gear.png)\n\n![ex3](images/ring_gear_plot.png)\n\n## Credits\nThis project is inspired by [Gears Library for OpenSCAD](https://www.thingiverse.com/thing:1604369) by Joerg Janssen(thingiverse@janssen86). Some of the math is also borrowed from there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeadiode%2Fcq_gears","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeadiode%2Fcq_gears","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeadiode%2Fcq_gears/lists"}