Filter edges that are circular

I have the following code that can can detect edges in the shape:

  var loader = new ThreeMFLoader();
  loader.load('./model/part3mf.3mf', function (object) {
    edgeMaterial = new LineMaterial({ color: 0xff0000, linewidth: 5 });

    const meshes = [];
    object.traverse(function (child) {
      if (child.isMesh) meshes.push(child);
    });

    for (let mesh of meshes) {
      var edges = new THREE.EdgesGeometry(mesh.geometry, 45);
      var wideEdges = new LineSegmentsGeometry().fromEdgesGeometry(edges);

      var line = new LineSegments2(wideEdges, edgeMaterial);
      mesh.add(line);
    }

    scene.add(object);
    render();
  });

example results are in the image:

my question how can I keep only the circular edges ? I want to leave only the circles of screw holes.

You can study this package for ideas:

an edge only appears between two triangles. If you write the information about those two triangles (the normal) onto both vertices of the edge you can do all sorts of logic on it.

If you are seeing sharp edges to begin with, this wont work as is. You would have to find the boundary edge. For this look up a “half edge” data structure.

You loop through all the faces and build your half edge data structure. Once you are done, all the interior triangles will have connections, the boundaries will not (twin will be null).