io.github.scala_tessella.dcel
Members list
Packages
Type members
Classlikes
The error category carries its own user-facing label and the factory that builds the corresponding TilingError from a message string. NotFoundError is intentionally excluded: it carries two fields and does not fit the single-string factory shape used by TilingError.combineErrors.
The error category carries its own user-facing label and the factory that builds the corresponding TilingError from a message string. NotFoundError is intentionally excluded: it carries two fields and does not fit the single-string factory shape used by TilingError.combineErrors.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
An interior angle is invalid (e.g. a full circle on a single edge) or an angle vector — for an inner face, for the boundary's interior view, for the boundary's exterior view, or around an interior vertex — does not close to a valid simple polygon or to 360°. Surfaced by the geometry stage of TilingValidation.validate.
An interior angle is invalid (e.g. a full circle on a single edge) or an angle vector — for an inner face, for the boundary's interior view, for the boundary's exterior view, or around an interior vertex — does not close to a valid simple polygon or to 360°. Surfaced by the geometry stage of TilingValidation.validate.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TilingErrorclass Objecttrait Matchableclass AnyShow all
A vertex, half-edge or face is missing required state (e.g. a vertex without a leaving edge, a half-edge without an incident face). Returned by the completeness stage of TilingValidation.validate; on failure, the later checks are not run.
A vertex, half-edge or face is missing required state (e.g. a vertex without a leaving edge, a half-edge without an incident face). Returned by the completeness stage of TilingValidation.validate; on failure, the later checks are not run.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TilingErrorclass Objecttrait Matchableclass AnyShow all
A lookup by VertexId or FaceId did not match any entity in the tiling. Carries the queried entity label (e.g. "Vertex") and the id string for structured matching.
A lookup by VertexId or FaceId did not match any entity in the tiling. Carries the queried entity label (e.g. "Vertex") and the id string for structured matching.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TilingErrorclass Objecttrait Matchableclass AnyShow all
Coordinate-level conflict: the boundary is not a simple polygon, two vertices share a position, an edge is not of unit length, or two edges properly intersect. Surfaced by the spatial stage of TilingValidation.validate and by SimplePolygon.fromUntrusted when the candidate fails the sweep-line simplicity check.
Coordinate-level conflict: the boundary is not a simple polygon, two vertices share a position, an edge is not of unit length, or two edges properly intersect. Surfaced by the spatial stage of TilingValidation.validate and by SimplePolygon.fromUntrusted when the candidate fails the sweep-line simplicity check.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TilingErrorclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TilingAddition.type
Constructors for TilingDCEL instances. Two families:
Constructors for TilingDCEL instances. Two families:
- Single polygons. createRegularPolygon and createSimplePolygon produce a tiling whose only inner face is the given polygon.
- Lattices and rings. createTriangleNet, createRhombusNet, createHexagonNet, createHoledTriangleNet and createRing build edge-to-edge tilings of arbitrary size from unit-side regular pieces.
All constructors validate their inputs and return Either[TilingError, TilingDCEL] (regular polygon is the one exception: its construction cannot fail). The constructed tilings are guaranteed to satisfy the full DCEL invariants and pass TilingValidation.validate.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TilingBuilder.type
An edge-to-edge tessellation of unit-side polygons, modelled as a Doubly Connected Edge List (DCEL): each edge is represented by two oppositely oriented half-edges, and each half-edge knows its origin vertex, incident face, twin, predecessor and successor. The tiling has exactly one unbounded outerFace; all other faces are inner.
An edge-to-edge tessellation of unit-side polygons, modelled as a Doubly Connected Edge List (DCEL): each edge is represented by two oppositely oriented half-edges, and each half-edge knows its origin vertex, incident face, twin, predecessor and successor. The tiling has exactly one unbounded outerFace; all other faces are inner.
Construct via the companion's smart constructors (TilingDCEL.empty, TilingDCEL.createRegularPolygon, TilingDCEL.createSimplePolygon, TilingDCEL.fromUntrusted) or via TilingBuilder for lattices and rings. The primary constructor is private to enforce validation on untrusted input.
Mutating operations (maybeAddRegularPolygonToBoundary, maybeDeleteFace, …) return a fresh Either[TilingError, TilingDCEL] and operate on an internal deep copy — the original is never modified.
Value parameters
- halfEdges
-
All half-edges in the tiling (each edge appears twice, once per direction).
- innerFaces
-
The tiling's bounded interior faces.
- outerFace
-
The single unbounded outer face.
- vertices
-
All vertices in the tiling.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
TilingDCEL.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TilingDeletion.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TilingEquivalency.type
Failure outcome returned in the Left of any Either[TilingError, _] produced by the library.
Failure outcome returned in the Left of any Either[TilingError, _] produced by the library.
Errors fall into a small set of categories that signal what kind of invariant was broken:
- ValidationError — an operation precondition or argument is wrong (typical of
maybeAdd*/maybeDelete*calls), or TilingValidation.validate is reporting an aggregate failure of the topology / geometry / spatial checks. - IncompleteError — a vertex, half-edge or face has unset or inconsistent internal state.
- TopologyError — half-edge linkage (twin / next / prev / incident-face) or a face cycle is broken, or a deletion would partition the tiling.
- GeometryError — interior angles are invalid or the inner-face / boundary angle vector does not close to a simple polygon.
- SpatialError — coordinates conflict: two vertices share a position, an edge is not unit length, or two edges properly intersect.
- NotFoundError — a lookup by
VertexIdorFaceIdmatched no entity in the tiling.
All variants carry a human-readable message; NotFoundError additionally carries the queried entity type and id for structured matching. See TilingError.combineErrors for the helper used to fold multiple per-check messages into a single error of a chosen category.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class GeometryErrorclass IncompleteErrorclass NotFoundErrorclass SpatialErrorclass TopologyErrorclass ValidationErrorShow all
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
TilingError.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TilingSymmetry.type
Uniformity and gonality analysis for tilings, exposed as extension methods on TilingDCEL.
Uniformity and gonality analysis for tilings, exposed as extension methods on TilingDCEL.
The headline operation is the uniformity tree (TilingDCEL.uniformityTree / uniformityTreeUncompressed here): a hierarchical grouping of the tiling's inner vertices into equivalence classes based on the local DCEL structure around each vertex, refined at increasing vertex-distance. Two vertices end up in the same leaf iff their neighbourhoods are boundary-equivalent at every distance examined.
Related views:
- scanUniformityTree — a sequence of trees showing the progressive refinement at each depth (only depths that actually split a class are kept), useful for animation.
- gonalitySampleInnerVertexIds — one representative vertex per gonality class.
- TilingDCEL.gonalityTrees — the gonality slice of the uniformity tree.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TilingUniformity.type
Validation entry point for TilingDCEL instances. The public validate method runs the full pipeline; the per-stage helpers (validateCompleteness, validateTopologically, validateGeometrically, validateSpatially) are internal and called in sequence by validate but exposed here for library-internal reuse.
Validation entry point for TilingDCEL instances. The public validate method runs the full pipeline; the per-stage helpers (validateCompleteness, validateTopologically, validateGeometrically, validateSpatially) are internal and called in sequence by validate but exposed here for library-internal reuse.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TilingValidation.type
Half-edge linkage (twin / next / prev / incident-face) or a face cycle is broken, the outer face is unreachable, an inner face contains holes, or a deletion would partition the tiling into disconnected components. Surfaced by the topology stage of TilingValidation.validate and by maybeDelete* operations that would violate a topological invariant.
Half-edge linkage (twin / next / prev / incident-face) or a face cycle is broken, the outer face is unreachable, an inner face contains holes, or a deletion would partition the tiling into disconnected components. Surfaced by the topology stage of TilingValidation.validate and by maybeDelete* operations that would violate a topological invariant.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TilingErrorclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Operation precondition or argument failed, or TilingValidation.validate aggregated several underlying validation failures into a single error.
Operation precondition or argument failed, or TilingValidation.validate aggregated several underlying validation failures into a single error.
Typical sources: a maybeAdd* / maybeDelete* call where the named vertex is not on the boundary, an edge is missing its twin, or the requested action would otherwise violate a precondition. Also the category used by validate to wrap a "Multiple validation errors: …" message when more than one of the topology / geometry / spatial checks fails.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TilingErrorclass Objecttrait Matchableclass AnyShow all