Build123d 0.1.0-preview.2

This is a prerelease version of Build123d.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Build123d --version 0.1.0-preview.2
                    
NuGet\Install-Package Build123d -Version 0.1.0-preview.2
                    
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.2" />
                    
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.2" />
                    
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.2
                    
#r "nuget: Build123d, 0.1.0-preview.2"
                    
#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.2
                    
#: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.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Build123d&version=0.1.0-preview.2&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 the native dependencies

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:

./native/build-shim.ps1                  # Windows; ./native/build-shim.sh <rid> on Linux/macOS
dotnet test

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

Packages

./tools/pack.ps1                         # Windows x64; -VersionSuffix preview.1 for a pre-release

This writes 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, so it isn't part of the solution's dotnet test. Changes are listed in CHANGELOG.md, and the shipped native code's licences in THIRD-PARTY-NOTICES.md.

The OCCT.NET backend (spike)

Build123d can also run on OCCT.NET, the managed C# port of OCCT, with no native libraries. The native backend stays the default. To build and test on OCCT.NET, point OcctNetRoot at an OCCT.NET checkout (by default ../OCCT.NET beside this repository):

dotnet test tests/Build123d.Tests -p:Build123dBackend=OcctNet -p:OcctNetRoot=C:/src/OCCT.NET/

Each backend builds into folders of its own (bin-occtnet, obj-occtnet), so the two don't mix. 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