How do I merge these two hoops?

Post questions on how to use or achieve an effect in Inkscape.
Kimiec
Posts: 6
Joined: Thu Apr 26, 2018 5:55 am

How do I merge these two hoops?

Postby Kimiec » Wed Jun 06, 2018 11:07 am

I'm having the hardest time figuring out how to join these two hoops to make them look like the shape on the bottom but merge at the top of the hoops. Help! Thanks in advance!
Attachments
inkscapequestion.jpg
inkscapequestion.jpg (234.02 KiB) Viewed 2262 times

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How do I merge these two hoops?

Postby Moini » Wed Jun 06, 2018 11:54 am

Move them together, do Ctrl++ (or Path > Union).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Kimiec
Posts: 6
Joined: Thu Apr 26, 2018 5:55 am

Re: How do I merge these two hoops?

Postby Kimiec » Wed Jun 06, 2018 3:02 pm

Thanks. I've tried path-union, doesn't work. They just join into one big circle. I want the two hoops to become like the shape on the bottom but joined at the top.

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

Re: How do I merge these two hoops?

Postby Xav » Wed Jun 06, 2018 6:28 pm

Is each hoop a single path element (with two subpaths)? Or are your two hoops actually four separate circles?

If it's the latter, start by selecting each pair of circles that makes up a single hoop, then using Path > Difference. Do that for both hoops, to turn each one into a single path element with two subpaths. You should then be able to use Path > Union as suggested.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

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

Re: How do I merge these two hoops?

Postby Polygon » Wed Jun 06, 2018 6:30 pm

Maybe try this instead: combine every two circles and then boolean union them:
union.jpg
union.jpg (54.16 KiB) Viewed 2186 times


Cheers
P.
Last edited by Polygon on Wed Jun 06, 2018 10:52 pm, edited 1 time in total.

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

Re: How do I merge these two hoops?

Postby Xav » Wed Jun 06, 2018 10:19 pm

@polygon: in English versions of Inkscape ctrl+C is used for "Copy". Path > Combine is ctrl+K

Also your method varies depending on the "fill-rule" in the fill and stroke dialog. If it's set to "nonzero" rather than "evenodd" then combining the circles can still leave the centre filled (unless the direction of the inner circle is reversed), and the union then results in a single filled circle.

Path > Difference is a "safer" option as it's not affected by the fill rule - but, of course, it is affected by the stacking order of the circles, so there could still be a problem there as the lack of a fill on the OPs image makes it hard to tell whether the small circles are on top of the larger ones or vice versa.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

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

Re: How do I merge these two hoops?

Postby Polygon » Wed Jun 06, 2018 11:02 pm

@Xav. Sure - you´re right I was misguided by "Combine". :?
From my experience you don´t need to adjust the fill rule no matter how I draw the circle nor the z-order makes a difference - so I guess the evenodd fill-rule is a standard behaviour when combining shapes.

Cheers
P.

Kimiec
Posts: 6
Joined: Thu Apr 26, 2018 5:55 am

Re: How do I merge these two hoops?

Postby Kimiec » Thu Jun 07, 2018 12:58 am

Wow thanks friends, it worked! I tried both ways, playing with fill-rules and also path-difference then union. There's so much to learn with Inkscape! I need to do some research on the fill-rule, I'm quite clueless as to exactly what nonzero and evenodd are. Thanks again!

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

Re: How do I merge these two hoops?

Postby Xav » Thu Jun 07, 2018 1:07 am

The problem is that the fill rule can be different depending on the user's settings, and what else they've been doing with Inkscape before. Try these steps, for example:

  1. Launch a new instance of Inkscape, with no others running.
  2. Make sure that Preferences > Tools > Shape > Ellipse is set to "Last Used Style".
  3. Open the Fill & Stroke dialog.
  4. Draw an ellipse.
  5. In the Fill & Stroke dialog, set the fill rule to nonzero.
  6. Quit Inkscape without saving the document.
  7. Launch a new instance of Inkscape.
  8. Open the Fill & Stroke dialog.
  9. Draw an ellipse. You should see that the fill rule is still set to nonzero, even though you've closed Inkscape and launched it again.

