Skip to content

About

Wave gear with intermediate rolling elements (VPTK/BWG) sizing calculator: enter 2 of 4 params (ratio, diameter, torque) and get full geometry + DXF export. Python, NiceGUI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

βš™οΈ VPTK β€” Wave Gear with Rolling Elements Calculator

Compact-size design calculator for wave gears with intermediate rolling elements (Π’ΠŸΠ’Πš / BWG). Enter any two parameters β€” get the full geometry, torques and a ready-to-use DXF.

Python NiceGUI NumPy SciPy Matplotlib ezdxf Windows License PRs Welcome Donate XMR


English β€’ Русский

Features β€’ Why this one β€’ Quick Start β€’ Usage β€’ Methodology β€’ DXF export β€’ Architecture β€’ Contributing β€’ Support


πŸš€ Features

Capability Description
Any-two-of-four input Fill exactly two of: gear ratio q, outer diameter D, output torque M_out, input torque M_in β€” the rest is solved automatically
Load-based sizing Rolling-element diameter d_RE is derived from the torque, shear strength of the cage [Ο„], row non-uniformity k_N and contact type
Balls / Rollers Rollers carry 2Γ— the torque of balls at the same diameter (β‰ˆ 21 % smaller diameter for the same torque)
GOST rounding Rounds d_RE up to the nearest standard size (balls β€” GOST 3722, rollers β€” GOST 22696) and recomputes everything
Efficiency-aware M_in = M_out / (qΒ·Ξ·), default Ξ· = 0.85, editable, with reference values in a tooltip
Live geometry plot Rigid-wheel profile, cage, eccentric, rolling elements and outline β€” each toggled independently
DXF export (mm) Correct $INSUNITS = 4, so the drawing opens at real size in any CAD
PNG export One-click plot export
Calculation log Every run is logged; export as TXT / JSON / CSV
RU / EN interface Switch language on the fly, entered values are kept
Design sanity check Warns when the outer radius is below the minimum allowed by the geometry
Fully offline Local server bound to 127.0.0.1 only β€” nothing leaves your machine
Standalone .exe Built by GitHub Actions, no Python needed on the user's PC

Project Boundaries

  • βœ… Sizing and geometry of a single-row, single-wave Π’ΠŸΠ’Πš (n = 1, u = 1)
  • βœ… Based on a published methodology (Podshibnev, 2022)
  • ❌ Not a FEM / contact-stress solver β€” it gives a design starting point, not a certification

πŸ†š Why this project

The idea of a geometry calculator for ball wave gears was inspired by TrashRobotics/BallsWaveGearingGenerator (YouTube channel). Related community projects exist as well: Jkl88/BallsWaveGearingGenerator (a PyQt6 front-end built on top of the TrashRobotics script that generates a profile DXF) and hadzaki/wave-gear (a tkinter profile visualiser with self-intersection detection).

Those tools work from geometry β€” you already have to know the ball size, eccentricity and number of cavities. VPTK goes one step earlier: you start from the requirements (ratio, envelope, torque) and get the geometry out.

VPTK (this project) hadzaki/wave-gear
Input Any 2 of q, D, M_out, M_in Generator Ø, ball Ø, eccentricity, cavities, points
Sizing from load (torque β†’ d_RE) βœ… ❌ (stress calc listed as planned)
Material strength [Ο„], k_N, Ξ· βœ… ❌ (efficiency listed as planned)
Balls and rollers βœ… not mentioned
GOST standard-size rounding βœ… (up, then full recalculation) ❌
Output D, L, W, z_sh, z_g, M_in βœ… profile only
Plot layers profile, cage, eccentric, elements, outline profile + zoom
Self-intersection check ⚠ outer-radius warning only βœ…
DXF ezdxf, units explicitly mm, all elements dxfwrite
UI NiceGUI (local web), RU / EN tkinter
Calculation log (TXT/JSON/CSV) βœ… ❌
Distribution CI-built .exe artifact .exe committed to the repo
Source of formulas Podshibnev 2022, referenced per formula generic

In short: if you already know your profile and want to inspect it for defects β€” use the visualisers above. If you need to choose the gear β€” what ball diameter, what outer diameter, what torque it holds β€” use VPTK.


⚑ Quick Start

Option A: Windows .exe (no Python needed)

  1. Open Actions β†’ Build Windows EXE (or Releases) and download the VPTK-windows artifact.
  2. Run GeometryCalculationVPTK-v<version>-<sha>.exe.
  3. A console window opens (it shows the log and keeps the server alive) and your default browser opens the interface.

