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.