Help with updating the my_sphere_plugin.rb plugin for SketchUp

Hello, colleagues!
I am developing the my_sphere_plugin.rb plugin for SketchUp, which includes three main functions:

1-Creating a sphere — generating a geometric sphere.
2-Copying the component over the surface of the sphere — distributing the component over the entire surface of the sphere.
3-Transformation of the structure into a ball — transformation of the resulting structure into a ball shape.

The plugin is currently under testing, and I’m facing several difficulties.:
Unsuccessful distribution of the component over the surface of the sphere — it is not possible to correctly distribute the component over the entire surface of the sphere.
Converting the structure into a ball does not lead to the expected result — errors or unexpected results occur when trying to convert the structure into a ball.

I am looking for recommendations or examples on how to use this plugin effectively to achieve the desired result.

Thank you in advance for your help!