Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.First time visiting? Here are some places to start:
- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
Evenly Spaced Points on Sphere / Fibonacci Lattice
First off: I understand I can do something similar using patterns, but that is not my goal
Apparently it is not possible to get perfect spacing of points on a sphere (with a few exceptions). While mathematicians may be distraught over this, engineers can use Fibonacci Lattice to accomplish a 'close-enough' result. I would like to have this function available. The code for creating the 3D points is rather simple, but I don't know enough about Onshape internals (nor programming for that matter) to do this on my own.
I believe I can code the creation of a matrix of 3d points in FS, but that's all at this point. What are the steps to make this happen?
This is my guess:
1) Input sphere diameter, boolean body diameter (sphere for now), number of instances, boolean operation (add/subtract)
2) Generate sphere of variable diameter
3) Generate body to boolean pattern
4) Create 3D matrix of points
*At this point, a similar FS (SurfacePattern) seems to do planes and normals, which I'm not sure whether it's necessary.
*I also am not clear if calculations should be in radians or degrees, though I can play with that
5) Pattern boolean body at each 3D point
6) Perform boolean operation for bodies
Appreciate any feedback or direction on this.