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

Best approach for creating polygons with variable number of sides

It seems it's not possible to declare an integer variable and use this in the value for side count for an inscribed polygon on a sketch, but it is possible to use a variable value for feature patterns.

Given this is the case, what would the most efficient approach be for creating a polygon of any number of sides with a variable? Essentially my aim is to have a number variable that (for example) could be changed from 3 to 4 to change a basic 1cm depth equilateral triangle into a square.

I can see this being possible by constructing shapes with >3 sides from triangles with a feature pattern and calculating the internal angles using this variable but it would be quite slow to apply this multiple times in a sketch and could get quite messy to maintain. 


Best Answers

Answers

  • Options
    alex_bryant170alex_bryant170 Member Posts: 3
    Both great answers, thank you both. 
  • Options
    Auke_Smit_SILAuke_Smit_SIL Member Posts: 20 PRO
    instead of circular pattern you can also let the sketch drive a side of the polygon directly. not sure what the impact is for the rebuild time.
Sign In or Register to comment.