I've got a BufferGeometry from which I extract the edges and display the lines:
const geometry = new THREE.BufferGeometry();
geometry.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
const edges = new THREE.EdgesGeometry(geometry);
const line = new THREE.LineSegments(edges, new THREE.LineBasicMaterial({ color: 0xc4eaff }));
scene.add(line);
Now I've got a quite complex shape. There are extracted edges which do not exist from this shape (see pictures below). My first thought was, that there are maybe little holes in my shape, but when I display the whole mesh I don't see any holes.
Has anyone got an idea why this is happening?
LineSegments:
Mesh:
If needed, here's the code for displaying the mesh:
const geometry = new THREE.BufferGeometry();
geometry.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
const mesh = new THREE.Mesh(geometry, new THREE.MeshBasicMaterial({color: 0x77a6f2, side: THREE.DoubleSide}));
scene.add(mesh);
Mesh with LineSegments overlay (only part of it due to the visibility):