- Rust 98.2%
- POV-Ray SDL 0.8%
- NASL 0.3%
- GLSL 0.3%
- RenderScript 0.1%
- Other 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .cargo | ||
| .github | ||
| crates | ||
| docs | ||
| external | ||
| scripts | ||
| tests/wasm_e2e | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .sonarcloud.properties | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| clippy.toml | ||
| CONTRIBUTING.md | ||
| deny.toml | ||
| install-linux.sh | ||
| install-macos.sh | ||
| install-windows.ps1 | ||
| LICENSE-APACHE | ||
| LICENSE-GPL | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
Martensite
Martensite is a Geometry Kernel providing services for the 3D surface and solid modeling.
It is written in Rust and validated by regression suites on public datasets. Providing a stable and production tested set of toolkits on which Martensite can build on top and innovate.
Martensite has no commitment to keep API parity with any other geometry kernel.
The improvememt roadmap for this project can be found on Milestones
Toolkits
| Crate | Capabilities |
|---|---|
martensite-cmath |
Portable rounding for transcendental functions behind a typed Rust interface. |
martensite-tkernel |
Errors, memory, collections, strings, operating-system services, quantities and units. |
martensite-tkexpress |
Symbolic expressions, differentiation, relations and a text interpreter. |
martensite-tkg2d |
Planar curves, splines, offsets, adaptors, evaluation and hashing. |
martensite-tkmath |
Geometry, linear algebra, solvers, splines, bounding volumes, meshes and exact predicates. |
martensite-tksolve |
Constraint residuals, numerical rank, coordinate preferences and bounded drag previews. Solver guide |
martensite-tkcdf |
Application documents, document references and metadata, format drivers and a light XML parser. |
martensite-tklcaf |
Labels and attributes, transactions with undo and redo, standard attributes, functions and documents. |
martensite-tkservice |
Windows and events, images, fonts, the presentation data model and graphic driver interfaces. |
martensite-tkbrep |
Topological shapes, their exploration and tools, geometric shapes, the shape graph and the binary shape stream. |
martensite-tkgeomalgo |
Curve and surface intersections, hatching, tangent constraints, filling, plates, laws and sketch splines. |
martensite-tktopalgo |
Classification, shape construction and sewing, checks, extrema, bounding boxes and global properties. |
martensite-tkhlr |
Hidden line removal, contour lines of surfaces and the visible and hidden lines as shapes. |
martensite-tkv3d |
Selection, presentation, interactive objects and the 3D viewer. |
martensite-vulkan |
The Vulkan 1.3 renderer behind the graphic driver interfaces. |
martensite-tkprim |
Primitive solids (boxes, wedges, cylinders, cones, spheres, tori, revolutions, half-spaces) and sweeps. |
martensite-tkhelix |
Helix curves, their B-spline approximation and composite helix wires. |
martensite-tkshhealing |
Shape analysis, repair, geometry conversion and subdivision. |
martensite-tkmesh |
Mesh elements, discretization, triangulation and incremental meshing. |
martensite-tktobj |
Document objects, partitions, references, attributes and model iteration. |
martensite-tkbo |
Boolean operations, general fuse, builders, sections with face ancestry, intersection tools, splitting and defeaturing. |
martensite-tksketch |
Surface-bound sketches with cylindrical and conical normal extrusion, periodic bands and apertures, and selected-face bosses and pockets. Includes certified ordinary extrusion, rounded Sweep and ruled Loft from Sketch3D line wires. |
martensite-tksketch3d |
Spatial sketches with stable identities, circular arcs, point and line constraints, and ordered native line wires. See the Sketch3D implementation evidence and source and generator evidence. |
martensite-tkbool |
Topological operations, sweeps, evolved shapes and projections. |
martensite-tkfillet |
Fillets and chamfers. |
martensite-tkcaf |
Topological naming, the extended document attributes and the standard application. |
martensite-tkde |
The data exchange framework: configuration nodes, providers and the format registry. |
martensite-tkxsbase |
The data exchange foundation: interface models, transfer processes, selections and work sessions. |
martensite-tkvcaf |
The presentation attributes of a document and their drivers. |
martensite-tkxcaf |
The extended exchange document: shapes, colors, layers, materials, dimensions and tolerances, notes, views and their presentation. |
martensite-tkfeat |
Local operations and form features: prisms, revolutions, pipes, holes, ribs, slots, glued shapes and splits. |
martensite-tkoffset |
Offset modeling: offset shapes and thick solids, simple offsets, drafts, pipe shells, lofts and tangent blends. |
martensite-tkdestl |
STL reading and writing: text and binary files, shape transfers and the format provider. |
martensite-tkmeshvs |
Mesh visualization: mesh data sources, the drawer, presentation builders and selection on elements and nodes. |
martensite-tkxmesh |
A meshing factory: a named alternative entry to the incremental mesher. |
martensite-tkdestep |
STEP reading and writing: the parser and writer, the entity schemas, shape and document transfers and the format provider. |
martensite-tkdeiges |
IGES reading and writing: the data structures, the file parser and writer, the entity packages, shape and document transfers and the format provider. |
martensite-tkrwmesh |
Tools of the mesh file formats: axis and unit conversion, document fillers, face, edge and vertex iterators and material maps. |
martensite-tkdeobj |
OBJ reading and writing: OBJ and MTL files, document transfers and the format provider. |
martensite-tkdeply |
PLY writing: documents and shapes into PLY files, and the format provider. |
See the foundation guide and math guide, and symbolic expression guide, and planar geometry guide, and the document framework, application data framework and visualization services guides, and the boundary representation, geometric algorithm, topological algorithm, hidden line removal, primitive solid and helix guides for module and test details. The shape healing, mesh construction and document object model guides describe the added toolkits and their verification limits. The form feature and offset modeling guides describe the last modelling toolkits. The STL exchange, mesh visualization and meshing factory guides describe STL files and meshes on their own. The STEP exchange guide describes STEP files, shapes and documents. The IGES exchange guide describes IGES files, shapes and documents. The mesh exchange tools, OBJ exchange and PLY exchange guides describe mesh files and documents. The interactive visualization and Vulkan renderer guides describe the viewer and how to run its tests on a software driver. The Boolean operation, topological operation, fillet and topological naming guides describe the modelling toolkits, and Boolean regression cases describes how their script cases run. The data exchange framework, data exchange foundation, document presentation and extended exchange document guides describe the exchange toolkits and their verification limits.
Getting started
Install the development dependencies with the installer for your OS. Each installer can run again later to update them.
./install-linux.sh # Ubuntu, Fedora, Arch, openSUSE
./install-macos.sh # macOS (Homebrew)
source ~/.local/share/martensite/env.sh # Linux and macOS, in each new shell
powershell -ExecutionPolicy Bypass -File .\install-windows.ps1 # Windows (winget)
Build and test with cargo. Before you push, run the same gate that CI runs:
cargo build
cargo test
cargo xtask pr
Development and test builds optimize SHA-256 to keep isolated dataset tests from
spending most of their time fingerprinting their executables (#228). Executable
identity checks remain enabled.
The existing num-bigint dependency is also optimized for development and test
builds to reduce exact-certification costs (#252). Its version and arithmetic
contracts are unchanged; the measurements
include comparisons of complete certification reports.
TKMath is optimized in development and test builds to keep repeated assembly
integration within its existing time budget (#271). Debug assertions and overflow
checks remain enabled; release profiles are unchanged. The assembly measurements
include an exact comparison of numerical output.
CI has one workflow, .github/workflows/martensite.yml, and all its checks are
cargo xtask commands. CONTRIBUTING explains the gates and
the release process.
Releases provide a production-library source SDK with a coherent workspace and vendored locked dependencies for offline Cargo builds.
PR tests run in one job per affected crate, with up to four test jobs at once.
The required PR result waits for every test job and the shared checks. Local
cargo xtask pr runs the same checks and tests in sequence. Release validation
still runs the full suite on each supported target (#250).
PR validation checks toolkit Rust source tokens against
docs/features/safe-toolkits/unsafe-source-baseline.json when source, build
tooling or inventory inputs change. Unsafe removals must update that inventory;
increases require review against the temporary exception policy in AGENTS.md.
The check includes inactive platform code and macro definitions, but does not
expand macros or inspect dependencies. Compiler checks remain necessary (#81).
The safe-toolkit migration closeout records the accepted refactors, rejected performance trade-offs, and remaining unsafe code. This release does not claim a fully safe toolkit implementation.
The source code is licensed GPL-2.0-only (LICENSE-GPL). Official release
binaries downloaded from this repository whose files match a published hash are
also offered under the Apache License 2.0 (LICENSE-APACHE). Each binary
archive contains LICENSE-APACHE, and each source package contains
LICENSE-GPL. Source files carry no per-file copyright or license header.