GeometryHelper

Geometry for engineering drawings and models, in two dimensions and in three, plus the label placement library that runs on the 2D half and bridges that carry shapes in and out of Tekla Structures, AutoCAD and IFC models. Every comparison is tolerance-aware, because coordinates that come out of a BIM model are never exact.

dotnet add package GeometryHelper

Where to start

How do I a task, the call that does it, and the page that tells the rest
Shared types Tolerance, Angle, the enumerations, OffsetOptions, GeometryHelperLog
DXF reading, writing and editing DXF files with AutoCAD's classes and members, AutoCAD's patterns side by side; a drawing edited step by step and the points to check in AutoCAD
OpenCAD2D the CAD app built on this library, in a repository of its own: DXF and DWG opened, drawn and edited as AutoCAD does it, with AutoLISP, Python and plugins
Geometry in the plane points to polygons and faces; arcs, offsetting, combining regions
Meshing the plane triangles, grids of panels or tiles with joints and alignment, strips and convex pieces, edge to edge
Geometry in space points to solids; splitting, boolean bodies, meshes, local frames
Meshing in space flat shapes of space in panels, tiles, strips and triangles; bodies and boxes cut into blocks, bays and lifts; the cases, drawn and checked
Label placement labels placed greedily, clear of each other and of blocked regions
Packing boxes onto sheets drawing views onto A0 to A4 sheets or sheets of a size of their own, a new sheet when one is full
AutoCAD both ways with AutoCAD, arcs and bulges included
Tekla Structures both ways with Tekla, and IFC reference models
IFC IFC models into solids, through xBIM
API Reference every type and member of all four, from the XML documentation

A first look

using GeometryHelper;
using GeometryHelper.Enums;
using GeometryHelper.Geometry;
using GeometryHelper.Core;

// A slot: two straight sides and a half circle at each end, held the way a drawing holds it.
var slot = new GeoPolygonArc2(
    new[] { new GeoPoint2(0, 0), new GeoPoint2(200, 0), new GeoPoint2(200, 50), new GeoPoint2(0, 50) },
    new[] { 0.0, 1.0, 0.0, 1.0 });

slot.Area;                          // exact, counting what each arc adds beyond its chord
slot.Contains(new GeoPoint2(215, 25));   // true — the round end reaches past the chord

// Offsetting keeps the arcs: a round end of 25 grows to 45, about the same centre.
GeoPolygonArc2 grown = slot.Offset(20.0)[0];

// The booleans cannot, and say so by handing back the straight type.
var opening = new GeoPolygon2(new GeoPoint2(80, 15), new GeoPoint2(120, 15),
                              new GeoPoint2(120, 35), new GeoPoint2(80, 35));

GeoFace2[] pierced = slot.Subtract(opening);

The packages

Package What it is
GeometryHelper the geometry itself, 2D and 3D, and the label placement algorithms
GeometryHelper.CadConvert both ways with AutoCAD, arcs and bulges included
GeometryHelper.TeklaConvert.2020 · 2025 · 2026 both ways with Tekla Structures, one package per version
GeometryHelper.IfcConvert IFC models into solids, through xBIM

The library targets netstandard2.0 and depends on no other package. Clipper2 (Boost Software License), which resolves its regions in the plane, is compiled in.