pybox3d 2026a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. pybox3d-2026a1/.gitignore +94 -0
  2. pybox3d-2026a1/.python-version +1 -0
  3. pybox3d-2026a1/CHANGELOG.md +102 -0
  4. pybox3d-2026a1/CMakeLists.txt +29 -0
  5. pybox3d-2026a1/LICENSE.md +504 -0
  6. pybox3d-2026a1/PKG-INFO +236 -0
  7. pybox3d-2026a1/README.md +209 -0
  8. pybox3d-2026a1/TODO.md +81 -0
  9. pybox3d-2026a1/libbox3d/CMakeLists.txt +14 -0
  10. pybox3d-2026a1/libbox3d/include/box3d/box3d.h +62 -0
  11. pybox3d-2026a1/libbox3d/include/box3d/box3d_export.h +10 -0
  12. pybox3d-2026a1/libbox3d/include/box3d/joint.h +29 -0
  13. pybox3d-2026a1/libbox3d/include/box3d/quat.h +36 -0
  14. pybox3d-2026a1/libbox3d/include/box3d/rigidbody.h +72 -0
  15. pybox3d-2026a1/libbox3d/include/box3d/vec3.h +40 -0
  16. pybox3d-2026a1/libbox3d/include/box3d/world.h +92 -0
  17. pybox3d-2026a1/libbox3d/src/box3d.c +245 -0
  18. pybox3d-2026a1/libbox3d/src/quat.c +84 -0
  19. pybox3d-2026a1/libbox3d/src/rigidbody.c +112 -0
  20. pybox3d-2026a1/libbox3d/src/vec3.c +61 -0
  21. pybox3d-2026a1/libbox3d/src/world.c +261 -0
  22. pybox3d-2026a1/pyproject.toml +95 -0
  23. pybox3d-2026a1/src/pybox3d/__init__.py +38 -0
  24. pybox3d-2026a1/src/pybox3d/_ext/module.c +52 -0
  25. pybox3d-2026a1/src/pybox3d/_ext/py_box3d.c +312 -0
  26. pybox3d-2026a1/src/pybox3d/_ext/py_box3d.h +33 -0
  27. pybox3d-2026a1/src/pybox3d/_ext/py_errors.c +46 -0
  28. pybox3d-2026a1/src/pybox3d/_ext/py_errors.h +21 -0
  29. pybox3d-2026a1/src/pybox3d/_ext/py_joint.c +122 -0
  30. pybox3d-2026a1/src/pybox3d/_ext/py_joint.h +30 -0
  31. pybox3d-2026a1/src/pybox3d/_ext/py_quat.c +219 -0
  32. pybox3d-2026a1/src/pybox3d/_ext/py_quat.h +23 -0
  33. pybox3d-2026a1/src/pybox3d/_ext/py_rigidbody.c +345 -0
  34. pybox3d-2026a1/src/pybox3d/_ext/py_rigidbody.h +43 -0
  35. pybox3d-2026a1/src/pybox3d/_ext/py_vec3.c +257 -0
  36. pybox3d-2026a1/src/pybox3d/_ext/py_vec3.h +26 -0
  37. pybox3d-2026a1/src/pybox3d/_ext/py_world.c +273 -0
  38. pybox3d-2026a1/src/pybox3d/_ext/py_world.h +17 -0
  39. pybox3d-2026a1/src/pybox3d/_pybox3d.pyi +125 -0
  40. pybox3d-2026a1/src/pybox3d/py.typed +0 -0