You can see from this that the fill rule can easily propagate from one Inkscape session to the next, if the user has "Last Used Style" set. So if the user had previously set the fill rule to nonzero - perhaps intentionally, or perhaps just wondering what the button was for - they could end up with it "stuck" even though they've started a completely new document.

Now, with the fill rule set to nonzero:

  1. Draw an ellipse.
  2. Draw a second, smaller ellipse inside the first.
  3. Path > Combine.

In this case the centre of the shape is not removed. This isn't immediately obvious if there's no fill set, as in the OP. Doing a union of two such shapes, as described above, will just result in a big circle.

If there's a fill set then the problem stands out more. Changing the fill rule will fix it for each shape, then the union works.

But using Path > Difference works regardless of the fill rule.

So whilst I agree that Path > Combine will often do the trick, it might lead to failure, depending on the user's fill rule setting, which in turn can depend on what they were last working on. For a beginner with the software it could lead to further confusion as to why it's not working.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

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

Re: How do I merge these two hoops?

Postby Xav » Thu Jun 07, 2018 1:12 am

Kimiec wrote:Wow thanks friends, it worked! I tried both ways, playing with fill-rules and also path-difference then union. There's so much to learn with Inkscape! I need to do some research on the fill-rule, I'm quite clueless as to exactly what nonzero and evenodd are. Thanks again!


IMO the fill rule is usually more trouble than it's worth, and not something to worry about as a beginner. That's kind of the point that I was trying to make to Polygon - that Path > Difference is a "safer" option to present to a beginner, simply because it's not affected by the fill rule, so there's less that can go wrong.

As to your original problem: think of the circles as though they've been cut out of paper and laid on top of each other (adding a fill would help make things clearer). In order to achieve the effect you were after, you have to use the shape of the smaller circle as a template to cut the middle out of the larger one: that's what Path > Difference does. (Path > Combine is subtly different, and harder to explain with an analogy, but can generally lead to the same result)
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

Kimiec
Posts: 6
Joined: Thu Apr 26, 2018 5:55 am

Re: How do I merge these two hoops?

Postby Kimiec » Thu Jun 07, 2018 1:33 am

Wow, thanks so much for the fill-rule lesson. I don't have it 100% digested yet but will continue to play with Inkscape and learn. Thanks again!

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

Re: How do I merge these two hoops?

Postby Xav » Thu Jun 07, 2018 1:40 am

Just to clarify, the earlier long post was more of a response to Polygon than anything I think you should worry about right now, Kimiec. It's just that you had already replied by the time I posted, making it look like I was replying to you. That's why I then did a follow-up shorter post.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

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

Re: How do I merge these two hoops?

Postby Polygon » Thu Jun 07, 2018 3:26 am

@Xav. At least you´re saying or expecting "Last Used Style" is on by default which isn´t the case here me thinks.

Cheers
P.

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

Re: How do I merge these two hoops?

Postby Xav » Thu Jun 07, 2018 5:18 pm

Polygon wrote:@Xav. At least you´re saying or expecting "Last Used Style" is on by default which isn´t the case here me thinks.


That's exactly my point: your settings and drawing history are different to mine, so Path > Combine behaves differently for both of us, whereas Path > Difference behaves the same. Since we don't know about the OP's settings and history, I'm simply pointing out that it's safer (in a trivial case like this) to suggest using the Boolean operations rather than Combine, since there's a stronger guarantee that it will work.

I'm not saying there's anything wrong with Combine, or with your settings, or even with the method you used. Just that it comes with caveats that won't be immediately obvious to a new user.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How do I merge these two hoops?

Postby Moini » Fri Jun 08, 2018 3:09 am

@Polygon: the default is indeed 'Last used style' for rectangles, stars, ellipses, 3D-Boxes, Calligraphy tool, etc. - everything that has 'usecurrent=1' set in the preferences (https://gitlab.com/inkscape/inkscape/bl ... skeleton.h).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”