Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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

2

Comments

  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    edited June 2022
    shawn_crocker said:
    I noticed FYI that its seems the pattern length variable is adding an extra instance to is summing.  I think that's why I wasn't getting what it was for at first.
    Ah simple algebra mistake. I did
    length = spacing*count
    but it should be
    length = spacing*(count-1)
    because a pattern with 1 instance has a length of zero. Fixed in V6
    Evan Reese
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    Thanks so much @Evan_Reese.  This is going to come in very useful on Monday!.  I figured it was that little -1 type thing.  I usually do that ever time I create the same type of calculation.
  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    The bug should be fixed in V7. Let me know what other critters you find lurking.
    Evan Reese
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    Thanks @Evan_Reese.  That particular settings combination is commonly used for myself.  Much appreciated!
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    Here is a practical example of using the new functionality @Evan_Reese kindly added to this great feature(I think its practical anyway).  In the .gif, I have used a controller pattern to pattern out a sketch.  I used a measured length and spacing set to count.  I then used one stable instance of the pattern(the first one) to perform a cut.  I then loaded in the variables the pattern has prestored using Evans new extract variables feature.  I was then able to pattern faces of the cut using the variables of the first pattern so it automatically follows the first pattern, even though the pattern is starting and ending in a different location.  Still haven't had to do any manual math yet.  I then needed the same features on a different side of the piece.  Was able to again create a pattern that used variables from one of the leading patterns to evenly space the cutout with an approximate spacing match.  If I was to end up reusing this part elsewhere and set it up with configs, nothing would be breaking and a lot is getting done automatically without having created a single variable myself or manual calculation other than subtracting instances from a variable within a downstream pattern.  I'm really loving this additional functionality and the little fix to the exact space/measured length combination!!!  Thanks again!


  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    Thanks for sharing that workflow, @shawn_crocker. It's great to see how you're applying it.

    I actually happened to be working on an update this weekend to also add the option to get all of the direction and spacing info from a previous Linear Pattern Plus feature. I think it could be a good complement to the workflow you've mentioned above, which is still relevant if you want to sync some, but not all of the pattern parameters. I think it's most handy if you are doing a few different types of patterns back to back, like patterning some holes, and the thing that fits into them. I'm not sure how much I'll use it or not, but it was fun to write, and there are certainly a number of features that would benefit from something like this (I'm lookin' at you, Hole feature 🧐). I'm now wishing this is how I'd done the Captive Nut instead of making a separate Nut Spec Variable feature. Update to V8 and try it out. What do you think? Worth keeping?


    Evan Reese
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    @Evan_Reese
    I have just been into the Linear pattern and checked out that new ability.  That is perfect really compliments the awesomeness you have created here.  I will indeed probably use that check box as often as pulling out the variables.  Thanks again for the effort you put into this.  This would have taken me a shameful amount of time to implement into a copy of the feature and I'm certain, on my own, I would not have ended up with the same solid result.
  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    @Evan_Reese
    I have just been into the Linear pattern and checked out that new ability.  That is perfect really compliments the awesomeness you have created here.  I will indeed probably use that check box as often as pulling out the variables.  Thanks again for the effort you put into this.  This would have taken me a shameful amount of time to implement into a copy of the feature and I'm certain, on my own, I would not have ended up with the same solid result.
    Great! I partially did it to see if I could, but I'm sure the implementation could still be improved. let me know if it's useful or too limited without making a few inputs independent, like the directions. Right now it seems like the only real use case is doing different types of patterns on the same area (like an Add, then a Remove), but it's not as handy for two patterns in different areas of the model.
    Evan Reese
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    I'm sure the implementation could still be improved. let me know if it's useful or too limited without making a few inputs independent, like the directions
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    Ignore above.  Had to post because I can't figure out how to get the cursor out of a quote block after editing it.  @Evan_Reese I do think that new functionality would benefit from being able to switch the direction of the child pattern.  Just went to use it for a real use case and this was the first thing I needed to do.   :)
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    Another task where a combination of extracting variables and then also directly linking with the newest functionality has come in useful for me.  In this case, I needed two lines of holes each covering a different distance but needing to be approximately the same spacing.  The holes will be filled with a rivet nut.  I then needed another two lines of holes of a different size going through a separate plate for bolts to pass through, each followed exactly the first two lines of holes.


  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    @shawn_crocker
    I'll think about the best way to break out the directions, but I do think it's important. It was also cool to see your workflow with multiple features! Thanks for testing out this feature so heavily for me.
    Evan Reese
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    @Evan_Reese
    I'm really liking how robust this is for potentially needing to add configurability to something on the fly.  And with the parametric replicate feature, it is also much easier to suddenly turn an assembly into a configurable object.
  • Marc_MillerMarc_Miller Member Posts: 110 ✭✭✭
    Oh man, this is excellent. Will totally be using this. Thank you @Evan_Reese

  • eric_pestyeric_pesty Member Posts: 1,836 PRO
    @Evan_Reese

    Love this feature!
    I think I found a bug though (unless I am missing something...): the "match previous feature setting" doesn't seem to set the "centered" option in the "child" pattern:


  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    Definitely a bug. Thanks for letting me know! In looking into it a bit it's making me wanna refactor that functionality a lot. I think I know more now than when I added that before. I don't know when I'll get to it though.
    Evan Reese
  • John_vd_WerffJohn_vd_Werff Member Posts: 65 PRO
    @Evan_Reese, great FS! Thanks for sharing.
    This FS will help to reduce our design time, especially the option to use a target distance. We often have features in sheet metal that need to cover a certain distance with a certain spacing.
    Nice video too.
  • MichaelPascoeMichaelPascoe Member Posts: 1,952 PRO
    edited August 2023

    I have an idea. Sometimes I want to reference the last patterned entity. The issue is that if the quantity changes, the last entity changes. What if the last entity was created with a separate opPattern or opTransform. This way, no matter what the quantity is set to, the last patterned entity is always the same.

    Use cases: columns, frames, anything where the first and last pattern are important to reference in down stream features.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    @MichaelPascoe
    This is a really cool idea! I'll have to think on it some more. I could see it running into issues if I have 5 instances, and reference the 4th one for some reason, then drop it to 4 instances. It would break then, but that's probably less likely than wanting to reference the last one. As of now, it does seem worth doing at some point.

    I also did add the ability to use my Extract Variables feature to pull out all of the info from the feature for use in other features. That would let you reference the total distance as a variable, for example. This feature only works with features that are set up to work with it, which is just Linear Pattern Plus for now, if I remember.
    Evan Reese
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO

    I have an idea. Sometimes I want to reference the last patterned entity. The issue is that if the quantity changes, the last entity changes. What if the last entity was created with a separate opPattern or opTransform. This way, no matter what the quantity is set to, the last patterned entity is always the same.

    Use cases: columns, frames, anything where the first and last pattern are important to reference in down stream features.

    I use the extract variables for this use case.  Sometimes I will do a regular linear pattern of the same instance used in the plus pattern and set its pat dist. to the extracted variable from the plus pattern.  I then reference anything I need to, to that dummy pattern part and I usually just delete it at the end of the feature tree.  It would really be cool though for the plus feature to be able to elegantly handle this type of thing all in one step.  This type of instance referencing thing is so commonly awkward it amazes me somehow, somewhere, a cad developer has not solved this.  We believe in you @Evan_Reese:)

  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    @MichaelPascoe
    it's definitely doable, and is intuitive for a single direction. How do you imagine handling when there are 2 or 3 directions? Would the outer rows all be made with a separate pattern to keep them stable?

    Evan Reese
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    @MichaelPascoe
    it's definitely doable, and is intuitive for a single direction. How do you imagine handling when there are 2 or 3 directions? Would the outer rows all be made with a separate pattern to keep them stable?

    Suddenly this is starting to sound wildly complex!
  • MichaelPascoeMichaelPascoe Member Posts: 1,952 PRO
    edited August 2023

    Nice! I would imagine only the final instance of the first direction would be able to create other stable instances. So if you went two directions, the last column would be stable. Then if you go with three directions, the last array / slice would be stable. With more than one direction, there are options, what is the first direction, second, and third? You could default it to X, Y, Z so there would be no extra inputs.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • ben_partouchben_partouch Member, csevp Posts: 124 PRO
    @Evan_Reese
     This is really amazing. Thank you for sharing! 
    To be honest, the native pattern feature is way too limited. I would expected at least some of these features would already be in the native feature...
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    @Evan_Reese
     This is really amazing. Thank you for sharing! 
    To be honest, the native pattern feature is way too limited. I would expected at least some of these features would already be in the native feature...
    I am also rather surprised at how light duty the native patterns are.  If we could swap out the native one in the tool bar and replace it with the plus version it would make the lack of native functionality less noticeable.  Its gets to be a bit of a pain having to navigate through a long list of features.
  • MichaelPascoeMichaelPascoe Member Posts: 1,952 PRO
    edited August 2023

    @shawn_crocker have you tried the search bar at the top right? That is pretty much all I use for starting most features:
    1. Alt + C  opens the search
    2. Type some of the key letters
    3. Enter
    Recently used features will be in the search as well so you won't even have to search if you just used it; Alt + C, then Enter.




    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    @MichaelPascoe
    Aha!  Can't believe I've never used that.  Thanks for pointing that out.
  • SethFSethF Member Posts: 130 PRO
    Even if it was only available when doing 1 direction, I would use this all the time. I already use the feature all the time!


    Evan_Reese said:
    @MichaelPascoe
    it's definitely doable, and is intuitive for a single direction. How do you imagine handling when there are 2 or 3 directions? Would the outer rows all be made with a separate pattern to keep them stable?


  • eric_pestyeric_pesty Member Posts: 1,836 PRO
    I had a thought about the whole "keeping track of the last item'' problem, could you not transform the seed to the "last" position and pattern "backwards" toward the original location?
    Might just be simpler to make the last one as a separate pattern with a count of 2 though...
    As far as multiple directions, I would think you would only need to track the "furthest corner" instance as that could be used as a "stable" reference.
  • EvanReeseEvanReese Member, Mentor Posts: 2,080 ✭✭✭✭✭
    @eric_pesty
    That's also possible, but would make all of the other instances unstable in unintuitive ways. If you reference instance 2 it would keep jumping around as you change the count. I think I prefer it to just keep the last one stable by essentially labeling it "last" instead of "instance 5" or something.
    Evan Reese
Sign In or Register to comment.