πŸ’‘ Close the program with the Exit button in the UI or by closing the console window / Ctrl+C. Closing only the browser tab does not stop the server.

Option B: From source

Requires Python 3.14+ and Poetry.

git clone https://github.com/Zigizmund1996/GeometryCalculationVPTK.git
cd GeometryCalculationVPTK
poetry install --no-root
poetry run python main.py

The app picks the first free port starting from 8000 and opens http://127.0.0.1:<port> automatically.

Option C: Build the .exe yourself

poetry install --no-root --with dev
poetry run nicegui-pack --onefile --name GeometryCalculationVPTK main.py

nicegui-pack is a PyInstaller wrapper that bundles NiceGUI's static files β€” without it the packaged app answers Internal Server Error. --windowed is intentionally not used: the console shows the log.

If something goes wrong in a frozen build, the app prints its environment (Python, library versions, presence of NiceGUI templates) and writes errors to the console (or to vptk.log when no console is available).


πŸ–₯️ Usage

  1. Fill exactly two of the four fields: q, D, M_out, M_in.

    Pair Result
    q + M_out d_RE, D, L, W
    q + D M_out
    D + M_out q (solved numerically on q ∈ [4.1; 100])
    q + M_in M_out through Ξ·
    M_in + M_out q from the torque ratio; q is rounded to an integer and M_in is recomputed (the deviation is shown)
  2. Choose Balls or Rollers, tick Round to GOST if needed.

  3. Adjust Ο„, k_N, Ξ· (or keep defaults: 150 MPa, 0.56, 0.85).

  4. Pick which elements to draw and press Save DXF / Save PNG.

  5. Save the calculation log as TXT / JSON / CSV if you need a record.

Inputs

Parameter Symbol Default Meaning
Shear stress of the cage [Ο„] 150 MPa Higher [Ο„] β†’ smaller rolling element, higher ratio. Tooltip lists typical steels
Non-uniformity in a row k_N 0.56 Depends on q: 0.50…0.56 for q = 10…30 (Podshibnev, Table 1.1); 0.6 is suggested for rough engineering estimates
Efficiency Ξ· 0.85 Experimental maximum 0.92, calculated 0.95 (Stepanov 2009); typical 0.80…0.90. Real Ξ· falls at low torque (see note below)
Rolling-element type k roller Ball k = 1, roller k = 2
GOST rounding β€” on Always rounds up to keep strength margin

Simplifications

  • One row (n = 1, k_H = 1) and one wave (u = 1) are fixed in this version β€” the simplest and most common configuration. The formulas themselves support n > 1.
  • Stepanov (2009) shows the smallest outer diameter at moderate ratios; Podshibnev cites q β‰ˆ 8…15 for minimum D. Torque ripple decreases as q grows, so very low ratios are not always the best choice.
  • Efficiency is a constant. Stepanov's measurements give Ξ·(M) = 0.92Β·(1 βˆ’ e^(βˆ’0.57Β·M)) (M in NΒ·m), i.e. Ξ· β‰ˆ 0.92 from roughly 10–20 NΒ·m upwards but much lower at small torque β€” treat results for tiny torques with care.

πŸ“ Methodology

Formulas follow V. A. Podshibnev, "Methodology of designing an actuator based on a wave gear with rolling elements with a given vibration-acceleration level" (2022).

Material coefficient (eq. 3.14, values for steels β€” Table 3.3):

$$k_M = \frac{33.8\cdot 10^{3}}{[\tau]}$$

Rolling-element diameter (Podshibnev, eq. 3.15):

$$d_{RE} = \sqrt[3]{\frac{k_M \cdot M_{out} \cdot \sin!\big(\pi/(q-1)\big)}{k_N \cdot k \cdot k_H \cdot n \cdot (q-1)}}$$

Overall dimensions (eq. 3.16–3.18):

$$D = \left(\frac{2.06}{\sin(\pi/q)} + 1.8\right) d_{RE},\qquad L = (1.2,n + 1.8),d_{RE},\qquad W = \frac{\pi}{4}D^{2}L$$

Torques and counts:

$$M_{in} = \frac{M_{out}}{q,\eta},\qquad z_{sh} = \lfloor q \rfloor,\qquad z_g = z_{sh} + 1$$

Minimum outer radius of the rigid wheel (used for the warning):

$$R_{out,min} = \frac{1.03, d_{RE}}{\sin(\pi/z_g)} + 0.4, d_{RE}$$

The R_out,min condition keeps the chord of a cavity at least 2.06Β·d_RE; if it is violated the rigid-wheel profile gets cusps ("whiskers") that cannot be machined, and some elements lose contact (Stepanov 2009, p. 9).

