Logo
OpenSharpCAD • Parametric C# CADv0.0.1

Parametric CAD, written in C#

Design 3D printable parts, mechanical assemblies, and parametric models with familiar C# and .NET. OpenSharpCAD pairs the code-first workflow of OpenSCAD with Roslyn compilation and a hardware-accelerated 3D viewport.

Build & Publish workflow.NET 10C# 13Windows, macOS, and LinuxGitHub starsGitHub forks
Application screenshots

Code and geometry, side by side

View original assets
OpenSharpCAD main IDE with a C# editor, 3D viewport, and Problems panel
Main IDE & live viewportLive C# scripting and Roslyn compilation on the left; an interactive OpenGL 3D viewport, axis gizmo, and compiler status on the right.
OpenSharpCAD interactive Cheat Sheet and Reference window
In-app Cheat Sheet & ReferencePress F1 for categorized primitives, signatures, interactive previews, and one-click code insertion.
Key features

A programming language is a capable modeling tool

The README’s core CAD workflow, shaped into reusable building blocks.

CSG that reads like algebra

Build forms with natural C# operators: + for union, - for difference, and * for intersection.

Solids, sketches, and extrusions

Work from Box, Cylinder, Sphere, Torus, and Cone primitives, then create 3D bodies from 2D shapes with linear and rotational extrusions.

Parametric transformations

Translate, rotate, scale, and mirror geometry with constructor wrappers or fluent C# extension methods.

Live Roslyn compilation

Edit code and receive instant 3D preview updates, compiler diagnostics, and familiar C# tooling in the desktop IDE.

Topology-aware models

Use vertices, edges, corners, bounds, and anchor points to attach parts without manually calculating every coordinate.

Parametric animation

Animate models with the OpenSCAD-compatible $t variable, plus playback controls, FPS, and step settings.

CSG boolean math
var holesize = 4;

var box = new Box(12, 20, 20);
var rotated = new Rotate(box, x: MathHelper.DegreesToRadians(45));
var cylinder = new Cylinder(6, 20, 60);

Draw(box + rotated - cylinder);

var translated = new Translate(new Box(40, 10, 10), 0, holesize, holesize);
Draw(translated, RGB(80, 180, 255));

C# becomes the CAD language

OpenSharpCAD keeps the familiar code-first ideas of OpenSCAD while using C# language features, ordinary methods and classes, and the wider .NET ecosystem.

  • Use type-safe C# methods, classes, records, extension methods, and namespaces.
  • Compose boolean operations with the +, -, and * operators instead of nested blocks.
  • Use IntelliSense, parameter information, diagnostics, and a Problems panel while modeling.
  • Reuse libraries, test dimensional logic, and work with familiar .NET tools.
From the README

Model complex forms from simple solids

This OpenSCAD-logo example uses a sphere and three rotated cylinders. The C# implementation returns their difference as an ordinary function, ready to be reused elsewhere in a design.

Browse more code examples
logo.cs
CsgObject Logo(double size = 50.0, int fn = 100)
{
    double holeRadius = size / 4.0;
    var sphere = new Sphere(radius: size / 2.0);
    var cylZ = new Cylinder(radius: holeRadius, height: size * 1.25, sides: fn);
    var cylX = new Rotate(cylZ, y: MathHelper.DegreesToRadians(90));
    var cylY = new Rotate(cylZ, x: MathHelper.DegreesToRadians(90));

    return sphere - cylZ - cylX - cylY;
}

Draw(Logo(50), RGB(255, 170, 50));
Current GitHub release

Download OpenSharpCAD 0.0.1

Published October 20, 2026. Choose a packaged desktop build, or build from source for Linux and development workflows.

x64

Windows

OpenSharpCAD-win-x64.zip · 57.8 MB

Packaged 64-bit Windows desktop build from the current GitHub release.

Download .zip
Apple Silicon

macOS

OpenSharpCAD-osx-arm64.zip · 43.4 MB

Packaged desktop build for Apple Silicon Macs, including M-series processors.

Download .zip
Intel

macOS

OpenSharpCAD-osx-x64.zip · 45.2 MB

Packaged desktop build for Intel-based Macs.

Download .zip

Linux or development build?

Clone the repository with submodules, then build with .NET 10 and GLFW.

Build from source
Build from source

Set up a local development build

NuGet GLFW · Visual Studio 2022

Windows setup

Use the .NET CLI, or open OpenSharpCAD.sln in Visual Studio 2022, select OpenSharpCAD as the startup project, and press F5.

Prerequisite

Install the .NET 10 SDK before building OpenSharpCAD.

terminal
git clone --recursive https://github.com/roboter/OpenSharpCAD.git
cd OpenSharpCAD

dotnet build OpenSharpCAD/OpenSharpCAD.csproj
dotnet run --project OpenSharpCAD/OpenSharpCAD.csproj

Interactive documentation

Explore the Three.js documentation viewer, web API reference, and the in-app F1 cheat sheet.

Open documentation

Examples and tests

Browse standalone examples, command-line projects, API tests, and unit tests in the source tree.

Browse examples

Scripts are executable C#

Treat unknown CAD scripts with care. The README documents Roslyn guardrails and recommends isolating completely untrusted automation.

Read security notes

OpenSharpCAD is inspired by MatterCAD and built for a programmable, reusable approach to 3D design.

Read about the original MatterCAD project