Jump to content

Is there any way to automatically create diagonals in a polygon?


Recommended Posts

Is there any way to automatically create diagonals in a polygon? I need to make one with 32 sides, with its vertices joined internally creating a mesh. Attached I show what I mean.  Is there this feature in Afinnity Designer?

 

Thanks in advancePolygon.thumb.jpg.94daaa19d90b381fbe8cf08bbf6f4524.jpg

Link to comment
Share on other sites

Nothing automatic that I know of…. But you could step back in your current design to where you only have 1 of the vertices connected to all others, and hit the Return/Enter key, this will bring up a panel for step and repeat type operations. Make sure to check Duplicate, type 31 for the number of steps, and 360/32 degrees for Rotation angle…. 

2021 16” Macbook Pro w/ M1 Max 10c cpu /24c gpu, 32 GB RAM, 1TB SSD, macOS Sequoia 15.1

2018 11" iPad Pro w/ A12X cpu/gpu, 256 GB, iPadOS 18.1

Link to comment
Share on other sites

A polygon and 2 double-stars will do.

your image is distorted a bit, I made a 32 polygon with same x/y size

IMG_1873.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

edit: Of course as soon as I post I realize how he did it with the stars (got thrown off by the use of the double star). Way easier, but I think the steps below are worth understanding. I'm still thinking their might be a way to adapt this for non regular polygons, if that were ever necessary. Still experimenting.

Like @ronnyb said, you can use the data entry tool to do this. It's not *automatic* per se but using data entry and the node tool you can do this process for any polygon. Two things to keep in mind are that this only works with *regular* polygons, and that sometimes the polygon tool doesn't render the shapes mathematically perfect, so there's some chance a diagonal could be (imperceptibly) not aligned with a vertex of the polygon.

Hopefully the vid is clear (this looks like a lot of steps but it's actually very quick once you get the hang of it)

  1. Drop the polygon in the center of the canvas.
  2. Use the pen to draw a line from the center to one of the vertices
  3. Move the transform origin to the center of the canvas/polygon
  4. Hit enter/return for the data entry tool
  5. For the "rotation" value, type 360/n where n is the number of sides
  6. Check duplicate
  7. Set the number of dupes to n - 1.
  8. Remove the unneeded lines, in this case the top line and the two adjacent line to the origin of our diagonals
  9. Select all the remaining diagonals and select the node tool
  10. DRAG to highlight the center nodes (just clicking will only select the top node)
  11. Move the node to the vertex of the polygon.
  12. From there you can use data entry tool again to make a second set of diagonals.

There's obviously many many ways to approach this but this to me is the least tedious of what I tried. (I also couldn't figure out what @NotMyFault meant by using double stars here and I'd love to see how that works)

 

Edited by George-Frazee
  • M1 Macbook Pro
  • 16gb RAM
  • Sonoma 14.5
  • Affinity Designer 2.5.6
Link to comment
Share on other sites

1 hour ago, George-Frazee said:

got thrown off by the use of the double star). Way easier, but I think the steps below are worth understanding.

I used double stars as the regular star shape on iPad is limited to 48 nodes, too few. 

Your solution is superior when using Desktop. I did not find a way to trigger „move/enter“ tool on iPad (no keyboard attached, no menu entry).

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

9 hours ago, George-Frazee said:

Like @ronnyb said, you can use the data entry tool to do this. It's not *automatic* per se but using data entry and the node tool you can do this process for any polygon. Two things to keep in mind are that this only works with *regular* polygons, and that sometimes the polygon tool doesn't render the shapes mathematically perfect, so there's some chance a diagonal could be (imperceptibly) not aligned with a vertex of the polygon.

Hopefully the vid is clear (this looks like a lot of steps but it's actually very quick once you get the hang of it)

  1. Drop the polygon in the center of the canvas.
  2. Use the pen to draw a line from the center to one of the vertices
  3. Move the transform origin to the center of the canvas/polygon
  4. Hit enter/return for the data entry tool
  5. For the "rotation" value, type 360/n where n is the number of sides
  6. Check duplicate
  7. Set the number of dupes to n - 1.
  8. Remove the unneeded lines, in this case the top line and the two adjacent line to the origin of our diagonals
  9. Select all the remaining diagonals and select the node tool
  10. DRAG to highlight the center nodes (just clicking will only select the top node)
  11. Move the node to the vertex of the polygon.
  12. From there you can use data entry tool again to make a second set of diagonals.

There's obviously many many ways to approach this but this to me is the least tedious of what I tried. (I also couldn't figure out what @NotMyFault meant by using double stars here and I'd love to see how that works)

 

If precision is a concern, make sure to increase decimal place accuracy in the app’s Settings to the highest number of decimal places and Zoom all the way when placing the rotation point/center, as snapping in Affinity is NOT precise unless zoomed in all the way… check and see. Snap at low vs high magnification and then zoom in to see…
 

Also you can use the Join command to connect a central node to each of the outer nodes instead of snapping, but that would be very tedious, useful only if your final use case warrants the efforts…

2021 16” Macbook Pro w/ M1 Max 10c cpu /24c gpu, 32 GB RAM, 1TB SSD, macOS Sequoia 15.1

2018 11" iPad Pro w/ A12X cpu/gpu, 256 GB, iPadOS 18.1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.