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.
Circular pattern - second direction
brian_brady
Member, Developers Posts: 505 EDU
We can use two directions for rectangular patterns, but I don't see that we can use a second direction for circular patterns. Is this possible in the single tool, or will I have to make a linear pattern first and then use that to make the circular pattern. Picture the holes in a shower head as an example.
0
Best Answer
-
mahir Member, Developers Posts: 1,307 ✭✭✭✭✭Yeah... no Whether you want a radial pattern direction or a second angular direction, the built-in circular pattern feature doesn't do that. A FeatureScript could be written to do this, though. Time permitting, I may give it a go.5
Answers
FeatureScript Radial Pattern
I prefer this type of functionality to be built into OS, not just via scripts.
I'm not sure how exactly you're trying to pattern that hole, but take a look at the example tab in my document. There is specifically a pattern of holes going through a plate, along with other examples. That being said, I don't see why your pattern shouldn't work if applied properly. Most of the code was copied from Onshape's own circularPattern and LinearPattern feature and has the same options/flexibility. Don't forget to select a Seed Point so the feature knows what direction is radial. Also, be sure you've selected the right type of pattern (part, face, or feature).
A big part of the point of FeatureScript is that it is exactly how we build the built-in features ourselves. For example, here's what the code to our own circular pattern looks like: https://cad.onshape.com/documents/12312312345abcabcabcdeff/v/2de19ab793fd2712770de4d1/e/5e639eb1b1834188ae46203a
At a very high level, it's pretty similar to Mahir's code.
Of course, we have stringent processes for QA, documentation, etc., but it's not like other CAD systems where scripting is the ugly step-child -- in Onshape a user-built custom feature can easily be as good as one of ours.
https://cad.onshape.com/documents/57acdfaae4b005c413ed9b6f/w/3fd585a46d3af1b3ba413c53/e/b36406b232aa470add7fdbc0
https://cad.onshape.com/documents/57b7740ce4b002b1d76d73b8/w/74ebb8e6fc5c218c0891f528/e/996c6eca6596bcc05033e846