Skip to content

Geometry is a c# library for the creation, and manipulation of 3d geometry

License

Notifications You must be signed in to change notification settings

qkmaxware/Geometry

Repository files navigation

C# Geometry

For usage information, tutorials, and more see the documentation at qkmaxware.github.io.

Build Status

Getting Started

The library is available as a NuGet package for any .Net implementation that supports the .Net Standard 2.0. Visit the Packages page for downloads.

Primitive Geometry

Geometry in this library is modeled as a collection of triangular faces whose vertices are points in 3d space. There are some handy utility classes which can be used to generate specific primitive geometric shapes as described below.

Name Shape Image
Plane Flat planar face in the XY plane
Cube 6 sided cube
Cylinder Solid cylinder with configurable radii
Tube Hollowed out cylinder with an inner and outer radius
Capsule Cylinder capped with two hemispheres
Cone Cone with a given radius
Sphere UV sphere
Hemisphere Half of a sphere
Torus Torus with configurable radii
Frustum Pyramidal Frustums
Nosecone Varieties of aerodynamic nosecones
Arrow Vertically pointing arrow
TextMesh String to mesh based on 3d font character set
Default font based on Blender3D's BFont.

Transformations for Building Geometries

Name Effect Result
Difference Subtract one solid from another
Union Combine 2 solids into a single solid
Intersection Form a new block from where two blocks overlap

Importing and Exporting Geometries

The core library supports importing and exporting geometry from several different 3d model file formats. All classes related to importing and exporting can be found within the Qkmaxware.Geometry.IO namespace.

Polygonal Geometry

Format Extension Import Binary Import Ascii Export Binary Export Ascii
Stereolithography CAD .stl
Wavefront Object .obj
Extensible 3D Graphics .x3d
3D Printer GCode .gcode

NURBS Geometry

Format Extension Import Export
Step .stp, .step

Made With

License

See License for license details.