Gravicode.CAD.Constraint 1.1.0

Prefix Reserved
dotnet add package Gravicode.CAD.Constraint --version 1.1.0
                    
NuGet\Install-Package Gravicode.CAD.Constraint -Version 1.1.0
                    
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="Gravicode.CAD.Constraint" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Gravicode.CAD.Constraint" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Gravicode.CAD.Constraint" />
                    
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 Gravicode.CAD.Constraint --version 1.1.0
                    
#r "nuget: Gravicode.CAD.Constraint, 1.1.0"
                    
#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 Gravicode.CAD.Constraint@1.1.0
                    
#: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=Gravicode.CAD.Constraint&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Gravicode.CAD.Constraint&version=1.1.0
                    
Install as a Cake Tool

<p align="center"><img src="assets/icon-128.png" width="96" alt="Gravicode.CAD icon" /></p>

<h1 align="center">Gravicode.CAD</h1>

<p align="center"><b>Enterprise-grade CAD, Geometry, Parametric Modeling, Rendering, Simulation, Interoperability, and AI-CAD Framework for .NET</b></p>

<p align="center">.NET 10 · C# 14 · Rust native engine · MIT<br/> <i>Made by Gravicode Studios, led by Kang Fadhil</i></p>

<p align="center"><a href="README.id.md">🇮🇩 Baca dalam Bahasa Indonesia</a></p>

Gravicode.CAD

Why

Gravicode.CAD gives .NET developers one coherent toolkit for the whole CAD pipeline — model, constrain, analyse, manufacture, exchange and render — without leaving C#. It runs anywhere .NET 10 runs (servers, desktop, mobile, the browser through Blazor) and drops into Rust for the hot paths.

var model = Part.Create("Bracket")
    .Param("w", 120).Param("t", 10)
    .Box("w", 80, "t")
    .Holes(8.5, (-48, -28), (48, -28), (-48, 28), (48, 28))
    .Build();

model.Save("bracket.step");                 // STEP AP214
model.ExportStl("bracket.stl");             // binary STL
model.ExportPdf("bracket.pdf");             // 4-view engineering drawing
SoftwareRenderer.RenderToPng(model, "bracket.png");
var model = StepImporter.Import("part.step");   // or CadModel.Load("engine.step")
model.ExportStl("part.stl");

Features

Area What you get
Geometry Double-precision Vec2/Vec3/Mat4, lines, arcs, Bézier, exact rational NURBS, helices; polygons with offsets; ear-clipping triangulation with holes; box/cylinder/cone/sphere/torus/tube; extrude (with twist & draft), revolve, loft, sweep (rotation-minimising frames); involute spur gears
Booleans BSP-tree CSG union / subtract / intersect with automatic T-junction repair → watertight results
Topology Half-edge structure, watertight / manifold / orientation checks, Euler characteristic & genus, shells, boundary loops, feature edges, B-Rep-lite planar/curved face recovery
Parametric Expression-driven parameters ("w/2 + 5"), JSON feature tree (box, cylinder, cone, sphere, torus, tube, extrude, revolve, loft, sweep, gear, hole + counterbore, linear/grid/circular pattern, mirror), rebuild with per-feature log, fluent CadQuery/Build123D-style Part builder
Constraints 2D sketches with 16 constraint types solved by Levenberg–Marquardt; degrees-of-freedom report; sketch → profiles → solids
Interop STEP (read advanced B-Rep with planes/cylinders/cones + B-spline/circle edges + colours; write AP214), IGES, STL, OBJ+MTL, glTF/GLB, 3MF, DXF (bulges, blocks, polyface), SVG, PDF drawings with hidden-line removal. DWG gives conversion guidance
Rendering Dependency-free multi-threaded software renderer → PNG; three.js <CadViewer> for Blazor; ThreeNet (DirectX 12 / Metal / Vulkan) adapter for desktop; WPF & WinForms viewports
Simulation Linear static FEM: 2D/3D trusses, plane-stress CST with von Mises, 2D heat conduction, Delaunay mesher, sparse PCG solver, colour-mapped result models
Manufacturing Contour with tool compensation, zig-zag pocketing with islands, peck drilling, FDM slicer (perimeters + infill), G-code for GRBL / Marlin / LinuxCNC with time estimates
AI-CAD Text → validated parametric part with a self-repair loop. Claude (claude-opus-5-5 via the official Anthropic SDK), any OpenAI-compatible endpoint (Azure OpenAI, DeepSeek, Hugging Face router) or a fully offline interpreter (English + Bahasa Indonesia)
Native engine Rust gravicode-cad-engine (C ABI): mass properties (multi-threaded), normals, welding, slicing — parity-tested with the C# kernels, automatic managed fallback

