A pure, standalone geometric kernel for CAD-grade curves and surfaces — parametric evaluation, rigid transformations, and analytic curve-on-surface parametrization, built as small, independently useful Rust libraries with a clean API and idiomatic Python bindings.
geomcore is not a modeling/CAD system — no topology, no B-rep, no boolean
operations (yet). It's the layer underneath one: parametric curve/surface
evaluation, rigid transformations, and curve-on-surface parametrization,
usable on their own by anyone who needs robust computational geometry — not
just future CAD-kernel builders.
Proof-of-concept. Implemented so far:
- Parametric evaluation for lines, circles, ellipses, parabolas, hyperbolas, and B-spline curves in 3D (plus 2D lines and circles, the shapes curve-on-surface parametrization produces).
- Parametric evaluation for planes, cylinders, cones, spheres, tori, and B-spline surfaces.
- Rigid transformations (translation, rotation, mirroring, scaling) via a
single
Transformtype. - Analytic curve-on-surface parametrization for lines and circles on the five elementary surfaces (plane, cylinder, cone, sphere, torus).
Not implemented yet: curve/surface intersection, extrema computation, topology/B-rep, and a numeric-approximation fallback for curve-on-surface parametrization when no closed form exists.
Evaluation results are validated against golden fixtures with CAD-kernel-grade tolerances (1e-7).
See ROADMAP.md for what's coming next and CHANGELOG.md for release history.
use geomcore::{Point3, Vector3};
use geomcore::curves::Circle3D;
let circle = Circle3D::new(Point3::ORIGIN, Vector3::Z, 2.0).unwrap();
let point = circle.eval_point(std::f64::consts::PI / 4.0);cargo add geomcore
Not yet published to crates.io — coming with the first release.
from geomcore import Point3, Vector3
from geomcore.curves import Circle3D
import math
circle = Circle3D.new(Point3.origin(), Vector3.z(), 2.0)
point = circle.eval_point(math.pi / 4)pip install geomcore
Not yet published to PyPI — coming with the first release.
Most of what a CAD kernel needs — parametric evaluation, transformations,
curve-on-surface math — is useful on its own, to anyone doing computational
geometry, not just people building a full modeling system. geomcore grows
these as small, independently useful, well-tested libraries, with the goal
of eventually adding up to a complete, open, high-performance CAD kernel —
without forcing that scope on anyone who just needs the math.
Some algorithms in this library were written using modules of Open CASCADE Technology (OCCT) as a reference.
Dual-licensed under MIT or Apache-2.0, at your option.
New curve/surface types can be added by implementing ParametricCurve3D/
ParametricSurface without touching the core crate's dispatch code — see
the crate docs for details.