Skip to main content

Crate axiolid_arrangement

Crate axiolid_arrangement 

Source
Expand description

Editable planar subdivision with persistent half-edge topology.

§What this is for

The axiolid-overlay crate answers “what is the union of these polygons” in one shot: polygons in, polygons out, no structure retained. That is the right shape for a query, and the wrong shape for editing. A caller who moves one vertex has to rebuild everything and then re-derive which output polygon corresponds to which input – identity is lost on every call.

This crate keeps the subdivision itself. Vertices, half-edges and faces have stable handles that survive edits, so “this face” means the same face before and after a vertex moves, and an edit touches only the affected neighbourhood instead of rebuilding the plane.

§Deliberately neutral

A planar arrangement is a general structure: it does not know about rooms, walls, storeys, or net floor area. Those are domain concepts and belong to the consumer that has the domain. This crate exposes faces, their boundaries, their areas, and their adjacencies; deciding that a particular face is a room is the caller’s judgement, made with information this crate does not have.

§Structure

Standard doubly-connected edge list. Each edge is two opposite half-edges; each half-edge knows its origin vertex, its twin, and the next half-edge around its face. A face is identified by any half-edge on its boundary. Walking next traverses a face’s boundary; walking twin/next traverses the edges around a vertex.

The unbounded outer region is a real face (Arrangement::outer_face), not a None. Making it explicit removes a special case from every traversal: “the face across this edge” always has an answer.

Structs§

Arrangement
A planar subdivision as a doubly-connected edge list.
ArrangementHealth
What an audit found.
Face
A region of the plane bounded by a cycle of half-edges.
FaceId
Stable handle into the arrangement’s face arena.
HalfEdge
One direction of an edge.
HalfEdgeId
Stable handle into the arrangement’s halfedge arena.
Vertex
A point in the plane, with one outgoing half-edge as an entry into the edges around it.
VertexId
Stable handle into the arrangement’s vertex arena.

Enums§

BuildError
Why an arrangement could not be built.
EditError
Why an edit was refused.