@@ -0,0 +1,94 @@
1
+ ### Python ###
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.pyd
6
+ .venv/
7
+ *.egg-info/
8
+ .eggs/
9
+ dist/
10
+ wheelhouse/
11
+ build/
12
+ .mypy_cache/
13
+ .pytest_cache/
14
+ .ruff_cache/
15
+
16
+ ### C ###
17
+ # Prerequisites
18
+ *.d
19
+
20
+ # Object files
21
+ *.o
22
+ *.ko
23
+ *.obj
24
+ *.elf
25
+
26
+ # Linker output
27
+ *.ilk
28
+ *.map
29
+ *.exp
30
+
31
+ # Precompiled headers
32
+ *.gch
33
+ *.pch
34
+
35
+ # Libraries
36
+ *.lib
37
+ *.a
38
+ *.la
39
+ *.lo
40
+
41
+ # Shared objects (inc. Windows DLLs)
42
+ *.dll
43
+ *.so
44
+ *.so.*
45
+ *.dylib
46
+
47
+ # Executables
48
+ *.exe
49
+ *.out
50
+ *.app
51
+ *.i*86
52
+ *.x86_64
53
+ *.hex
54
+
55
+ # Debug files
56
+ *.dSYM/
57
+ *.su
58
+ *.idb
59
+ *.pdb
60
+
61
+ # Kernel module compile results
62
+ *.mod*
63
+ *.cmd
64
+ .tmp_versions/
65
+ modules.order
66
+ Module.symvers
67
+ Mkfile.old
68
+ dkms.conf
69
+
70
+ ### C++ ###
71
+ *.slo
72
+ *.lai
73
+ *.smod
74
+
75
+ ### CMake ###
76
+ CMakeLists.txt.user
77
+ CMakeCache.txt
78
+ CMakeFiles/
79
+ CMakeScripts/
80
+ Testing/
81
+ Makefile
82
+ cmake_install.cmake
83
+ install_manifest.txt
84
+ compile_commands.json
85
+ CTestTestfile.cmake
86
+ _deps/
87
+ *-prefix/
88
+ CMakeUserPresets.json
89
+
90
+ ### MkDocs ###
91
+ site/
92
+
93
+ ### JetBrains IDEs ###
94
+ .idea/
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,102 @@
1
+ # Changelog
2
+
3
+ Also published as [Changelog](docs/changelog.md) in the MkDocs site --
4
+ keep both in sync when either changes.
5
+
6
+ All notable changes to `pybox3d` are documented here. Loosely follows
7
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); no version has
8
+ been tagged/released yet, so everything so far lives under Unreleased.
9
+ See [TODO.md](TODO.md) for what's still missing.
10
+
11
+ ## [Unreleased]
12
+
13
+ ### Added
14
+
15
+ - `DistanceJoint`: a rigid center-to-center distance constraint between
16
+ two bodies already in a `World`, via `World.add_joint()`/`get_joint()`/
17
+ `remove_joint()`/`joint_count`. See `docs/api/joint.md` and
18
+ `examples/pendulum_joint_demo.py`.
19
+ - `TODO.md`, tracking missing features against
20
+ <https://box2d.org/documentation3d/topics.html>.
21
+ - `CHANGELOG.md` (this file).
22
+ - MkDocs documentation site (`docs/`, `mkdocs.yml`, `uv run mkdocs
23
+ serve`).
24
+ - PyPI packaging metadata (`classifiers`, `keywords`, `project.urls`,
25
+ `license`/`license-files`) and a GitHub Actions release workflow
26
+ (`.github/workflows/publish.yml`).
27
+ - `LICENSE.md` (LGPL-2.1-or-later).
28
+ - README: Installation (`pip install`), Usage, Documentation, and
29
+ Publishing sections.
30
+ - `examples/joint_chain_demo.py` (a short chain of `DistanceJoint`s
31
+ hanging from a static anchor) and `examples/dumbbell_demo.py` (two
32
+ free dynamic bodies joined by a `DistanceJoint`, no static anchor).
33
+ - MkDocs [Roadmap](docs/roadmap.md) and this Changelog, published as
34
+ pages in the docs site (mirroring `TODO.md`/`CHANGELOG.md`).
35
+
36
+ ### Changed
37
+
38
+ - Version bumped to `2026a1` for the first PyPI release (tagged
39
+ `v2026a1`).
40
+ - Release workflow (`.github/workflows/publish.yml`) now builds a
41
+ full wheel matrix with `cibuildwheel` -- Windows (x86_64), Linux
42
+ (x86_64 + ARM64 via QEMU, `manylinux`), and macOS (x86_64 + ARM64) for
43
+ Python 3.10-3.14 -- runs the test suite against every wheel, and
44
+ publishes to PyPI with trusted publishing. The sdist is built
45
+ separately and trimmed to sources only (no `docs/`, `tests/`,
46
+ `examples/`, `.github/`, or `uv.lock`).
47
+ - CI split into `tests.yaml` (cross-platform pytest matrix on every
48
+ push/PR) and `check.yaml` (ruff lint + mypy typecheck) workflows.
49
+ - Installation docs/README now advertise the prebuilt wheels; source
50
+ installs remain documented as the fallback for unsupported platforms.
51
+ - MkDocs theme switched to
52
+ [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/)
53
+ with a light blue palette (after a brief detour to the Nature theme),
54
+ restoring Material's visual style and enhanced search. This reverts
55
+ the earlier Material-to-Nature switch.
56
+ - Documentation site restructured into guided sections: `Getting
57
+ started` (install / quickstart / documentation workflow), `Tutorials`
58
+ (step-by-step walkthroughs of the falling box, pendulum, joint chain,
59
+ and dumbbell demos), `Examples` (one page per runnable demo),
60
+ `Reference` (module, class, and function sub-pages), and `Project`
61
+ (limitations / roadmap / changelog). `docs/api/` was replaced by
62
+ `docs/reference/{modules,classes,functions}/`, with method content
63
+ split across the new class/function pages and `ContactInfo`/`RayHit`
64
+ promoted to their own class pages.
65
+
66
+ ### Fixed
67
+
68
+ - The PyPI publish workflow now ignores platform-tag problems: the
69
+ `pypi-publish` job runs on `workflow_dispatch` as well as on release
70
+ (both via trusted publishing on the `pypi` environment), and the README
71
+ documents that locally-built Linux wheels carry an unsupported
72
+ `linux_x86_64` tag which PyPI rejects -- repair them with
73
+ `auditwheel repair` or publish through the CI workflow.
74
+ - `docs/getting-started.md` and `README.md` still referenced the
75
+ Nature theme/`mkdocs-nature` package after the switch back above;
76
+ updated both to `mkdocs-material`.
77
+ - `docs/index.md` never mentioned `DistanceJoint` after it was added.
78
+ - Task-list checkboxes (`- [x]`/`- [ ]`) in the Roadmap/Changelog pages
79
+ rendered as literal `[x]`/`[ ]` text: the Material-to-Nature theme
80
+ switch dropped `pymdown-extensions` (a transitive Material dependency),
81
+ which `pymdownx.tasklist` needs. Added it back as a direct `docs`
82
+ dependency and enabled `pymdownx.tasklist` in `mkdocs.yml`.
83
+ - The built wheel no longer bundles the C extension's `.c`/`.h` sources
84
+ (`wheel.exclude` in `pyproject.toml`) -- dead weight not needed at
85
+ runtime, left over from `wheel.packages` copying the whole
86
+ `src/pybox3d` tree.
87
+
88
+ ### Documented
89
+
90
+ - Newly-discovered limitation: joints solve once per step with no inner
91
+ iteration loop, so a joint chain longer than ~2-3 links sags well past
92
+ its `rest_length` (found while writing `joint_chain_demo.py`; tracked
93
+ in `TODO.md`/`docs/limitations.md`, not fixed yet).
94
+
95
+ ## Initial implementation
96
+
97
+ - `Vec3` / `Quat`: 3D vector and rotation-quaternion math.
98
+ - `Box3D`: an axis-aligned or oriented box (AABB/OBB) with
99
+ point-containment, SAT-based overlap, and ray-cast queries.
100
+ - `RigidBody` / `World`: box-scoped rigid-body dynamics -- mass/inertia,
101
+ semi-implicit Euler integration, naive O(n²) collision detection, and
102
+ impulse-based contact resolution.
@@ -0,0 +1,29 @@
1
+ cmake_minimum_required(VERSION 3.18)
2
+ project(pybox3d LANGUAGES C)
3
+
4
+ set(CMAKE_C_STANDARD 11)
5
+ set(CMAKE_C_STANDARD_REQUIRED ON)
6
+
7
+ if(NOT CMAKE_BUILD_TYPE)
8
+ set(CMAKE_BUILD_TYPE Release)
9
+ endif()
10
+
11
+ find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
12
+
13
+ add_subdirectory(libbox3d)
14
+
15
+ Python_add_library(_pybox3d MODULE WITH_SOABI
16
+ src/pybox3d/_ext/module.c
17
+ src/pybox3d/_ext/py_errors.c
18
+ src/pybox3d/_ext/py_vec3.c
19
+ src/pybox3d/_ext/py_quat.c
20
+ src/pybox3d/_ext/py_box3d.c
21
+ src/pybox3d/_ext/py_rigidbody.c
22
+ src/pybox3d/_ext/py_joint.c
23
+ src/pybox3d/_ext/py_world.c
24
+ )
25
+
26
+ target_link_libraries(_pybox3d PRIVATE box3d)
27
+ target_include_directories(_pybox3d PRIVATE src/pybox3d/_ext)
28
+
29
+ install(TARGETS _pybox3d DESTINATION pybox3d)