goswinr/Euclid
66.6
Adequate · 3 October 2026
36.8k
lines of production code
F#
primary language
2
measurements over time
What this system is
Euclid is a .NET geometry library that provides immutable 2D and 3D primitives, including points, vectors, lines, planes, and various bounding box types. It offers core computational capabilities such as polyline offsetting, similarity comparison, and intersection detection, supported by a comprehensive set of extension methods for geometric operations. The system is designed for performance and correctness, featuring strict validation, JSON serialization support, and extensive testing across .NET and JavaScript environments.
Features
Adds 2D and 3D polyline offsetting capabilities
The Euclid geometry library now includes core algorithms for offsetting 2D and 3D polylines, implemented in the new \Offset2D\ and \Offset3D\ modules. These additions allow users to generate parallel copies of polyline geometries, with configurable handling for edge cases such as U-turns (via \Fail\, \Chamfer\, or \UseThreshold\ strategies in 2D) and collinear segments with varying distances (via \Fail\, \Skip\, \Proportional\, \Project\, or \StepWithTwoPoints\ strategies). The 3D implementation computes local vertex normals to define offset planes for each joint. Additionally, a \Polylabel\ module has been added to support finding the largest empty circle within a polygon, and \Similarity2D\ provides utilities for comparing 2D point clouds for geometric similarity.
Euclid · high confidence
Introduction of new 2D and 3D geometry primitives and bounding types
The library now includes new immutable structs for 2D and 3D bounding boxes (\BRect\, \BBox\), an arbitrary 3D box (\FreeBox\), and a standard 3D box with orthogonal axes (\Box\). Additionally, new finite line types \Line2D\ and \Line3D\ are introduced to represent segments in 2D and 3D space. These types are designed for performance with inlinable constructors and include built-in validation for NaN/Infinity values when compiled in DEBUG mode or with the \CHECKED\_EUCLID\ symbol. The implementation also adds support for \System.Text.Json\ serialization for these new types and provides a robust error handling module (\EuclidErrors\) with specific exception types for geometry failures.
Src · high confidence
New Claude Code configuration and automation hooks
Added a new \.claude\ directory containing configuration files, custom commands, and hooks to enhance the development workflow. A \SessionStart\ hook automatically installs the .NET SDK 10.0 in cloud containers and restores dependencies, ensuring builds and tests are ready immediately upon session start. Custom commands (\checkFile\, \checkTests\, \checkTransformMethods\, \standards\) provide structured workflows for validating docstrings, verifying test coverage, auditing transformation method consistency, and loading project coding standards. Additionally, project memory files capture specific testing guidelines, such as using off-origin and rotated geometry shapes to expose translation and rotation bugs.
.claude · high confidence
New geometry extension members for 2D/3D lines, points, planes, and vectors
The Src/TypeExtensions area now provides a comprehensive set of extension members for core geometry types, auto-opened when the Euclid namespace is used. Line2D and Line3D gain axis-alignment checks (IsXAligned, IsYAligned, IsZAligned/IsVertical, IsHorizontal), zero-length and tiny-line detection, parameterized evaluation (EvaluateAt), segment extraction (Segment/SubLine), length calculations relative to parameters, midpoint retrieval, reversal, and extension. PPlane adds signed and absolute distance-to-point methods, point parameterization, closest-point and closest-parameter retrieval, angle checks against other planes, vectors, and lines, and coincidence testing with configurable tolerances. Pnt and Pt (2D) receive validity checks (IsInvalid/IsValid), origin checks, immutable coordinate setters (WithX/WithY/WithZ), distance and squared-distance calculations, and conversion helpers to vectors and other point types. UnitVc and UnitVec provide cross/dot products, rotation by angle or precomputed Rotation2D, 90-degree rotations, and conversions to points/vectors. Quaternion gains creation from Matrix and RigidMatrix. Matrix gains creation from RigidMatrix. These additions expand the available geometric operations without changing existing type definitions.
Src/TypeExtensions · high confidence
Behavioural changes
Library renamed to Euclid with comprehensive API and documentation overhaul
The project has been renamed from FsEx.Geo to Euclid, accompanied by a major release (0.52.0) that introduces significant API changes and new capabilities. Key updates include replacing \set\-prefixed non-mutating members with \with\-prefixed equivalents (e.g., \withStart\, \withOrigin\) to clarify immutability, adding camera matrix constructors (\createPerspectiveAlongNegZ\, \createLookAt\), and enhancing Polyline3D with planarity checks and average normal calculations. The library now supports System.Text.Json, enforces stricter validation via the \CHECKED\_EUCLID\ compiler flag, and standardizes naming conventions (e.g., \xAxisUnit\). Documentation has been expanded with comprehensive examples, and packaging fixes ensure source files are correctly included in NuGet packages.
(repo-wide) · high confidence
Test coverage
Added Rhino integration test scripts for geometry operations; Added performance benchmarks and test data for geometry algorithms.
Dependencies
Update test dependencies and project structure
The test project now targets .NET 10.0 and uses TypeScript 7.0.2 for Fable-based JavaScript testing. The main library project targets .NET 6.0 and .NET Framework 4.7.2, with System.Text.Json pinned to version 4.6.0 for the 4.7.2 target. Build tooling includes Microsoft.SourceLink.GitHub 10.0.400 and Ionide.KeepAChangelog.Tasks 0.3.3.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 67 → 67 (-0.6)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 72 → 71 (-1.2)
- Architecture 92 → 96 (+3.9)
- Maturity 62 → 62 (+0.1)
- Readiness 69 → 66 (-2.5)
- Security 73 → 73 (+0.0)
Resolved (4)
- Documentation: no installation or build instructions (README.md)
- Duplicated block (3–11 lines × 3) (Src/Matrix.fs)
- Duplicated block (6–8 lines × 2) (Src/Polyline2D.fs)
- Members sharing a duplicated core (4 members, 50+ identical tokens) (Src/TypeExtensions/UnitVc.fs)
New (17)
- BBox.IntersectPlane (cognitive 51) (Src/BBox.fs)
- BBox.IntersectPlane (cyclomatic 34) (Src/BBox.fs)
- Box.IntersectPlane (cognitive 40) (Src/Box.fs)
- Box.IntersectPlane (cyclomatic 23) (Src/Box.fs)
- Box.tryGetBoxBetween (cognitive 25) (Src/Box.fs)
- Box.tryGetBoxBetween (cyclomatic 25) (Src/Box.fs)
- Deprecated: System.Text.Json
- Documentation: no project overview (README.md)
- Duplicated block (13–19 lines × 2) (Src/BBox.fs)
- Duplicated block (6 lines × 2) (Src/BBox.fs)
- Duplicated block (6–8 lines × 2) (Src/Polyline2D.fs)
- Duplicated block (7 lines × 2) (Src/BBox.fs)
- Duplicated block (7–15 lines × 2) (Src/XLine2D.fs)
- Duplicated block (8 lines × 2) (Src/Box.fs)
- Members sharing a duplicated core (4 members, 50+ identical tokens) (Src/TypeExtensions/UnitVc.fs)
- Outdated: Ionide.KeepAChangelog.Tasks
- XLineXYZ.sqDistance (cognitive 20) (Src/XLine3D.fs)
Changes since last survey
- 7 commits — 5 feature/other, 2 fixes
By area
- (repo) — 1 commit
- (root) — 1 commit
- .config/dotnet-tools.json — 1 commit
- Src/EuclidErrors.fs — 1 commit
- Src/XLine2D.fs — 1 commit
- Src/XLine3D.fs — 1 commit
- Test/TestInRhino — 1 commit
Notable commits
- fix: Fix squared distance for nearly parallel 2D segments
- fix: Fix squared distance for nearly parallel 3D segments
- change: Add camera view and perspective constructors
- change: Box & BBox.IntersectPlane
- change: Bump fable from 5.15.0 to 5.17.2
- change: Merge remote-tracking branch 'origin/claude/rename-set-to-with-prefix-epzkrx'
- change: test on Scriptorium
Architecture
- Unchanged — 0 containers · 2 contexts · 1 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
goswinr/Euclid was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit c1c927f56f93f13c2470b9d4c1079c7bb773e193 — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-4f4226d619ea.