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.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Trying to clone and place an object evenly on the surface of a sphere via feature script.
carolyn_hudson
Member Posts: 4 ✭
I’m absolutely new to Featurescript and I am trying to use a common algorithm that I borrowed from somewhere else to evenly generate points on the surface of a unit sphere and am transposing and scaling them successfully (using a user selected point and radius to generate the list of x,y,z coordinates) as far as I can tell. But it seems to be failing on the duplication of the selected object. I’m also wondering how best to handle rotating each clone to align to the angle the point is at on the surface of the sphere relative to the center. I’m worried that I am missing something important like having to provide a center point and normal for the object to be cloned and/or am doing the transform list creation wrong when calling the duplicate function,
in the past I have just using the rotational symmetry of the various Platonic solids or multiple calls to the circular pattern copy tool. But wanted something both more flexible but also faster. The funny part is this all started with my dog constantly destroying tennis balls and me wanting to make her ones with lots of small bumps so they would be more fun for her but still bounce normally.
Answers
I made something like this awhile ago.
https://cad.onshape.com/documents/fe8f7c770cf79324a7b52621/w/0cb3b8e72806449353a9c02f/e/e6fcaf75166c325f5c42c7db
Although now you can do this with query variables and query pattern features
https://cad.onshape.com/documents/fe8f7c770cf79324a7b52621/w/0cb3b8e72806449353a9c02f/e/e6fcaf75166c325f5c42c7db
thanks the next time I’m at my computer I will take a look!