Build123d 0.1.0-preview.3

This is a prerelease version of Build123d.
dotnet add package Build123d --version 0.1.0-preview.3
                    
NuGet\Install-Package Build123d -Version 0.1.0-preview.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Build123d" Version="0.1.0-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Build123d" Version="0.1.0-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="Build123d" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Build123d --version 0.1.0-preview.3
                    
#r "nuget: Build123d, 0.1.0-preview.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Build123d@0.1.0-preview.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Build123d&version=0.1.0-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Build123d&version=0.1.0-preview.3&prerelease
                    
Install as a Cake Tool

build123d.NET

A .NET 10 port of build123d, the Python CAD library built on OpenCascade (OCCT). Work in progress. See docs/design.md for the design and the phase plan.

Building and testing

Build123d runs on OCCT.NET, the managed C# port of OCCT, with no native libraries. OCCT.NET comes from its packages on nuget.org (OcctNet.Foundation, OcctNet.ModelingData, OcctNet.ModelingAlgorithms, OcctNet.DataExchange, at the version OcctNetVersion in Directory.Build.props), so a fresh clone needs only the .NET 10 SDK:

dotnet test

To work on build123d.NET and OCCT.NET together, point OcctNetRoot at an OCCT.NET checkout, and Build123d.OcctNet references its projects in place of the packages:

dotnet test -p:OcctNetRoot=C:/src/OCCT.NET/

The native backend, Build123d over native OCCT through the b3docct shim, is opt-in with -p:Build123dBackend=Native, and needs the native build below. It is the reference OCCT.NET's oracle tests compare against, and is no longer published. Each backend builds into folders of its own, so the two sit side by side: the default into bin and obj, native into bin-native and obj-native. Build123dNativeRoot takes the native build from another checkout (a worktree, say) in place of this one's.

Building the native dependencies (native backend)

OCCT 8.0 and FreeType are built from source by a CMake superbuild in native/occt. The result lands in .deps/install/<rid>.

Requirements: CMake ≥ 3.24 and Ninja. Windows also needs Visual Studio 2022 with the C++ tools. Linux also needs libfontconfig1-dev.

If CMake or Ninja aren't on your PATH, install them into a project-local venv. The Windows script picks them up from there automatically:

python -m venv .deps/tools
.deps/tools/Scripts/python -m pip install cmake ninja   # bin/ instead of Scripts/ on Linux/macOS

Then build:

./native/build-deps.ps1                  # Windows, win-x64 by default
./native/build-deps.sh                   # Linux/macOS, host runtime by default

Building the bindings

The OCCT bindings are generated from the whitelist bindings/occt.txt. The generated C++ and C# are committed, so you only need to regenerate after editing the whitelist:

./tools/generate-bindings.ps1            # parses the OCCT headers from .deps/install

Build the native shim (b3docct), then the .NET solution on the native backend:

./native/build-shim.ps1                  # Windows; ./native/build-shim.sh <rid> on Linux/macOS
dotnet test -p:Build123dBackend=Native

tests/Build123d.Occt.Tests, the binding's own tests, runs on the native backend only; dotnet test skips it on OCCT.NET.

Build123d.Occt copies the OCCT, FreeType and shim libraries for the host runtime into the output directory of anything that references it.

Packages

Build123d and Build123d.OcctNet are published on OCCT.NET, packed with OCCT.NET's packages by OCCT.NET's tools/pack-nuget.ps1. The native backend is no longer published, and its projects aren't packable on their own. tools/pack.ps1 still packs it, for its load-context test:

./tools/pack.ps1                         # Windows x64; versioned 0.1.0-native by default

This writes the native Build123d and Build123d.Occt to the local folder feed artifacts/packages. Build123d.Occt carries the shim, plus only the OCCT and FreeType libraries the shim depends on, flat under runtimes/win-x64/native. The script then runs tests/Build123d.Packaging.Tests. That test unpacks the packages into a folder of their own and loads them through a collectible AssemblyLoadContext, as Bento's extensions are loaded. Inside that context it makes and tessellates a box on a background thread, checks the native libraries came from that folder, and checks the context unloads. The test needs the packages (B3D_PACKAGES, which the script sets), so it isn't part of the solution's dotnet test, and skips without them. Changes are listed in CHANGELOG.md, and the shipped native code's licences in THIRD-PARTY-NOTICES.md.

The OCCT.NET backend

The default backend (see "Building and testing"). OCCT.NET's phase 7 brings 3D fillets, chamfers, offsets, drafts and BRepFeat, and its phase 8 STEP, so every class is forwarded; STL, glTF and 3MF (Importers, Exporters3D) are OCCT.NET's only. The wrappers in src/Build123d.OcctNet/Generated are regenerated with ./tools/generate-occtnet.ps1 when the native bindings or OCCT.NET change. See docs/design.md, "The OCCT.NET backend".

Licence

Apache License 2.0, as build123d's (see LICENSE). The native libraries the packages ship are under their own licences: see THIRD-PARTY-NOTICES.md.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.3 60 11/2/2026
0.1.0-preview.2 63 11/2/2026