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

Variables Making Holes

noah_lacorazzanoah_lacorazza Member Posts: 1 EDU
I am designing a part in which needs a hole every 0.5in. And I would like to apply a variable that can change the length of the part, while also keeping that hole 0.5in away from the ends and one another. How do you think I should go about this?

Comments

  • Options
    S1monS1mon Member Posts: 2,388 PRO
    Try adding this custom feature: Linear Pattern Plus.
  • Options
    GregBrownGregBrown Member, Onshape Employees Posts: 106
    You could set up a couple of variables starting with your #target_length of part, #target_end_gap, and #target_spacing. This will give you a calculated length of the pattern of holes, and thus the number of #gaps between the holes (possibly including a fractional part of a hole...) Now you can round this up, and recalculate the #actual_length of the part. Use this to drive the extrude dimension, create a sketch on the part which is offset from each end by the #end_gap variable, create a hole at one end and curve pattern the hole feature with the right number of holes (#gaps +1). 

    The rounding and recalculating maybe a bit over the top, but I thought it was fun to include. That way you can input any length you like and it will still work out.

    Maybe an example is easier to follow!
    https://cad.onshape.com/documents/0582cfeee92c71fb38f9552b/w/06a3d0f80fd2bfd74a9d7904/e/3092b83245527a2d99701ac6

    You can obviously drive this different ways, e.g. the target number of holes... basically anything to derive an actual part length that gives you the right end_gaps and spacing.

    Also, I've used the center distance between the holes as the measurement, but you can rework this for whatever...
Sign In or Register to comment.