hatch image - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Tutorials and tips (https://www.gimp-forum.net/Forum-Tutorials-and-tips) +--- Thread: hatch image (/Thread-hatch-image) |
hatch image - denzjos - 01-03-2019 When I have to hatch a technical drawing, I have to draw a line, copy the layer and move the layer (multiple times). I thought a macro creator would be usefull and I've tried the Pulovers Macro Creator (open source). I've made a macro and it is satisfying. Before starting the macro one have to make sure the copy layer is tranparent and set the thichness of the pencil to 1.Then start with an empty image.The macro draw a new image, draw a 45 degree line, copy the layer and move it to the left. This is done up to 150 times. After the macro is ended, all one have to do is make the backgrond layer invisible and merge the visible layers (Image / Merge Visisble Layers). One can then copy and paste the transparent layer and then move the pasted layer to the right to fill out the empty space. Then it is advisible to crop the layer (Layer / Layer to Image Size). In attachment, the macro and the result. If the macro give a fault result on your computer, then change the sleep times. The macro is made for a keyboard with a keypad. It is possible that this does not work on a portable. Then change the Numpadx to x(where x is a number / press right mouse button to change) . I've made also a macro that draw lines with Pulovers Macro Creator but copy layers is much faster. [attachment=2446] I don't know how to post a file here so I'v made an image of the code : [attachment=2447] Denzjos RE: hatch image - Ofnuts - 01-04-2019 Two much better ways: 1) Use a pattern such as this and bucket-fill (if the white is transparency, you can easily hatch over an exist image): [attachment=2450]
Result: [attachment=2451]
You can also use more complex patterns to hatch with alternating dotted lines or the like... 2) Use the Blend tool:
[attachment=2452]
To attach images see this help page. RE: hatch image - Blighty - 01-04-2019 3) Use the Ofnuts path-inbetweener Available from here: https://sourceforge.net/projects/gimp-path-tools/files/scripts/ Step 1: Generate the paths Step 2: Stroke the paths RE: hatch image - denzjos - 01-04-2019 (01-03-2019, 01:55 PM)denzjos Wrote: When I have to hatch a technical drawing, I have to draw a line, copy the layer and move the layer (multiple times). I thought a macro creator would be usefull and I've tried the Pulovers Macro Creator (open source). I've made a macro and it is satisfying. Before starting the macro one have to make sure the copy layer is tranparent and set the thichness of the pencil to 1.Then start with an empty image.The macro draw a new image, draw a 45 degree line, copy the layer and move it to the left. This is done up to 150 times. After the macro is ended, all one have to do is make the backgrond layer invisible and merge the visible layers (Image / Merge Visisble Layers). One can then copy and paste the transparent layer and then move the pasted layer to the right to fill out the empty space. Then it is advisible to crop the layer (Layer / Layer to Image Size). In attachment, the macro and the result. If the macro give a fault result on your computer, then change the sleep times. The macro is made for a keyboard with a keypad. It is possible that this does not work on a portable. Then change the Numpadx to x(where x is a number / press right mouse button to change) . I've made also a macro that draw lines with Pulovers Macro Creator but copy layers is much faster. Made on screen resolution 1920 x 1080 RE: hatch image with GMIC QT - denzjos - 01-13-2019 In this discussion I've searched for another sollution and I found one in the GMIC filters. 1/ make a new square layer 2/ make a drawing on the layer [attachment=2479] 3/ make new layer (white / remove alpha channel) 4/ activate filter : G'MIC QT / patterns / strip and change parameters (different distances between the hatch lines ar possible) [attachment=2480] 6/ copy the new layer and select subtract from the layer below 7/ move the layer a few steps left or right [attachment=2483] 8/ merge down the layer and invert the color of the new layer 9/ make the layer invisible and select the layer with the drawing 10/ select the inside of the drawing with the fuzzy select tool 11/ invert the selection 12/ delete the selection (and merge the layers) [attachment=2484] Denzjos |