How to show only edge lines?

I want to show lines only on the edges. Here I have included my output model which I tried using edgeGeometry and LinebasicMaterial. I want to remove the inner edge lines and show only outline edges.

What I tried:
let geo = new THREEJS.EdgesGeometry( mesh.geometry );
let mat = new THREEJS.LineBasicMaterial( { color: “black”, linewidth: 2 } );
let wireframe = new THREEJS.LineSegments( geo, mat );
wireframe.renderOrder = 1; // make sure wireframes are rendered 2nd



@prisoner849 Modified threshold angle also but still I am getting the same output.

I had a similar problem, I was composing the original mesh from several geometries and found that I needed to merge them first.
There’s a good walkthrough here:

(it might not be the cause of your problem, but it helped when i had the same issue)

I did this by finding the boundary edges of patches (what you get from solid modeling tools etc). For the silhouettes you can check if one of two adjacent triangles is facing the camera, and the other is not. The edge between them should render.

can you share the code?

No, my old job owns it.

I’m also available for hire :smiley:


Not exactly what you want but you might find this useful

1 Like

And also this:

1 Like