Metadata-Version: 2.4
Name: forgekernel
Version: 0.9.2
Summary: Exact-arithmetic B-rep CAD kernel
Author-email: Dan Willis <danielcwillis@gmail.com>
Maintainer-email: Dan Willis <danielcwillis@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/gitcad-xyz/forge
Project-URL: Repository, https://github.com/gitcad-xyz/forge
Project-URL: Issues, https://github.com/gitcad-xyz/forge/issues
Project-URL: Design — ADR-0018, https://github.com/gitcad-xyz/gitcad/blob/main/docs/adr/0018-native-kernel.md
Project-URL: Benchmarks vs OCCT, https://github.com/gitcad-xyz/gitcad/blob/main/bench/RUST-vs-OCCT.md
Keywords: cad,b-rep,brep,geometry,kernel,nurbs,solid-modeling,computational-geometry,exact-arithmetic,rational-arithmetic,step
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: rust
Requires-Dist: forgekernel_rs>=0.8.0; extra == "rust"
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Dynamic: license-file

# forge

An exact-arithmetic boundary-representation (B-rep) CAD kernel. Geometric and
topological decisions use exact rational arithmetic (ℚ, ℚ[π], ℚ[√d]) or
certified intervals; no result depends on a floating-point tolerance.

It ships as two PyPI packages:

- `forgekernel` — the kernel, pure Python.
- `forgekernel_rs` — a native (Rust) build of the performance-critical routines,
  installed automatically when a wheel is available and returning the same
  results.

## Capabilities

- Planar solids: rational linear algebra, plane-based B-rep, booleans,
  divergence-theorem mass properties.
- Quadrics (cylinder, cone, sphere, torus) with closed-form intersections.
- NURBS curves and surfaces; surface–surface intersection with complete branch
  detection and certified points.
- Procedural offsets and shells; edge blends (fillets); lofts.
- Exact volume, centroid, and inertia via the divergence theorem.
- STEP (AP203/AP214) import and export.

## Design

A Python reference implementation defines the exact semantics. A Rust build
provides the same operations for production use; each ported routine is
cross-checked against the reference. Design notes and decisions are recorded in
the gitcad repository (ADR-0018).

## Layout

- `src/forgekernel/` — the Python kernel.
- `rust/forge-core/` — the native build (`forgekernel_rs`).

## Install

```
pip install forgekernel          # pure Python
pip install forgekernel[rust]    # add the native build
```

License: Apache-2.0. Source: https://github.com/gitcad-xyz/forge
