geomcore 0.1.0__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.
- geomcore-0.1.0/.github/workflows/ci.yml +21 -0
- geomcore-0.1.0/.github/workflows/release.yml +119 -0
- geomcore-0.1.0/.gitignore +16 -0
- geomcore-0.1.0/CHANGELOG.md +31 -0
- geomcore-0.1.0/Cargo.lock +691 -0
- geomcore-0.1.0/Cargo.toml +25 -0
- geomcore-0.1.0/LICENSE-APACHE +202 -0
- geomcore-0.1.0/LICENSE-MIT +21 -0
- geomcore-0.1.0/PKG-INFO +63 -0
- geomcore-0.1.0/README.md +88 -0
- geomcore-0.1.0/ROADMAP.md +61 -0
- geomcore-0.1.0/benches/eval_throughput.rs +94 -0
- geomcore-0.1.0/docs/benchmarks.md +25 -0
- geomcore-0.1.0/docs/releasing.md +69 -0
- geomcore-0.1.0/examples/sample_conics.rs +62 -0
- geomcore-0.1.0/geomcore-py/Cargo.toml +17 -0
- geomcore-0.1.0/geomcore-py/README.md +43 -0
- geomcore-0.1.0/geomcore-py/src/lib.rs +1642 -0
- geomcore-0.1.0/geomcore-py/tests/test_bindings.py +121 -0
- geomcore-0.1.0/pyproject.toml +30 -0
- geomcore-0.1.0/rustfmt.toml +0 -0
- geomcore-0.1.0/src/curve_math/analytic.rs +632 -0
- geomcore-0.1.0/src/curve_math/bspline.rs +776 -0
- geomcore-0.1.0/src/curve_math/mod.rs +4 -0
- geomcore-0.1.0/src/curves/bspline.rs +697 -0
- geomcore-0.1.0/src/curves/circle.rs +794 -0
- geomcore-0.1.0/src/curves/curve.rs +689 -0
- geomcore-0.1.0/src/curves/curve2d.rs +339 -0
- geomcore-0.1.0/src/curves/ellipse.rs +544 -0
- geomcore-0.1.0/src/curves/hyperbola.rs +534 -0
- geomcore-0.1.0/src/curves/line.rs +644 -0
- geomcore-0.1.0/src/curves/mod.rs +22 -0
- geomcore-0.1.0/src/curves/parabola.rs +375 -0
- geomcore-0.1.0/src/curves/parametrize.rs +775 -0
- geomcore-0.1.0/src/frame.rs +787 -0
- geomcore-0.1.0/src/lib.rs +95 -0
- geomcore-0.1.0/src/point.rs +284 -0
- geomcore-0.1.0/src/surface_math/analytic.rs +697 -0
- geomcore-0.1.0/src/surface_math/bspline.rs +346 -0
- geomcore-0.1.0/src/surface_math/mod.rs +4 -0
- geomcore-0.1.0/src/surfaces/bspline.rs +903 -0
- geomcore-0.1.0/src/surfaces/cone.rs +595 -0
- geomcore-0.1.0/src/surfaces/cylinder.rs +386 -0
- geomcore-0.1.0/src/surfaces/mod.rs +19 -0
- geomcore-0.1.0/src/surfaces/plane.rs +486 -0
- geomcore-0.1.0/src/surfaces/sphere.rs +310 -0
- geomcore-0.1.0/src/surfaces/surface.rs +841 -0
- geomcore-0.1.0/src/surfaces/torus.rs +362 -0
- geomcore-0.1.0/src/transform.rs +402 -0
- geomcore-0.1.0/src/vector.rs +695 -0
- geomcore-0.1.0/tests/common/mod.rs +75 -0
- geomcore-0.1.0/tests/fixtures/construction.json +461 -0
- geomcore-0.1.0/tests/fixtures/curves_analytic.json +1983 -0
- geomcore-0.1.0/tests/fixtures/curves_bspline.json +870 -0
- geomcore-0.1.0/tests/fixtures/parametrize.json +1409 -0
- geomcore-0.1.0/tests/fixtures/surfaces_analytic.json +2321 -0
- geomcore-0.1.0/tests/fixtures/surfaces_bspline.json +619 -0
- geomcore-0.1.0/tests/fixtures/transforms.json +663 -0
- geomcore-0.1.0/tests/vs_fixtures.rs +1194 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push: { branches: [main] }
|
|
4
|
+
pull_request:
|
|
5
|
+
jobs:
|
|
6
|
+
rust:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
11
|
+
with: { components: "rustfmt, clippy" }
|
|
12
|
+
- run: cargo fmt --check
|
|
13
|
+
- run: cargo clippy --all-targets -- -D warnings
|
|
14
|
+
- run: cargo test
|
|
15
|
+
- run: cargo test --doc
|
|
16
|
+
python:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
21
|
+
- run: cargo check -p geomcore-py
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags: ["v*.*.*"]
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
check:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
12
|
+
- name: Verify tag matches the workspace version
|
|
13
|
+
run: |
|
|
14
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
15
|
+
for p in geomcore geomcore-py; do
|
|
16
|
+
v="$(cargo metadata --no-deps --format-version 1 \
|
|
17
|
+
| jq -r --arg p "$p" '.packages[] | select(.name == $p) | .version')"
|
|
18
|
+
if [ "$v" != "$tag" ]; then
|
|
19
|
+
echo "::error::$p is at version $v but the tag is $tag"
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
done
|
|
23
|
+
- run: cargo test
|
|
24
|
+
- run: cargo test --doc
|
|
25
|
+
|
|
26
|
+
build-wheels:
|
|
27
|
+
needs: check
|
|
28
|
+
strategy:
|
|
29
|
+
matrix:
|
|
30
|
+
include:
|
|
31
|
+
- os: ubuntu-latest
|
|
32
|
+
target: x86_64
|
|
33
|
+
- os: ubuntu-latest
|
|
34
|
+
target: aarch64
|
|
35
|
+
- os: windows-latest
|
|
36
|
+
target: x64
|
|
37
|
+
- os: macos-latest
|
|
38
|
+
target: universal2-apple-darwin
|
|
39
|
+
runs-on: ${{ matrix.os }}
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
- uses: PyO3/maturin-action@v1
|
|
43
|
+
with:
|
|
44
|
+
target: ${{ matrix.target }}
|
|
45
|
+
args: --release --out dist --manifest-path geomcore-py/Cargo.toml
|
|
46
|
+
manylinux: auto
|
|
47
|
+
- uses: actions/upload-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: dist-wheel-${{ matrix.os }}-${{ matrix.target }}
|
|
50
|
+
path: dist
|
|
51
|
+
|
|
52
|
+
build-sdist:
|
|
53
|
+
needs: check
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v4
|
|
57
|
+
- uses: PyO3/maturin-action@v1
|
|
58
|
+
with:
|
|
59
|
+
command: sdist
|
|
60
|
+
args: --out dist --manifest-path geomcore-py/Cargo.toml
|
|
61
|
+
- uses: actions/upload-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
name: dist-sdist
|
|
64
|
+
path: dist
|
|
65
|
+
|
|
66
|
+
publish-pypi:
|
|
67
|
+
needs: [build-wheels, build-sdist]
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
environment:
|
|
70
|
+
name: pypi
|
|
71
|
+
url: https://pypi.org/p/geomcore
|
|
72
|
+
permissions:
|
|
73
|
+
id-token: write
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/download-artifact@v4
|
|
76
|
+
with:
|
|
77
|
+
pattern: dist-*
|
|
78
|
+
merge-multiple: true
|
|
79
|
+
path: dist
|
|
80
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
81
|
+
|
|
82
|
+
publish-crates-io:
|
|
83
|
+
needs: check
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
environment: crates-io
|
|
86
|
+
permissions:
|
|
87
|
+
id-token: write
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/checkout@v4
|
|
90
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
91
|
+
- uses: rust-lang/crates-io-auth-action@v1
|
|
92
|
+
id: auth
|
|
93
|
+
- name: Publish to crates.io (skipped if the version is already there)
|
|
94
|
+
run: |
|
|
95
|
+
v="${GITHUB_REF_NAME#v}"
|
|
96
|
+
if curl -fsS -A "geomcore-release-workflow" \
|
|
97
|
+
"https://crates.io/api/v1/crates/geomcore/$v" >/dev/null 2>&1; then
|
|
98
|
+
echo "geomcore $v is already on crates.io; skipping publish"
|
|
99
|
+
else
|
|
100
|
+
cargo publish -p geomcore
|
|
101
|
+
fi
|
|
102
|
+
env:
|
|
103
|
+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
|
104
|
+
|
|
105
|
+
github-release:
|
|
106
|
+
needs: [publish-pypi, publish-crates-io]
|
|
107
|
+
runs-on: ubuntu-latest
|
|
108
|
+
permissions:
|
|
109
|
+
contents: write
|
|
110
|
+
steps:
|
|
111
|
+
- uses: actions/checkout@v4
|
|
112
|
+
- uses: actions/download-artifact@v4
|
|
113
|
+
with:
|
|
114
|
+
pattern: dist-*
|
|
115
|
+
merge-multiple: true
|
|
116
|
+
path: dist
|
|
117
|
+
- run: gh release create "$GITHUB_REF_NAME" dist/* --title "$GITHUB_REF_NAME" --generate-notes
|
|
118
|
+
env:
|
|
119
|
+
GH_TOKEN: ${{ github.token }}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/target
|
|
2
|
+
Cargo.lock
|
|
3
|
+
.venv-fixtures/
|
|
4
|
+
# local working documents, not part of the published repo
|
|
5
|
+
2026-07-01-geomrust-poc-design.md
|
|
6
|
+
docs/superpowers/
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.pyc
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
geomcore-py/target
|
|
11
|
+
*.so
|
|
12
|
+
*.whl
|
|
13
|
+
dist/
|
|
14
|
+
.superpowers/
|
|
15
|
+
.venv-py/
|
|
16
|
+
.idea/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to
|
|
7
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). The Rust crate and
|
|
8
|
+
the Python distribution are versioned in lockstep.
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
## [0.1.0] - 2026-07-02
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Parametric evaluation (point, first and second derivatives, bulk
|
|
17
|
+
`eval_points`) for lines, circles, ellipses, parabolas, hyperbolas, and
|
|
18
|
+
B-spline curves (rational and periodic) in 3D, plus 2D lines and circles.
|
|
19
|
+
- Parametric evaluation for planes, cylinders, cones, spheres, tori, and
|
|
20
|
+
B-spline surfaces.
|
|
21
|
+
- Rigid transformations (translation, rotation, mirroring, scaling) via a
|
|
22
|
+
single `Transform` type, applicable to all geometry.
|
|
23
|
+
- Analytic curve-on-surface parametrization for lines and circles on the five
|
|
24
|
+
elementary surfaces (plane, cylinder, cone, sphere, torus).
|
|
25
|
+
- Python bindings (`pip install geomcore`) with native `geomcore.curves` and
|
|
26
|
+
`geomcore.surfaces` submodules, for Python 3.9+ (abi3).
|
|
27
|
+
- Golden-fixture validation of all numeric results at 1e-7 tolerance, and
|
|
28
|
+
criterion throughput benchmarks (`docs/benchmarks.md`).
|
|
29
|
+
|
|
30
|
+
[Unreleased]: https://github.com/GabrielJMS/geomcore/compare/v0.1.0...HEAD
|
|
31
|
+
[0.1.0]: https://github.com/GabrielJMS/geomcore/releases/tag/v0.1.0
|