import { query_edge_is_boundary } from "./query_edge_is_boundary.js";

/**
 * Determines whether vertex is part of the topology outline (outer edge)
 * @param {TopoVertex} vertex
 * @returns {boolean}
 */
export function query_vertex_is_boundary(vertex) {
    const edges = vertex.edges;

    const n = edges.length;
    for (let i = 0; i < n; i++) {
        const edge = edges[i];

        if (query_edge_is_boundary(edge)) {
            return true;
        }
    }

    return false;
}