Profile construction uses eccentricity e = 0.2Β·d_RE, cage thickness h_c = 2.2Β·e and generator radius r_d = R_out βˆ’ 2e βˆ’ d_RE.

GOST rounding

  1. Compute the exact d_RE.
  2. Find the nearest larger size in the standard series (balls β€” GOST 3722, rollers β€” GOST 22696).
  3. Recalculate D, L, W, M_out, M_in for the rounded size.

Rounding down would make the element smaller than required; rounding up keeps a strength margin. If d_RE exceeds the largest standard size, a clear error is shown.

Balls vs rollers

Balls (k = 1) Rollers (k = 2)
Contact Point Line
Torque at same d_RE Base 2Γ— more
d_RE at same torque Base β‰ˆ 21 % smaller
Wear Higher (spalling) Lower
Recommendation Light-duty Power drives

Sources: Stepanov 2009 (abstract, pp. 10–11: k_p = 2 for rollers of length l = d); Podshibnev 2022, eq. 3.15.


πŸ“€ DXF export

The file is saved in millimetres (doc.units = MM, $INSUNITS = 4). Many generators omit the units, so CAD systems may read the numbers as metres or inches β€” this one does not.

Layer content DXF entity
Rigid-wheel profile LWPOLYLINE
Cage (outer and inner) 2 Γ— CIRCLE
Eccentric CIRCLE + POINT + axis line
Rolling elements CIRCLE per element
Outline (overall Ø) CIRCLE

Which entities are exported is controlled by the same checkboxes as the plot.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  main.py   β€” entry point: free port, logging, ui.run()   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  ui.py + local.py  β€” NiceGUI interface, RU/EN strings    β”‚
β”‚  (no formulas inside)                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  core/                                                   β”‚
β”‚   solver.py   β€” picks the solving mode, returns result   β”‚
β”‚   formula.py  β€” pure formulas (no UI, no state)          β”‚
β”‚   constans.py β€” GOST series, material hints              β”‚
β”‚   geometry.py β€” profile / cage / eccentric / elements    β”‚
β”‚   export.py   β€” DXF (ezdxf, mm)                          β”‚
β”‚   logger.py   β€” in-memory log, TXT / JSON / CSV          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Category Technologies
Language Python 3.14
UI NiceGUI (FastAPI + Uvicorn under the hood)
Math NumPy, SciPy (root finding)
Plots Matplotlib
CAD export ezdxf
Packaging Poetry, nicegui-pack (PyInstaller)
CI GitHub Actions (windows-latest)

Repository Structure

vptk/
β”œβ”€β”€ .github/workflows/build-exe.yml   # Windows .exe build, versioned artifact
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ solver.py
β”‚   β”œβ”€β”€ formula.py
β”‚   β”œβ”€β”€ constans.py
β”‚   β”œβ”€β”€ geometry.py
β”‚   β”œβ”€β”€ export.py
β”‚   └── logger.py
β”œβ”€β”€ literature/                       # source PDFs
β”œβ”€β”€ local.py                          # RU / EN strings
β”œβ”€β”€ main.py
β”œβ”€β”€ ui.py
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ README.md                         # English (default)
β”œβ”€β”€ README.ru.md                      # Русская вСрсия
└── LICENSE

🀝 Contributing

Issues and PRs are welcome.

poetry install --no-root --with dev
poetry run python main.py

Adding a language: copy the "en" block in local.py, translate the values (keep the keys and {placeholders}), add the code to LANGUAGES.


❀️ Support the Project

VPTK is free and open source. If it saved you time, you can support development with Monero:

XMR: 86CuofuVXfoUBb6tHufqHXZG4fbniEhmMUumNfBst2f7S2vpQrVJ69Bd7LqiLqDWz2VZ1Gxj2ePa2355Gc68CyZd7jXpjpS

Monero keeps donations private β€” no need to leave a name. Stars and bug reports help just as much ⭐


πŸ™ Acknowledgments

  • TrashRobotics β€” the original idea and calculator that inspired this project
  • V. A. Podshibnev β€” dissertation (2022), the basis of all sizing formulas
  • V. S. Stepanov β€” thesis abstract (2009): original d_RE, D, L relations, GOST 3722-81 size series, efficiency measurements

πŸ“œ License

GNU GPLv3 β€” feel free to use, modify, and distribute.


Built with ❀️ for engineers who need a gear, not just a profile.

About

Wave gear with intermediate rolling elements (VPTK/BWG) sizing calculator: enter 2 of 4 params (ratio, diameter, torque) and get full geometry + DXF export. Python, NiceGUI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages