-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Phil Stopford edited this page Sep 6, 2025
·
2 revisions
Welcome to the comprehensive API documentation for DesignLibs_GPL, a collection of .NET 8.0 C# libraries for geometric design, mathematical operations, and graphics applications.
DesignLibs_GPL comprises a multitude of libraries primarily built for use by the Variance and Quilt tools. These libraries provide essential functionality for:
- Geometric Operations: Basic primitives, transformations, analysis, and layout file format support
- Mathematical Functions: Random number generation, noise functions, and mathematical parsing
- Graphics and UI: Cross-platform viewport libraries and error handling
- Utility Functions: Collections, data structures, and general-purpose utilities
- geoLib - Basic geometric primitives (points, arrays, matrices, rectangles)
- geoCore - GDSII and Oasis file format parsing and writing
- geoWrangler - Geometry transformations, raycasting, fragmentation, and decimation
- shapeEngine - Shape generation and manipulation (rectangles, L-shapes, T-shapes, etc.)
- clipper - Advanced polygon clipping operations (Clipper2 C# port)
- LibTessDotNet - Triangle tessellation for complex polygons
- MersenneTwister - High-quality pseudorandom number generation
- entropyRNG - Thread-safe RNG system with entropy collection
- Noise - Perlin, Simplex, and OpenSimplex noise functions
- info.lundin.math - Mathematical expression parser and evaluator
- Eto.VeldridSurface - Cross-platform 2D viewport for end-user applications
- errorReporter - Cross-platform error handling and reporting
- Color - Color representations for viewports and graphics
- utility - General purpose utilities (compression, hashing, mathematical operations)
- MiscUtil - Collections, ranges, and utility functions
- KDTree - Spatial data structure for efficient nearest-neighbor searches
- SVGBuilder - SVG creation and manipulation utilities
- Email - Email functionality and utilities
- LHC - Specialized computational library
- Tral.Randomness - Additional randomness and statistical utilities
This comprehensive wiki provides detailed API documentation for the core DesignLibs_GPL libraries:
- geoLib - Basic geometric primitives with cross-platform compatibility
- geoCore - GDSII and Oasis file format parsing and writing
- geoWrangler - Advanced geometry transformations and operations
- shapeEngine - Parametric shape generation (rectangles, L-shapes, T-shapes, etc.)
- utility - Mathematical utilities, hashing, compression, and performance optimization
- clipper - Advanced polygon clipping operations (Clipper2 C# port)
- MersenneTwister - High-quality pseudorandom number generation
- Noise - Perlin, Simplex, and OpenSimplex noise functions
- Eto.VeldridSurface - Cross-platform 2D graphics viewport
Each documentation includes:
- 📋 Complete API reference with all classes, methods, and properties
- 💡 Comprehensive usage examples and code samples
- 🔗 Integration examples with other DesignLibs libraries
- ⚡ Performance optimization guidelines
- 🛡️ Error handling and best practices
- 📚 Cross-references to related libraries
- .NET 8.0 SDK or later
- Compatible operating system (Windows, Linux, macOS)
# Clone the repository
git clone https://github.com/philstopford/DesignLibs_GPL.git
cd DesignLibs_GPL
# Restore dependencies
dotnet restore
# Build core libraries
dotnet build UnitTests/UnitTests.csproj
# Run tests to validate functionality
dotnet test UnitTests/UnitTests.csproj
# Run example application
dotnet run --project HistoTest/HistoTest.csprojusing geoLib;
using geoWrangler;
using Clipper2Lib;
// Create basic geometric shapes
var rectangle = GeoWrangler.rectangle(100, 50, 10, 10); // width, height, x_offset, y_offset
var circle = GeoWrangler.ellipse(25, 25, 50, 50, 32); // rx, ry, cx, cy, resolution
// Perform boolean operations
var union = Clipper.Union(new PathsD { rectangle, circle }, FillRule.NonZero);
// Transform geometry
var rotated = GeoWrangler.rotate(union, 45.0); // rotate by 45 degrees
var translated = GeoWrangler.move(rotated, 100, 100); // translate by (100, 100)- Most libraries use integer coordinates for precision (Point64, PathD with scaling)
- Floating-point operations are provided where necessary (PointD)
- GDSII/Oasis files use database units for precise manufacturing requirements
- Many libraries are designed for multi-threaded environments
- Random number generators provide thread-safe implementations
- Geometric operations can be parallelized where appropriate
- Integer-based geometry avoids floating-point precision issues
- Optimized algorithms for polygon operations and spatial queries
- Memory-efficient data structures for large datasets
This project follows semantic versioning and welcomes contributions. Please ensure:
- All changes include appropriate unit tests
- Documentation is updated for new features
- Code follows the established patterns and style
DesignLibs_GPL is released under the GPLv3 license. See the LICENSE file for full details.