Help with modified gear and fill

Post questions on how to use or achieve an effect in Inkscape.
grumple
Posts: 6
Joined: Wed Jun 21, 2017 11:09 pm

Help with modified gear and fill

Postby grumple » Wed Jun 21, 2017 11:22 pm

Hi all,
It's my first post so be easy on me. :lol: I have created a gear using the gear tool in Inkscape 092.1 and then added some circles on the gear to simulate bolt holes. When I try to fill the object with a color, it also fills in the bolt holes, which i want to remain transparent. I tried a few thing and got nowhere other than mixing two colors to make a third. I tried to select the circles and add them to a new layer but they never showed up on the other layer. In fact I could delete all layers including layer 1, which I assumed had the original gear on it and it remained on the screen.I am somewhat new at this app but not new to graphics in general. So what I need it to figure out how to color my gear and then punch transparent holes in it.
Thanks,
grumple

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Help with modified gear and fill

Postby Polygon » Thu Jun 22, 2017 12:15 am

Select gear and circles and press ctrl+K for combining the parts to a compound path. Adjust fill&path accordingly.

Cheers
P.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Help with modified gear and fill

Postby Xav » Thu Jun 22, 2017 12:18 am

(Beaten by Polygon, but I'll post anyway as my instructions are a bit more step-by-step)

If by "gear tool" you mean the extension in Extensions > Render > Gear > Gear, then that creates a group of one or two objects (depending on whether or not the diameter of the centre hole is zero). For the fill to work the way you want, you need to have a single path rather than multiple objects. Here's the approach I'd take:

1) Create the gear.
2) Draw your other circles on it.
3) Select the gear and your other circles, then select Path > Combine (Ctrl-K) to turn them all into a single path. Check the status bar to confirm that's what you've got.
4) With the shape selected, click on one of the swatches at the bottom of the screen to give it a fill colour.
5) With luck that will have done the job. If your holes are still getting filled you probably need to change the "Fill Rule". With the shape selected still, open the Fill & Stroke dialog (Object > Fill & Stroke), then in the "Fill" tab select the penultimate button along the top. The tooltip should mention "fill-rule: evenodd".
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

grumple
Posts: 6
Joined: Wed Jun 21, 2017 11:09 pm

Re: Help with modified gear and fill

Postby grumple » Thu Jun 22, 2017 12:22 am

Thanks guys. I will give this a try and report back. I did make the gear with RENDER-GEAR and did have a center circle involved. And Xav, thanks for the detailed reply. Great info.
grumple

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Help with modified gear and fill

Postby theozh » Thu Jun 22, 2017 12:27 am

you might find some other useful information about drawing gears here:
http://howto.nicubunu.ro/gears/
Win7/64, Inkscape 0.92.2

grumple
Posts: 6
Joined: Wed Jun 21, 2017 11:09 pm

Re: Help with modified gear and fill

Postby grumple » Thu Jun 22, 2017 12:40 am

Ok, I tried it multiple times and it almost works. ;) The circles for the bolt pattern work with the Combine CTRL-K but the other holes I have put on there have a different shape and were extracted from a traced bitmap. I can fill them separately but not what I am wanting to do. They also have that line between the colored border when I do that.They just fill with the rest of the gear. I tried the fill rule "even-odd" change and no go. But it is progress.
Thanks,
grumple

grumple
Posts: 6
Joined: Wed Jun 21, 2017 11:09 pm

Re: Help with modified gear and fill

Postby grumple » Thu Jun 22, 2017 12:43 am

theozh wrote:you might find some other useful information about drawing gears here:
http://howto.nicubunu.ro/gears/


Good info. I already looked at that last night before I went to bed and tried some of it. It doesn't apply to what I want to do. I can export my handy work as a PNG and it looks fine and has the transparent areas like it should in an image editor. But I want to have a vector graphic for best results.
Thanks,
grumple

P.S.S. Funny thing is I just tried my file and it worked without any changes. It looks rough around the edges in the larger cutouts though so I need to know how to fix that. When I slide it off the original it looks better but could still be improved.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Help with modified gear and fill

Postby Xav » Thu Jun 22, 2017 2:00 am

grumple wrote:Ok, I tried it multiple times and it almost works. ;) The circles for the bolt pattern work with the Combine CTRL-K but the other holes I have put on there have a different shape and were extracted from a traced bitmap.


Best to upload an example file, if you can.

"Extracted from a trace bitmap" probably means they're already composite paths (i.e. made up of more than one sub-path). Consider tracing a simple circle - you end up with two paths, one for the inside of the shape and one for the outside. One solution is "centerline tracing" to only get one path (search the forum, there's been a few mentions of it). The other approach is to break the traced shape apart (Ctrl-Shift-K) and delete the inner or outer path to leave you with just a single path. That can then be combined with the gear as described above.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

grumple
Posts: 6
Joined: Wed Jun 21, 2017 11:09 pm

Re: Help with modified gear and fill

Postby grumple » Thu Jun 22, 2017 2:06 am

Ok, here is the file. It seems to work now but yesterday I was having no luck at all. Maybe I was just making too many layers trying to fix it and got in a rut. Any tips/tricks/info on making it better??
Thanks,
grumple
Attachments
sprocket-5.svg
(24.67 KiB) Downloaded 193 times

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Help with modified gear and fill

Postby Xav » Thu Jun 22, 2017 2:38 am

If you use View > Display Mode > Outline you'll see that the "kidney" shapes are as I described above - a pair of paths, one inside the other (you may need to zoom in to see it clearly).

Use the instructions in my previous post, and you should be fine. You might find it easiest to make the edits in Outline Mode, to avoid confusion with the fills when you break the shapes apart.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

grumple
Posts: 6
Joined: Wed Jun 21, 2017 11:09 pm

Re: Help with modified gear and fill

Postby grumple » Thu Jun 22, 2017 4:45 am

Xav,
I zoomed in with the display mode and removed 1 line from each of those shapes. Now when I try to fill, it adds the second line back to any object or the whole object when i do that? I am sure I am still doing something wrong here but I will keep at it until it sinks in. ;) I went to the "Autotrace" website and they appear to out of business.
Thanks,
grumple

Edit: I figured it out. I had to toggle the display mode back to "normal" and it works perfect. 8-) Thanks!

Deep
Posts: 1
Joined: Fri Oct 20, 2017 6:11 am

Re: Help with modified gear and fill

Postby Deep » Fri Oct 20, 2017 6:17 am

I have used sketchup and Vcarve just started inkscape, I am trying to make a gear with a .25 inch center hole but the program seems to default to a .2 size hole? There must be something simple I am missing that sets the unit accuracy? Thanks for your help

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Help with modified gear and fill

Postby Polygon » Fri Oct 20, 2017 5:11 pm

It seems the gear extension just allows one decimal place.
So you have to leave the hole at " 0,0", draw one circle manually and combine it with the gear:
Gear.png
Gear.png (24.63 KiB) Viewed 2197 times


Cheers
P.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Help with modified gear and fill

Postby Lazur » Fri Oct 20, 2017 9:12 pm

Hi.

Not sure if mentioned before in this topic, didn't read through. Judged by the gears lpe the extension of the same function may not be the best to start with for a working solution with evolutes/cnc etc.
Would suggest trying the improved extension -found at the extension repository.

If that's just a spinbox limitation you need to adress, you can edit the inx file of the extension with a notepad. As mentioned in a similar problem.


Return to “Help with using Inkscape”