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.
New Feature: Linear Pattern Plus
I've been wanting this one for a while, so I finally got around to making it! This is riff on the native Linear Pattern feature that adds arrow manipulators, options for patterning based on total length or referencing other geometry. It also adds a third direction to the pattern. Enjoy it and let me know what you end up using it for!
Go get it here: https://cad.onshape.com/documents/1196579d97167d7a348652a9/v/1c9b35be187e7992fe9815d7/e/3e9783cad47053c2abb99ce0
Watch the 10-minute video tour here for details: https://youtu.be/tQbTv60SVL4
Go get it here: https://cad.onshape.com/documents/1196579d97167d7a348652a9/v/1c9b35be187e7992fe9815d7/e/3e9783cad47053c2abb99ce0
Watch the 10-minute video tour here for details: https://youtu.be/tQbTv60SVL4
Evan Reese
12
Comments
Video looks great. The permissions or location of your FS seem to be off. I can't access it.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
I was thinking in terms of how surface pattern works along U and V. It already does one of your spacing options where it will do the math to divide up 0…1 by however many instances you want in U and or V. It would be great to have the min/max spacing and the border options.
CAD Engineering Manager
- spacing - like the normal pattern feature
- Total length - which let's you pick how long the whole things is
- Measured length - which let's you measure how long the whole thing is
Since then I've had some cases where I wished I could just measure the gap between a single instance, so now I've got it split out where you have options for:- Spacing
- Total Length
and a second set of options for:- Distance - you can input a number, like the standard pattern feature
- Measured Value - you can measure anything and use it for either the total length or instance spacing
I think it's more flexible this way. Hopefully you all agree! If so, update to V4.I have been enjoying this feature so much. I come across a patterning problem quite often. I often want to pattern a set distance over a measured length and have the last pattern instance stop short of the end leaving a space that is less then the pattern spacing. You have that covered perfectly in this feature. Very often, I want to create something else downstream in the feature tree that fits into that space and I think it would be really cool if you could create a section in the feature that allows the creation of a variable that represents this leftover space. I'm thinking there is room for having the feature create variables for all kinds of things here but immediately this would be very useful at least to me. Also, I wouldn't mind generating the code myself if you don't have time to do it but I'm thinking with a feature of this caliber, it would be best for the code to make it back to the source. Is that something you would be open too?
What I coincidence. I just noticed, there is a little bug with the exact spacing parameter. If measured distance is used, exact spacing does not work and the outcome is the same as nearest spacing. See my little .gif that looking back at, is super unclear.
Glad you're enjoying it!
I think I understand what you're getting at with the variable, but does just creating a variable on the fly work? If you start typing a new variable name into that field you can automatically make one that will come in right before the feature. There are several benefits to that in my opinion. First, I don't like mashing two features into one when they'd work just as well separately. In this case, I don't see how making the variable inside of this feature is better than just making it outside of it. And second, the end result is a lot more readable. If someone else needs to edit your model they may not know where that variable came from. Maybe I'm misunderstanding your ask here though. Let me know.
As for the bug, I'll look into it when I've got time. It's been a busy week. Thanks again for the suggestion and feedback!
Thanks for getting back. actually, my aim for the variable being created by the feature is to avoid doing the calculations before the feature when the feature is already doing the calculations internally. If I'm just rocking and rolling through a design I create the pattern feature, tell it what to pattern, tell it what to measure to fit the instances to and am then, desirably, left with a space to fit in a piece that is not as large as the instance spacing. Because I'm a bit of a configuration junky and almost everything I am designing will inevitable be used again but slightly different, that left over space will be changing all the time. In order to accommodate ATM, I basically have to create an equation driven variable that performs some variation of the calculations that are already being done within the pattern feature. If the pattern feature could do its work and when done, spit out a variable that equals the leftover space I'm thinking it would be a very clean workflow. What would also be just as good and possibly more flexible for differing workflows would be for the feature to create a variable that represents how many instances it calculated and the measured distance that was selected. This concept is coming straight from functionality solidworks would allow for. You could create a pattern that automatically did the work that was needed, just like your feature, and downstream, you could link other features to the data it had calculated like instance count and such reducing the amount of user created equations.
some additional info that may bring more logic to this request:
Since the upgrading of the assembly replicate feature, I almost always use the replicate tool instead of the assembly linear pattern. Usually what I do is create some type of surface in a part studio with a single circular face at one end that represent the position of the first instance to be patterned in the assembly. Then I use your feature or in the past, equations and variables to get a dynamic pattern of that one face along the surface. Now I have a surface with a bunch of circular faces on it that can be configured, brought into an assembly and driven. If I mate my first part instance to that mating surface, replicate will also dynamically do the rest of the work for me. The last step in reducing the amount of premeditated equations would be for your feature to just create some variables that hold data corresponding to some of the features internally calculated things.
I know I could copy out your feature and make it work how I'm trying (probably failing) to describe but I have a nasty feeling about having parallel stuff doing the same thing. Let me know if you are still on the fence and I will just mod it so that you can see exactly why this functionality would be so great. My main goal here is to not start using my own customized version of your feature. Not because I don't want to do the work but because I'm thinking things are better to stay referring back to the source when possible.
It will save me some time.
Thank you
I couldn't stop thinking about the idea of a separate feature that can pull variables out of other features, and it seemed easy enough so I had to give it a go. Take a look at this workflow and see if it would meet your needs. I like the flexibility this gives, as opposed to adding a whole separate UI to any feature that could produce variables. The downsides are that it may not be obvious which features are compatible (currently only Linear Pattern Plus), you can't control which variables are included or excluded, and the variable order in the variable table flyout is currently arbitrary (but I think I could probably fix this somehow). I still expect to prefer this, but I'll use it more and see if I still feel that way. Let me know what you think too.
If you want to try it, you can add the Extract Variable feature here. For now, it only works with Linear Pattern Plus, but I wrote some functions that would make it a lot easier to add compatibility to other features. I encourage any other FS developers to consider whether any of your features would benefit from compatibility with something like this.
I like how you can select multiple features with your extraction tool. Not sure if it is possible, but it would be useful I think to see a list of the available data to extract from the selected features and then be able to explicitly name a variable for anything in the list. Maybe not naming something automatically excludes it and a variable is not created for the particular list item?
Thanks a lot for all this. You are so quick! This would have been weeks of me combing the web searching for tidbits of info to overcome a hurtle that apparently nobody has come across or is just so obvious, I can't see it.
Here is a link to a document containing my testing of the extraction tool.
https://cad.onshape.com/documents/4acbd9c458cb4f1965cb5ebd/w/afcbb4ef6d6da8f5a20a44da/e/fdd9546dd00a2bcb1be053bf
I am unsure what the lengthOne variable is? Also, it would be great to get a variable out of the pattern that represents the distance shown in the below image
I also created this document so you could see directly what I mean about the exact spacing algorithm picking the wrong calculation type if the measured length option is being used. It seems the exact spacing choice combined with the measured length choice is causing the calculation to be the same as the approx. spacing. This is also being reflected in the variable extraction. You can see one of the spacing variables is around 5.5IN and the other is at 5IN when both pattern features have been set to 5IN using the exact spacing option.
I'm not sure how parametric this would be if you change the number of instances in the pattern, but couldn't you just use Measure value to extract this dimension?
All I'm doing here is making Linear Pattern Plus create one variable that's a map of all of the variables to extract, which looks something like this:
The trick is that the variable name starts with a character that's not allowed for a variable name (i.e. the standard Variable feature wouldn't let you do it. Something like "@ or ["). That makes the variable hidden in the part studio so it doesn't show up in the variable table or autocomplete. You'd never know it's there, and you can't access it directly, but downstream features can. I'm using the feature's id as the variable name, which makes it unique, and that's how Extract Variable is finding it when you click the feature to extract from. After that it's just looping over the map and declaring each one as a variable. Even if another solution ends up being better because of some of the limitations noted in my last message, I had fun working this out!
I could use the same technique to store pattern settings for use across multiple features, but it would take a bit of work. See my Captive Nut feature which can also take a Nut Spec Variable feature to drive the UI. It could be similar to that, but you'd just select a previous pattern feature instead of creating a separate Pattern Spec Variable. If implemented, I imagine it should match the directions, counts and distances, but not the pattern type or selections. Definitely an interesting idea, but again, I'm always wary of letting features get bloated to the point that they're too hard to use. I'll think on it. I've considered adding a "simple/advanced" enum to some features which would default to simple, but remember your last selection, so beginners get a simpler UI, but less powerful feature, and can "upgrade" later if they want.
"lengthOne" is the total pattern length. I may want to find a way to add descriptions to the variables too. I could definitely add a "remainderLengthOne" variable or something for the case you mention above.
Thanks for the example document. I still need to get on that bug fix sometime, but it sounded less fun
Yes and know. If something is configured, measure value will fail because the ID of the last instance will be changing all the time. I have found the most robust way to figure out this value is to just calculate it with variables and then create geometry that fits in the space driven by the variables so that nothing breaks. Not having this final dimension automatically created as a variable by the linear pattern features means, most of the calculations the feature is doing to create pattern instances and distance, I have to do again. With this great extraction tool @Evan_Reese has created it certainly makes for less number crunching in variables as I can use the instances and spacing auto generated variables. However, this would still leave needing to create a variable with the measure value tool for the measured length previously selected within the pattern feature, and then use the three variables to create the final variable that represents the remaining space.
One might ask the logic here as to why so much concern is being put onto patterning parts in a part studio. This is because I am usually patterning parts or faces of a surface to create some construction geometry that gets brought into the assembly. The construction geometry is used to replicate parts onto which quite effectively brings the versatility of the part studio tools into the assembly environment. I'm looking at things from a configured assembly/part studio perspective as I am usually aiming for a configured highly reusable model as an end result. In my company, we manufacture not such a large variety of different products but a wildly huge variety of options available to those products or customer requested customizations.