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.

Patern of patterns?

MannyFMannyF Member Posts: 12 ✭✭
edited May 20 in Community Support

I'm new here and currently learning OnShape. I'm designing a set of garage shelves using OnShape's frame tools. I need to make several sets of different sizes and shelf count, and would like the design to be driven by variables so I can just specify the overall LxWxD, the distance between the floor and the lowest shelf, and the number of shelves. I've modeled the front, using linear pattern to create the horizontal members and the member count is driven by a variable named #Count. Then I use linear pattern again to create a copy of the whole thing for the rear, as shown below.

image.png

image.png

The problem is, if I later change #Count, any shelves that were not included in the pattern are not added, and quite predictably so. Using "Feature Pattern" instead of "Part Pattern" I can copy the pattern of beams, which copies all but the bottom beam (the seed for the first pattern), then I can use linear patter once more to copy the bottom beam. Another way to tackle this is to create the bottom layer first, both front and back, and then apply linear pattern to it. This is probably the most efficient approach.

I like how the Frame tools are designed to be driven by sketches, but I don't think there'd be any way to add extra frame elements based on a sketch pattern (somebody prove me wrong). Sorry I suck at verbalising things but I hope with the screenshots I've got my point across clearly enough. Thanks!

Best Answer

Answers

  • MichaelPascoeMichaelPascoe Member Posts: 2,305 PRO
    Answer ✓

    Here is an example of how to configure shelf count. Measure the total length of the bottom of the start shelf face to the bottom of the final shelf face, then calculate the spacing like this: spacing = totalDistance / (shelfCount - 1)

    https://cad.onshape.com/documents/34c10a9878ff5afbb6a65609/w/36db55007701cdd82724516b/e/4813059d…

    Frame shelves.gif

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • MannyFMannyF Member Posts: 12 ✭✭

    Thanks Michael! Wow that configurations thing is new to me, it looks very useful! I'm curious, so I guess this sort of thing is usually done entirely in the Part Studio, not as an assembly?

  • MichaelPascoeMichaelPascoe Member Posts: 2,305 PRO
    edited May 20

    Sure thing 😎

    It is best practice to use the assembly, however Onshape only allows custom features for part studios, not assemblies. Also, they don't have support for frames within the assembly bom, YET. I assume they will add support for it eventually. But for now, the way to create a cut list for frame parts is to keep them within the part studio and use the Cutlist feature. I made a modified version called Cutlist+ which gives you more control over your parts and part naming. See the cutlist button over on the right side of the screen to access the frames cut list.

    There is another feature I threw in there called Measure Cut List which you can use to quickly make a cut list of non frame parts like the shelves. See the custom tables button over on the right side of the screen to access this custom table.

    If you were making an assembly that required a bill of materials, then it would be advised to go the assembly rout and take the extra time to configure each of these parts as individual pieces in their own part studios. This way the assembly bom can recognize them and your purchasing department can quickly buy the right parts. That said, a part studio only approach works very well for frames and small projects.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • MannyFMannyF Member Posts: 12 ✭✭

    To me it seems trying to do this sort of thing in an assembly would be a nightmare, especially the diagonal members in your example.

  • MichaelPascoeMichaelPascoe Member Posts: 2,305 PRO
    edited May 20

    There are several different strategies to managing assemblies to keep it from being a nightmare.

    Rule 1: Avoid in-context edits when possible. They are amazing to have, but if not used with care, they will destroy the usability of your assembly when you go to make big changes. If you have too many in-context edits, it can get exponentially difficult to manage.

    One strategy I like to use is to create a single configured pipe or frame that can be quickly inserted into an assembly. You could then pretty easily insert all of those shelf frames into the assembly and drive their values with a Variable studio or assembly configured variables.

    Another strategy people use is a more skeletal top down approach. Make a part studio that controls the placement and sizes of parts via sketches. This part studio is then derived into other studios and used as a guide to drive the entire assembly. This approach can be useful for more complex assemblies.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • MannyFMannyF Member Posts: 12 ✭✭

    Thanks for all the tips. I'm reverse-engineering your shelves model to learn how things are done. I'm curious, why is it Frame 1 and Frame 2 have to be done separately? Frame 1 extrudes three members in a single feature. If I try to create the lower member of Frame 2 in Frame 1, by selecting all 4 sketch lines, OnShape reports an error. It seems it only allows sketch "polylines" with a single start an a single end point, I assume it has to do wit the corner overrides? I don't know enough to see why this limitation is necessary.

    image.png
  • MichaelPascoeMichaelPascoe Member Posts: 2,305 PRO

    The reason for this is because the default Frame feature simply doesn't support a multi-path frame. It would require quite a bit more code. They may add this eventually, but it is not there atm. Sometimes it's best to keep things as individual features for the sake of having a clean feature tree. In this case, I think it would be nice to have the extra frame functionality that could handle multiple paths.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
Sign In or Register to comment.