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.

Options

How can I make a scalable model?

peter_m091peter_m091 Member Posts: 8
I'm designing a part to hold X amount of batteries. I want to be able to generate this in a way that allows me to change a variable and automatically adjust the model's capacity. However, I have no idea how to do that, since changes in a pattern would break all connections linked to instances. Any thoughts?

(e.g. sketch a square -> 4x linear pattern -> add a border around the whole array. then change it to 3x/ 5x - you'll see the border relationship breaks, and it doesn't update)

Answers

  • Options
    billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    Seems like.a little math and some featurescript would handle this. 

    You can do it as a feature inputs, but you'll go crazy, I'd learn featurescript and work the magic there. 


     


  • Options
    S1monS1mon Member Posts: 2,368 PRO
    It sounds like you might be trying to do this with sketch patterns. That's probably not the right approach. Variables and feature patterns are more likely to work for something like this.

    What kind of batteries and what sort of arrangement? What kinds of features are patterned in the holder? 

    Do you have a public model or some sketches of your concept or some images of some off the shelf versions of what you are trying to do?

    (BTW, why are you not just using an off the shelf solution?)
  • Options
    dirk_van_der_vaartdirk_van_der_vaart Member Posts: 543 ✭✭✭
    I think configurations will do the trick for you.
    Have a look.
    https://learn.onshape.com/learning-paths/onshape-configurations
  • Options
    mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    edited December 2022
    To parrot and expand on what others have said, I would use some math. Specifically, use a variables to control important inputs and perform calculations via formulas (e.g. # batteries, battery size, overall envelope). Then use those calculated values to drive your sketches, features, and patterns. This can be done either with or without configurations. If you plan on doing this regularly, or have more variety than just # batteries, configurations would work better long term.
  • Options
    peter_m091peter_m091 Member Posts: 8
    @S1mon, many thanks for your comment. Here's the attempt - you're absolutely right, the sketch is not the right way of doing this. Can you help me with the right way?



    what I want is to be able to change the #batteries and for the model to update (right now, it just breaks everything since, as you pointed out, the variable is connected to a sketch)

    Many thanks for looking into this with me!!
  • Options
    dirk_van_der_vaartdirk_van_der_vaart Member Posts: 543 ✭✭✭
    I have made a copy of your file and added a part studio with a configuration.
    https://cad.onshape.com/documents/35cb66c040fa8e8779deea7f/w/b20e867a5f0dfe72936e40c6/e/6bf7b6baf14b092d2c4695b0

Sign In or Register to comment.