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.
Linear Patterns with variable spacing
David_Bower1
Member Posts: 11 ✭
Making a linear pattern with unequal spacings is a common feature in cad but I can't find how to do it in Onshape. I can only find equal spacing. Can someone show me how to do unequal spaced patterns please? Do I create ab equal pattern and edit dimensions somehow?
1
Answers
BUT since i'm replying here for the fun of it I'll show some unintuitive, complex ones too, which could be valuable in certain cases (like modeling guitar fret spacing). They are all based on using a feature pattern on variable features so the variable values change each time the feature pattern loops over those features. I made the var
and then another one
If I pattern the second #i feature, it will increase by 1 every time the features loop, and you can use the number to drive all kinds of things. You could multiply it by a length like I do in this part studio or you could use it to index an existing array of values like in this part studio.
In the first one, I'm also using some conditional logic to tell it how much the spacing should change each time. This is a ternary function. If you're not used to the syntax it's basically
my true/false statement is
Which is asking "is #i is zero or the holes - 1". In other words, "is it the first or last hole?". If it is, then I use #endSpacing and if not I use #defaultSpacing
I'm sure I'm leaving things out here because I don't know your comfort level with code, but feel free to ask followups. As I said, it's not intuitive, but it is a fun puzzle.