geop_core_topology/boundary.rs
1use crate::{CoedgeId, VertexId};
2
3#[derive(Clone, Copy, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
4pub enum BoundaryType {
5 /// A boundary defined by a single vertex — no edge exists yet.
6 Vertex(VertexId),
7 /// A boundary defined by a starting edge loop.
8 Loop(CoedgeId),
9}
10
11/// Which of a face's boundaries: its one outer loop, or the `n`-th hole.
12///
13/// A face's boundaries are not interchangeable — the outer loop bounds the
14/// material and every hole removes from it — so code that locates a boundary
15/// says *which kind* it found rather than returning a bare index into one
16/// flat list. That distinction is exactly what `splice_edge_into_face` needs
17/// to decide whether joining two loops merges two holes, absorbs a hole into
18/// the outer loop, or splits the face in two.
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20pub enum BoundaryIndex {
21 Outer,
22 Hole(usize),
23}