Add rounded corners to rect using a circle and booleans?

Post questions on how to use or achieve an effect in Inkscape.
arsenius
Posts: 18
Joined: Sat Jan 28, 2012 4:20 pm

Add rounded corners to rect using a circle and booleans?

Postby arsenius » Mon Jul 16, 2012 8:56 pm

Is there a way to use the path boolean operators to cut off the corners of a path? In this picture, I want to use the circle to cut off the corner, leaving the rest intact. I know that I could duplicate the larger object, add two nodes near the edges of the circle, delete the corner node, do "union" on the new object and the circle, and finally do "intersection" on the new path and the original. This is a little tedious, but more importantly, it made dozens of new nodes when I only started with five or six.

I'm wondering if there is a simpler way to create this effect.

Image

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Add rounded corners to rect using a circle and booleans?

Postby brynn » Mon Jul 16, 2012 11:03 pm

Is there some reason why you don't want to use the Rectangle tool's rounded corner feature? Because that's the easiest way! You could look in the manual, or I could explain, if you're not familiar. I seem to recall someone, some time ago, who didn't like it, because they couldn't control the radius of the rounded corner.....or something like that. Maybe that was you?

I don't clearly understand the process you're describing. If you convert the rectangle to path, you could place new nodes on the rectangle where the circle touches it (2 nodes for each corner) then delete the corner node. Then you wouldn't have to mess with Union and Intersection at all. Then the circle could be deleted (or whatever). The resulting rounded rectangle would have 8 nodes. But the rectangle tool would still be easier :D

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Add rounded corners to rect using a circle and booleans?

Postby Grobe » Tue Jul 17, 2012 12:10 am

Hi.

Have you considering using regular rounded corners and then just convert the object to a path?

If the problem is to achieve excact radi on rounded corners you can do this by simply moving guides from a rectangles corner. But the rectangle must be straight (ie. not rotated in iregular angles).
:lol:

arsenius
Posts: 18
Joined: Sat Jan 28, 2012 4:20 pm

Re: Add rounded corners to rect using a circle and booleans?

Postby arsenius » Tue Jul 17, 2012 2:18 am

Sorry, my phrasing appears to have distracted from the intent of my question. I just used the rectangle as an example, because I didn't know how else to phrase it. I want to use the circle to cut the corner off of any object, not just make rounded rectangles. (I'm aware of the rounded rect tool.)

Put another way, the circle in that picture is surrounded on all sides by the larger object. I only want to cut off the outside part (the corner). Is there an easy way to do that?

This is the process I tried to illustrate above. Hopefully it will be more clear. I'm wondering if this can be done with just the boolean functions, instead of deleting individual nodes.

I want to remove the corner at the arrow.
Image

Add two nodes on the rectangle, as close as possible to where the circle meets it.
Image

Delete the corner, and make a straight line. (I moved the circle underneath for this shot to make this clearer)
Image

Do a union, and it's all done.
Image

This is pretty easy with a circle, but imagine if you were using a star or irregular shape. Is there an easier way?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Add rounded corners to rect using a circle and booleans?

Postby brynn » Tue Jul 17, 2012 3:57 am

Would clipping suit your needs?

Or....if it's the same shape every time, you could make a sort of template shape, and use Difference. Like for the rectangle example, you'd have a sort of quarter moon shape, duplicate, place over the corner to be removed, then Difference it from the rectangle. If you can imagine the shape of what you want removed, that should work every time. You'd have to draw a new shape every time too, but you're already doing that.

Other than that, I can't think of a quick and easy way.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Add rounded corners to rect using a circle and booleans?

Postby druban » Tue Jul 17, 2012 2:22 pm

I think you might like the results from the Boolean operation division. No node editing or adding involved although aligning things exactly is often necessary.
rect43.png
rect43.png (29.83 KiB) Viewed 3436 times
Your mind is what you think it is.

arsenius
Posts: 18
Joined: Sat Jan 28, 2012 4:20 pm

Re: Add rounded corners to rect using a circle and booleans?

Postby arsenius » Tue Jul 17, 2012 5:23 pm

Druban, that's EXACTLY what I needed! Thank you!

By the way, if you don't mind, what font is that? Very neat looking.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Add rounded corners to rect using a circle and booleans?

Postby druban » Tue Jul 17, 2012 5:31 pm

Off topic:
Arsenius, the font is SF Fedora. Another question on this forum was about this font family so i downloaded it and developed quite a fondness for it. The docs did not say specifically but it looks like it's modeled after the title font of Raiders of the Lost Ark and its sequels, and the font name would bear that out.
Your mind is what you think it is.


Return to “Help with using Inkscape”