Gimp-Forum.net
ofn-path-to-shape - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: ofn-path-to-shape (/Thread-ofn-path-to-shape)

Pages: 1 2


ofn-path-to-shape - Ofnuts - 12-16-2016

Took me a while to figure out the math, but I eventually got them: the Reuleaux polygons:

[attachment=186]

Still a few things to do before it goes public Smile


RE: ofn-path-to-shape - Ofnuts - 12-17-2016

For /u/oranjuiced:

Using ofn-path-to-shape and ofn-âth-edits
  • Create a single line path that goes from the center of your canvas to one vertex of your polygon. Then use *Shape>On segments>Polygon or spokes* and generate the polygon (using "Circumcircle). This will create the 'inner' polygon. 
  • On that polygon, use *Shapes>On segments>Modify segments*, keep start=0 and use end=10 (for a rounding radius that will be 1/10 of the polygon side).
  • On these short segments, use *Shapes>On segments>Circles* with Radius/Consecutive to create a small circle around each polygon vertex.
  • Use Edit>Break path part to put each circle it is own path
  • Make one circle path "linked", and use *Shapes>Various>Tangents>Tangents between circles* on each of its two neighbors to generate the tangents. Repeat until you have all the tangents. Clean up the extra tangents.
  • Cut the circles using the tangents and connect the remaining arcs (the procedure is described in the help).
Really a couple of minutes when you know. XCF attached.


RE: ofn-path-to-shape - Ofnuts - 12-20-2016

Getting there. New set of functions coming, rounded polygons:

[attachment=199]


RE: ofn-path-to-shape - Ofnuts - 12-23-2016

Testing with path-inbetweener...

[attachment=200]

Now back to my trig formulas...


RE: ofn-path-to-shape - oranjuiced - 12-24-2016

Hi Ofnuts,

Shouldn't the inner polygon have rounded corners too?

Thanks


RE: ofn-path-to-shape - rich2005 - 12-24-2016

re: Path inbetweener

Within reason you interpolate between whatever shapes you can make, the only requirement is each path has the same number of nodes. This using the old shape-path script to create the paths, then a bit of path editing to get a rectangle with 8 nodes.
[attachment=201]


RE: ofn-path-to-shape - Ofnuts - 12-24-2016

(12-24-2016, 04:28 AM)oranjuiced Wrote: Hi Ofnuts,

Shouldn't the inner polygon have rounded corners too?

Thanks

Not necessarily. Here, I made the two paths, an outer rounded pentagon, and the sharp pentagon whose summits are the centers of the circle arcs that round the outer pentagon, so the inside is a sharp pentagon. I could have just as well used an inner pentagon with still rounded angles:

[attachment=202]

Another way to see it is that what changes in these pentagons is both the size and the roundness, because you have to change the "roundness" to keep the center of the circle arcs the same in the inner and outer polygons.

Here is what happens when you keep the roundness constant:

[attachment=203]

As you can see the rounds are thicker (when you look closely, the successive paths aren't exactly parallel in the arcs, because these arcs haven't got a common center).


RE: ofn-path-to-shape - Ofnuts - 12-26-2016

A last one while I finish the doc....

[attachment=204]


RE: ofn-path-to-shape - Ofnuts - 12-26-2016

New version with rounded polygons:

https://sourceforge.net/projects/gimp-path-tools/files/scripts/ofn-path-to-shape.zip/download


RE: ofn-path-to-shape - Ofnuts - 12-26-2016

Strangely this was made with pentagons...

[attachment=206]