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.

How to have number of part instances driven by a variable?

david_lynch037david_lynch037 Member Posts: 4

Hi. I have this part that is a wheel with cylinders on the edge of a wheel, such that the cylinders all touch each other. The wheel is 20 inches in diameter, driven by variable #dia. I would like to be able to change the diameter to 40 inches, by changing #dia, and get more cylinders on the wheel, so that they touch. Right now, there are 18 cylinders, but when I change #dia to 40, I would want enough cylinders so that they still touch each other.

Also complicating this is that there are some values of #dia that will be impossible to fill completely with cylinders. I can't have 1/2 a cylinder or gaps between cylinders.

Is this possible? How do I model this without manually iterating over the pattern tool, trying to find the perfect combination of #dia and the number of cylinders to support scaling of the part to various diameters?

Here is the design:

https://cad.onshape.com/documents/7aef99bb7ab5475c70e92f74/w/cc4a7dc99b6308703b4d0870/e/b7d556c02a14e7bba7fa223a?renderMode=0&uiState=66db9a613ffdfa79fcd6ca40

Thanks!

Comments

  • robert_scott_jr_robert_scott_jr_ Member Posts: 508 ✭✭✭

    Hello David. Is the diameter of the cylinder constant? - Scotty

  • glen_dewsburyglen_dewsbury Member Posts: 823 ✭✭✭✭

    The size of the backing plate will want to float with cylinder count instead of being fixed. Note that the angle is removed from the circular array and replaced with a tangent of end circle back to the start circle.

    Change the configuration variable "cyl_count" and all all follow,

    https://cad.onshape.com/documents/8b0a762ab2c76b3213359e75/w/b2489ce104522fd5b1c28ecf/e/c1ee7f1242d662d11ed74f89

  • david_lynch037david_lynch037 Member Posts: 4

    Thank you @glen_dewsbury. This makes the diameter a measurement rather than a driver. I didn't know you could do that.

    It took me a while to find cyl_count up in the Configuration, but now I learned something new about that! This is awesome! Thanks!

Sign In or Register to comment.