# How to increase radius of a cylinder using buffer geometry?

**URL:** <https://discourse.threejs.org/t/how-to-increase-radius-of-a-cylinder-using-buffer-geometry/51698>\
**Category:** Questions\
**Tags:** buffergeometry\
**Created:** [May 17, 2023, 1:35pm UTC](https://discourse.threejs.org/t/how-to-increase-radius-of-a-cylinder-using-buffer-geometry/51698 "2023-05-17T13:35:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![binoy\_t](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/binoy_t/32/24330_2.png) [@binoy\_t](https://discourse.threejs.org/u/binoy_t)\
**Post date:** [May 17, 2023, 1:35pm UTC](https://discourse.threejs.org/t/how-to-increase-radius-of-a-cylinder-using-buffer-geometry/51698/1 "2023-05-17T13:35:31Z")

</div>

Hi,  
I am trying to increase the length and radius and length of a cylindrical gltf model. I was able to increase the length by

```javascript
function updateModel (len) {
    for (let i = 0; i < model.children[0].geometry.attributes.position.count; i++) {      
      let z = model.children[0].geometry.attributes.position.getZ(i);
      let sgnZ = Math.sign(z);
      model.children[0].geometry.attributes.position.setZ(i, z + len * sgnZ);
    }
    model.children[0].geometry.attributes.position.needsUpdate = true;
  };

```

But it didn’t work very well with the x and y axes the model got deformed. is it possible to increase the radius/diameter using the geometry of a mesh?  
This is the model I tried to edit :  
[shaft.gltf](https://discourse.threejs.org/uploads/short-url/3eEAKQBDopCPojKgEFOqeTK0JQx.gltf) (21.0 KB)

Thanks,  
Binoy
