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

/**
 *
 * @param {TopoMesh} mesh
 * @param {TopoEdge} edge
 */
export function tm_kill_only_edge(mesh, edge) {
    assert.equal(edge.isTopoEdge, true, "e.isTopoEdge !== true");

    // validate that the edge does not have any live back links
    // const vertices = this.vertices;
    // const vertex_count = vertices.length;
    // for (let i = 0; i < vertex_count; i++) {
    //     const v = vertices[i];
    //
    //     if (v.containsEdge(e)) {
    //         // live link to edge
    //         debugger;
    //     }
    // }
    //
    // const faces = this.faces;
    // const face_count = faces.length;
    // for (let i = 0; i < face_count; i++) {
    //     const face = faces[i];
    //
    //     if (face.containsEdge(e)) {
    //         // live link to face
    //         debugger;
    //     }
    // }

    mesh.__edges.delete(edge);
}
