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.
English β’ Π ΡΡΡΠΊΠΈΠΉ
Features β’ Why this one β’ Quick Start β’ Usage β’ Methodology β’ DXF export β’ Architecture β’ Contributing β’ Support
| 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 |
- β
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
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.
- Open Actions β Build Windows EXE (or Releases) and download the
VPTK-windowsartifact. - Run
GeometryCalculationVPTK-v<version>-<sha>.exe. - 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.
Requires Python 3.14+ and Poetry.
git clone https://github.com/Zigizmund1996/GeometryCalculationVPTK.git
cd GeometryCalculationVPTK
poetry install --no-root
poetry run python main.pyThe app picks the first free port starting from 8000 and opens http://127.0.0.1:<port> automatically.
poetry install --no-root --with dev
poetry run nicegui-pack --onefile --name GeometryCalculationVPTK main.pynicegui-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).
-
Fill exactly two of the four fields:
q,D,M_out,M_in.Pair Result q+M_outd_RE,D,L,Wq+DM_outD+M_outq(solved numerically onq β [4.1; 100])q+M_inM_outthroughΞ·M_in+M_outqfrom the torque ratio;qis rounded to an integer andM_inis recomputed (the deviation is shown) -
Choose Balls or Rollers, tick Round to GOST if needed.
-
Adjust
Ο,k_N,Ξ·(or keep defaults:150 MPa,0.56,0.85). -
Pick which elements to draw and press Save DXF / Save PNG.
-
Save the calculation log as TXT / JSON / CSV if you need a record.
| 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 |
- 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 supportn > 1. - Stepanov (2009) shows the smallest outer diameter at moderate ratios; Podshibnev cites
q β 8β¦15for minimumD. Torque ripple decreases asqgrows, 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))(Min NΒ·m), i.e.Ξ· β 0.92from roughly 10β20 NΒ·m upwards but much lower at small torque β treat results for tiny torques with care.
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):
Rolling-element diameter (Podshibnev, eq. 3.15):
Overall dimensions (eq. 3.16β3.18):
Torques and counts:
Minimum outer radius of the rigid wheel (used for the warning):
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.
- Compute the exact
d_RE. - Find the nearest larger size in the standard series (balls β GOST 3722, rollers β GOST 22696).
- Recalculate
D,L,W,M_out,M_infor 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 (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.
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.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| 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) |
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
Issues and PRs are welcome.
poetry install --no-root --with dev
poetry run python main.pyAdding a language: copy the "en" block in local.py, translate the values (keep the keys and {placeholders}), add the code to LANGUAGES.
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 β
- 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,Lrelations, GOST 3722-81 size series, efficiency measurements
GNU GPLv3 β feel free to use, modify, and distribute.
Built with β€οΈ for engineers who need a gear, not just a profile.