Packages

Package Purpose
Gravicode.CAD.Core Math, meshes, CadModel, format registry
Gravicode.CAD.Geometry Curves, triangulation, primitives, sweeps, CSG
Gravicode.CAD.Topology Half-edge analysis, B-Rep-lite
Gravicode.CAD.Parametric Parameters, feature tree, Part builder
Gravicode.CAD.Constraint 2D sketch solver
Gravicode.CAD.IO STEP, IGES, STL, OBJ, glTF, 3MF, DXF, SVG, PDF
Gravicode.CAD.Native Rust engine bindings
Gravicode.CAD.Rendering Software renderer, cameras, interactive view logic
Gravicode.CAD.ThreeJs Blazor <CadViewer> (three.js)
Gravicode.CAD.ThreeNet Desktop GPU rendering via ThreeNet
Gravicode.CAD.Viewer.Wpf / .WinForms Viewport controls
Gravicode.CAD.FEM Finite element analysis
Gravicode.CAD.CAM Toolpaths, slicer, G-code
Gravicode.CAD.AI Text-to-CAD agent
gravicode-cad gcad command-line tool
Gravicode.CAD.Templates dotnet new templates

CLI

dotnet tool install -g gravicode-cad
gcad convert model.step model.stl
gcad info gear.step
gcad render bracket.step bracket.png --view iso
gcad drawing bracket.step bracket.pdf
gcad slice part.stl part.gcode --infill 0.2
gcad generate "Create a gearbox housing with four mounting holes" -o out

Templates

dotnet new install Gravicode.CAD.Templates
dotnet new cad-console -n MyPart      # also: cad-webapi cad-blazor cad-wpf cad-winforms cad-avalonia cad-maui

Gravicode CAD Studio

A full CAD designer built on the library — AutoCAD-style command line, ribbon, layers, snaps and grips, 2D drafting with TRIM/EXTEND/FILLET/CHAMFER and true arc polylines, hatches, blocks, paper-space layouts with viewports and PLOT to scaled PDF/SVG sheets, 3D solids with booleans, picking and move/rotate/scale gizmos, sketch-on-face (extrude adds or cuts) and editable parametric history, 8 templates and 18 samples from 17 industries. Two editions, one engine:

Web (Blazor) Desktop (Avalonia + ThreeNet)
Studio web Studio desktop
Studio web start Studio desktop samples
Studio drafting Studio grips
Studio history Studio layout
dotnet run --project studio/Gravicode.CAD.Studio.Web        # http://localhost:5190
dotnet run --project studio/Gravicode.CAD.Studio.Desktop

Installers (Windows setup, Linux .deb, macOS .dmg, plus web-server zips) are on the releases page. Guide: docs/en/Studio.md.

Eighteen runnable samples — every one shows its code, its properties and downloads in nine formats.

Web (Blazor + three.js) Desktop (Avalonia + ThreeNet)
Blazor gallery Avalonia gallery
dotnet run --project gallery/Gravicode.CAD.Gallery.Web       # http://localhost:5180
dotnet run --project gallery/Gravicode.CAD.Gallery.Desktop

Text to CAD

Architecture

Applications ── WPF · WinForms · Blazor · ASP.NET Core · Console · MAUI · Avalonia
      │
Gravicode.CAD SDK ── Parametric · Constraint · FEM · CAM · AI · IO · Rendering
      │
High-level CAD API ── Geometry (curves, sweeps, CSG) · Topology (half-edge, B-Rep-lite)
      │
Rust native engine ── gravicode-cad-engine (C ABI, IMeshKernel)
      │
CAD kernel ── Core (double-precision math, meshes, CadModel)

See docs/en/Architecture.md.

Documentation

English Bahasa Indonesia
Getting started Memulai
Architecture Arsitektur
Geometry Geometri
Rendering Rendering
ThreeNet ThreeNet
Three.js Three.js
AI AI
CLI CLI
Templates Template
CAD Studio CAD Studio

Roadmap: PLAN.md · Status: Progress.md

Building from source

dotnet build Gravicode.CAD.slnx
dotnet test tests/Gravicode.CAD.Tests
dotnet test tests/Gravicode.CAD.Studio.Tests
./build-native.ps1              # optional: rebuild the Rust engine (cargo)

Credits

Made by Gravicode Studios, led by Kang Fadhil. Released under the MIT licence.

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
1.1.0 6 11/11/2026
1.0.1 39 11/11/2026
1.0.0 47 11/11/2026