Draw a polygon by a given circumference

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 54207
Joined: Tue Mar 17, 2015 9:14 am

Re: Draw a polygon by a given circumference

Post by chrisb »

Roy_043 wrote: Mon Feb 28, 2022 4:20 pm [*]Apply a Sketcher ConstrainDistance constraint to one of the sides. The dimension should be PolygonOutlineLength/n
Yes, of course!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
C4e
Posts: 324
Joined: Thu Jan 20, 2022 9:31 pm

Re: Draw a polygon by a given circumference

Post by C4e »

Roy_043 wrote: Mon Feb 28, 2022 4:20 pm The assumption is that the user knows the number of sides of the polygon:
  1. Create a sketch.
  2. Create a Sketcher CreateRegularPolygon with n sides. Place the center on the origin and the 'radius' point on the X axis.
  3. Apply a Sketcher ConstrainDistance constraint to one of the sides. The dimension should be PolygonOutlineLength/n
  4. The sketch should be fully constrained now.
Thanks a lot. This would be the usable solution.
Post Reply