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.


Parameter input for n-sided polygon in sketches

imants_smidchensimants_smidchens Member Posts: 63 EDU
I found myself designing a configurable 3-sprocket chain for a robotics project, and as I read up on how chain pitch works, I found the simplest way to generate a variable n-toothed sprocket was to define a polygon with n sides and a side length of the chain pitch (seen below)

Currently the polygon tool does not allow for parameter-driven polygons, as variables are not considered valid expressions.

I realize this is likely because the input for such a polygon must be a natural number, but being able to configure this would be nice.
I also realize I could just define the diameter of the circle to be (# of sides)*(pitch length)/(pi) and call it good enough, but my brain prefers the geometric visual solution ¯\_(ツ)_/¯

Thanks for your time!


  • Options
    imants_smidchensimants_smidchens Member Posts: 63 EDU
    i found out that the polygon feature acts much like the pattern tool and thus enters a gray area in terms of how it can be edited and create dependency issues - if i delete one face of a pentagon, then change the parameter to be 4 sides, then back to 5, what happens to the deleted face? (and other such issues)  
    Perhaps a more robust solution (in my case, at least) is to define the circle with an isosceles triangle.

    definitely works well enough, at some point i'll get around to writing a featurescript that doesn't have this bothersome intersection issue between chain links

Sign In or Register to comment.