Mesh drawing bug

Hello! Could you please tell what am i doing wrong?

I load .fbx model and than trying to redraw it with.
Geometry, texture and meshes are similar.

const arr = spline.geometry.getAttribute('position').array;

(let i = 0; i < arr.length; i += 3) {
      position.push(arr[i] + translation[0], arr[i + 1] + translation[1], arr[i + 2] + translation[2])

const geometry = new THREE.BufferGeometry();

geometry.setAttribute('position', new THREE.Float32BufferAttribute(position, 3))
material = new THREE.LineBasicMaterial({color: 'red'})

const line = new THREE.Line(geometry, material)
line.matrixWorldNeedsUpdate = true;

Forgot to say, that Crimea(small poly where the line comes from) is the other geometry.

My mesh is red, the blue one is from model. I can’t understand where does this line come from?

Unrelated to your issue but I doubt you need this line here.

Any chances to demonstrate the issue with a live example?

1 Like

I was trying with it and without. No changes. Don’t know how can I upload .fbx to online resources

You can use glitch to share a live example: Glitch :・゚✧

This service does also allow to upload assets.

1 Like

should i share it to you?

You put all the vertex data in that single const position = []; without splitting it into separate contours, so there’s no surprise, that Line draws all at once, connecting all the contours.
What’s your goal?

I’ve made that each contour has its own colour:


thank you!

@insuby You’re welcome :slight_smile:
I still wonder, how the final result has to look like :thinking:

1 Like