LibLathe

LibLathe is an opensource standalone python library for generating turning paths and gcode for use with cnc lathes.
| ⚠️ WARNING: LibLathe is currently experimental / Proof of concept and only suitable for testing. |
Installation
Installing liblathe from PYPI
pip install liblathe
Local install for testing
pip install .
⚠️ Some systems require that packages are system installed. Liblathe can be installed for development purposes. Note: This may break your system
pip install . --break-system-packages
pip uninstall liblathe --break-system-packages
Build
Liblathe is a python library with a C++ core. Liblathe core can be compiled and tested inplace using the following steps:
cd Liblathe
cmake .
make
Local testing
python3 ./examples/defeature_example.py
Tests
After building, run the Python suite with pytest --ignore=extern, as used by
the test workflows. These tests exercise the compiled C++ core through Python.
The native memory driver is an optional diagnostic for investigating C++ memory issues, not a required test or CI step. Its header contains the manual build and sanitizer instructions.
Design
Part profiles are lines and arcs in X (radius) and Z (axis). LibLathe plans cuts in two geometry steps:
- Defeature: the tool is moved along the part and only the area it can actually reach is kept, removing features that can't be turned, such as undercuts.
- Offset: a signed distance field (SDF) gives the distance from any point to the profile. A quadtree samples it, refining only near the target distance. Points at that distance are collected, ordered and simplified with the Ramer-Douglas-Peucker (RDP) algorithm into the offset path.
The operations (face, rough, profile and part-off) combine these steps into toolpaths and gcode. The geometry core is C++ exposed to Python with pybind11.
The SDF uses the profile closed back to X = 0: sign and distance include the same boundary. Artificial closing edges do not generate offset candidates; faces explicitly included in the profile remain eligible. The existing start-Z clip is retained. In LibLathe's plotted view, Z is horizontal and X increases downward from the centreline.
See ARCHITECTURE.md for the trade-offs and alternative approaches.
Examples
Facing:
Roughing:
Profiling:
Parting:
Links
Metadata
Release files for liblathe 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| liblathe-0.0.7.tar.gz | 38.6 kB | With provenance | Details for liblathe-0.0.7.tar.gz |
Built distributions (wheels)
Total release size: 13.3 MB
Release files / liblathe-0.0.7.tar.gz
| Download URL | liblathe-0.0.7.tar.gz |
|---|---|
| Size | 38.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31db61b10ea35d42c4f964b8069d202d82aea67ad0adcfd4f1c4b02032f7ea27
|
|
BLAKE2b-256 checksum How to use checksums |
e340c2a5cfdacbb3f4e5794b90ac62dec3f985fd7f61f47bcf5f16d44cd6c626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-pp310-pypy310_pp73-win_amd64.whl
| Download URL | liblathe-0.0.7-pp310-pypy310_pp73-win_amd64.whl |
|---|---|
| Size | 546.9 kB |
| Tags | PyPy 3.10 PyPy 3.10 7.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4ad1d0d385a7a4933c85edd6a137793cd8e933e85055b005eead390b6de217b1
|
|
BLAKE2b-256 checksum How to use checksums |
e5c6d3a4be4200ac80878e369c78ee3d6d071d54d6b13659d633d40afa57e691
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | liblathe-0.0.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 741.1 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
b520ca2b01701294e51a09aacff88a23fd70900ab408855cbd4ce578585f9329
|
|
BLAKE2b-256 checksum How to use checksums |
2a7cd27abd0fd8f82107014f51eb5901f80996a2d6a4e69d1ce59bd28abe87d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp313-cp313-win_amd64.whl
| Download URL | liblathe-0.0.7-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 557.2 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ceed0b1d1b9db026a0b229c7d10f27f7642a4b2f01957d74087c21cdc9397488
|
|
BLAKE2b-256 checksum How to use checksums |
b7577f5083fdf3f66ea8b4be5460ea1379326377a6358de66d793edd3b5d1000
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | liblathe-0.0.7-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
ef3250a3ecdbf431d77ce3716ebbb65f42158721b9233481996f3a96b4a9af62
|
|
BLAKE2b-256 checksum How to use checksums |
53bec29868efce36100a3a4badc6ae47a88a61a58d8aaa541eec9102b91df73a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | liblathe-0.0.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 788.0 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a5a88d1712973ab4de6ff72c3ee6723f507277f29cb413b86e14591ce895ee85
|
|
BLAKE2b-256 checksum How to use checksums |
1beab6d96b89b6e36f8b649b1817907f8f40a34665cb4bb7b6a69388a001dc22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp312-cp312-win_amd64.whl
| Download URL | liblathe-0.0.7-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 557.1 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8a0204d8984114de4976a789053942b5a6c46986177c0b4d01c7a81151b0414b
|
|
BLAKE2b-256 checksum How to use checksums |
4c0f2961b0d4657ea541485fc64fef90289f7b9ccc809c430d6afa16a54f3e2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | liblathe-0.0.7-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
cc399fff8862f1eac3d79e6893c8dbea42989ad99329873ea5581fc7860c2270
|
|
BLAKE2b-256 checksum How to use checksums |
e4da427f841c2429381859d296ae73f6f8c8dfe93f3781414fdf36f5a6f67899
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | liblathe-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 787.9 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c26797db30b4ba80361c2fc849f45e0f40363419034e3d4272d9dde47c51d021
|
|
BLAKE2b-256 checksum How to use checksums |
48b24ef7e59d052aa44cc1ad264a649a5f441fee64c5aab9ea4512fd4343b30e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp311-cp311-win_amd64.whl
| Download URL | liblathe-0.0.7-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 548.6 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
11faccebfb6fc491ece01e2e68e71a97d7f451827b828bf3383bbcf99745a5c4
|
|
BLAKE2b-256 checksum How to use checksums |
73cdc46a49931a789c6a5b73dc947bfa103b9b5ed92767c2e0211e7136e23ed3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | liblathe-0.0.7-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
662f25f9ec64cbeba0a59f33723ef5038add6a5f3a197e937de951a5229de5a2
|
|
BLAKE2b-256 checksum How to use checksums |
607a3c5bd6e5841f5c5198eb0ee9adb19f38a5d9baa2daa46f63b3100d887725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | liblathe-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 786.8 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a8471515e4644104a27e7c8a6dbd22495e5867aa20a66ee9fa94e78004580025
|
|
BLAKE2b-256 checksum How to use checksums |
a5230b7614ee036520d85b3e1250298f0ae56cad84f4d1d03367bc397fad48ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp310-cp310-win_amd64.whl
| Download URL | liblathe-0.0.7-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 545.1 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d8fd0463bf030f32e47183bfe2ade21c1094b45fb498ac57d9e1efb4bc3fc3f3
|
|
BLAKE2b-256 checksum How to use checksums |
0ccb1fa0f97d3c9053cfe38b42aed2f15909f2a7d95219202454109e56890d64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | liblathe-0.0.7-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
b1a86c56a5004608eef434327693fa296bb3f63e85b4d256586769347b426e33
|
|
BLAKE2b-256 checksum How to use checksums |
2229c3611eec5634411cbef81a6b7e9744a3ed9e7b64e88482b71494b0111286
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / liblathe-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | liblathe-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 779.9 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
176f9d7ef6e10a9c5cd50059f91a120bd0ab1a4480b48fdb8f6cb2849c3be581
|
|
BLAKE2b-256 checksum How to use checksums |
3014029dce3f13f0766440c6b71578093aa80044f97ff31bdffcc48b8832c780
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for liblathe 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 15 files in this release have been uploaded with provenance metadata.
Attestation for liblathe-0.0.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.