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

  • alex_bryant170
    alex_bryant170 Member Posts: 3 ✭
    Both great answers, thank you both. 
  • Auke_Smit_SIL
    Auke_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.