Add Nodes to Path - 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: Add Nodes to Path (/Thread-Add-Nodes-to-Path) |
Add Nodes to Path - carmen - 06-20-2020 I wanted to add 'sea currents' to a map, as in the figure: [attachment=4561] It could be done in Inkscape through 'markers', but I wanted it as a purely 'stroke path'--better for small, indexed images. As can be seen, I succeeded trough the following steps: - oriented paths made in Gimp - export them to svg, and open in Inkscape - Inkscape Extensions -> Modify Paths -> Add Nodes... -> By max. segment length = 30.0px - import the modified paths into Gimp, and:
RE: Add Nodes to Path - Blighty - 06-20-2020 See this thread: https://www.gimp-forum.net/Thread-a-few-arrows-along-a-path RE: Add Nodes to Path - carmen - 06-20-2020 (06-20-2020, 02:11 PM)Blighty Wrote: See this thread:Yes--but when your images are e-pub illustrations (no sense to make them more than ~600px in each direction--they get resized by 'user agent') pure paths look better IMHO. Moreover, I liked in my example the 'custom dashes' that result from resizing the segments: their lenght is (basically, barring miters) independent from the stroke width. Also, instead of adding arrowheads, one can i.e., use ofn-paths-shapes to put a circle in each segment--thus, 'custom dots'... RE: Add Nodes to Path - Ofnuts - 06-20-2020 I don't like the idea of adding anchors at fixed distances. Paths are basically size-less things. I do have an algorithm to add anchors halfway between current anchors to increase the path "accuracy" (or more accurately, its resilience to mistreatment). It can of course be applied a few more times to divide segments by 2, 4, 8, 16... As to your sea currents, I would solve that with a totally different script of mine: ofn-tex-along-path (using repeated layout) with an arrow symbol (large choice to cut/paste from here)(*) as the text: [attachment=4564]
(*) There is a huge set of symbols in the Unicode standard. It also contains emojis now so you can use ofn-tex-along-path to make a crown of poop emojis or a heart of dog heads... RE: Add Nodes to Path - carmen - 06-20-2020 [attachment=4565 Wrote:Ofnuts pid='18808' dateline='1592692532']I don't like the idea of adding anchors at fixed distances. Paths are basically size-less things. I do have an algorithm to add anchors halfway between current anchors to increase the path "accuracy" (or more accurately, its resilience to mistreatment). It can of course be applied a few more times to divide segments by 2, 4, 8, 16...
Here is the the result of 'ofn-text-along-path(multi)' with the arrow at 12px and the same paths as in my first attachment, previous to split: [attachment=4565] The problem with font size is apparent: for a fair result, one must (a) duplicate the layer (the path is filled on transparent background) or (b) stroking, besides filling or (c ) use a bold font: all these methods give a coarser result than the simple stroking in my original example... RE: Add Nodes to Path - Ofnuts - 06-21-2020 (06-20-2020, 11:41 PM)carmen Wrote: Here is the the result of 'ofn-text-along-path(multi)' with the arrow at 12px and the same paths as in my first attachment, previous to split: There are thin and thick arrows in the Unicode set, and it may of course depend on the actual font (though I suspect that on a given system few fonts carry these symbols and most will default to the same font). In other news, I have added a "Densify anchors" function in ofn-path-edits. RE: Add Nodes to Path - carmen - 06-21-2020 (06-21-2020, 03:35 PM)Ofnuts Wrote: There are thin and thick arrows in the Unicode set, and it may of course depend on the actual font (though I suspect that on a given system few fonts carry these symbols and most will default to the same font).How right you are! Windows, for instance, at most will use the same font for all serif and another for all sans--unless the font in question happens to provide the glyph, which nearly none do... Quote:... Just about to try it, to redo my first example. But first, a VERY BIG THANK YOU for all your work. RE: Add Nodes to Path - carmen - 06-21-2020 Well--Edit -> Densify anchors won't answer for my initial example--the image should show why. [attachment=4568] However, it does work for my 'borderline' bent text, as shown in this other example: [attachment=4567] Bottom: Original text Center: bent straightaway Top: bent after densifying once. Behind this, not showing in the capture, is the result after Inskcap 'Add nodes...': the differences in the path are truly minimal, but as either needs further editing, 'Densify anchors' gives a more workable result: fewer anchors to deal with... (And, of course, the semicircle--2 disjoint strokes--is the 'bender path'.) RE: Add Nodes to Path - Ofnuts - 06-21-2020 If you want more accuracy, you can apply Densify Anchors several times, for 2x, 4x, 8x anchors... |