# Mesh with TubeGeometry and LineCurve3

**URL:** <https://discourse.threejs.org/t/mesh-with-tubegeometry-and-linecurve3/22306>\
**Category:** Questions\
**Tags:** tubegeometry, linecurve3\
**Created:** [January 11, 2021, 11:04am UTC](https://discourse.threejs.org/t/mesh-with-tubegeometry-and-linecurve3/22306 "2021-01-11T11:04:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RAUMIK\_RANA](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/raumik_rana/32/12395_2.png) [@RAUMIK\_RANA](https://discourse.threejs.org/u/RAUMIK_RANA)\
**Post date:** [January 11, 2021, 11:04am UTC](https://discourse.threejs.org/t/mesh-with-tubegeometry-and-linecurve3/22306/1 "2021-01-11T11:04:38Z")

</div>

I am using TubeGeometry to show line between 2 points .

I am using LineCurve3 for path.

As you can see in below image , mesh is twisted along axis

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/6/672f22bcd9adc8394aa06871921ef614b2ad5706.jpeg)

below is code used to genrate mesh where firstPoint & secondPoint are Three.Vector3().

```javascript
var path = new THREE.LineCurve3(firstPoint, secondPoint);
var tubegeometry = new THREE.TubeGeometry(path, 20, .2, 8, false);
var material = new THREE.MeshBasicMaterial({ color: 0x0000ff });
var line = new THREE.Mesh(tubegeometry, material);
```

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [January 11, 2021, 11:46am UTC](https://discourse.threejs.org/t/mesh-with-tubegeometry-and-linecurve3/22306/2 "2021-01-11T11:46:06Z")

</div>

I would use a different approach: with a cylinder, scaled on one dimension, and using of `.lookAt()`: [https://jsfiddle.net/prisoner849/86dgxp0c/](https://jsfiddle.net/prisoner849/86dgxp0c/)

![изображение](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/7/79000c5da204b7c1cdd46266db2e7fcc2440686f.png)

---

<div class="post-metadata">

**Author:** ![a627247084](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/a627247084/32/26385_2.png) [@a627247084](https://discourse.threejs.org/u/a627247084)\
**Post date:** [December 1, 2023, 2:18am UTC](https://discourse.threejs.org/t/mesh-with-tubegeometry-and-linecurve3/22306/3 "2023-12-01T02:18:43Z")

</div>

[https://discourse.threejs.org/t/how-to-create-a-pipeline-geometry-as-shown-below-from-two-vectors/58710](https://discourse.threejs.org/t/how-to-create-a-pipeline-geometry-as-shown-below-from-two-vectors/58710)  
I would like to ask, can this method create the geometry of this link?
