TilingLattice
Largest parallelogon contained in a tiling (ADR-0015) and the translation-lattice detection it builds on.
Public API (extensions on TilingDCEL): largestContainedParallelogon (ordered corner vertices, the headline query) and translationLattice (the reduced primitive basis). The block view (cell dimensions
- area) behind the corners is kept package-private until a consumer needs it.
Detects the primitive translation lattice {v, w} of a finite periodic patch from its interior structure. Vertices are typed by an orientation-aware signature (the sorted directions to their neighbours), then the lattice is read off the single most populous signature class — one translation orbit, whose pairwise differences are exactly the period lattice. This is robust to a handful of welded foreign faces (they form minority classes and stay invisible) and naturally excludes cross-orientation vectors (e.g. between 6.6.6's two [6,6,6] sublattices). A candidate is kept only if it has enough overlap with the patch, ruling out large vectors with little genuine support.
Candidates are validated structurally over the whole interior (signature-preserving on the overlap, a few welded-face defects tolerated), and the result is Lagrange–Gauss reduced to a canonical primitive basis.
Residual assumption: a vertex is typed only by its first neighbour ring, so two distinct translation orbits that happen to share a first-ring signature would be conflated. Regular tilings (3⁶, 4⁴, 6⁶, 4.8.8, …) do not exhibit this; a deeper (second-ring) signature would generalise it.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TilingLattice.type