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
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 (21.0 KB)
Thanks,
Binoy