Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Inkscape, rounding the corners of a rectangle is easy - you select the object, press F4 (rectangle tool), and drag the circular nodes.

How do you do that for more complex shapes?

polygon, and its rounded equivalent

"Dynamic offset" is nearly the right thing, but it doesn't round the insides of a concave polygon.

share|improve this question

11 Answers 11

up vote 7 down vote accepted

This seems to be a weak point with Inkscape, to not have a simple way to do this. The best way to deal with this I've found so far is:

  1. Make several rounded-corner rectangles, using the desired final corner radius
  2. Butt them up against each other to make the overall final shape, not minding the spots where corners don't meet due to roundness,
  3. Path-union them into one path
  4. Fix the extraneous notches by deleting their nodes.

Luckily someone has described this technique online, with illlustrations (scroll down a bit) http://www.inkscapeforum.com/viewtopic.php?f=5&t=880

I hope there's a path-editing tool that can just convert a path the way you (and fifty thousand other Inkscape users) want, somewhere out there. If not, this would make a great weekend coding project.

share|improve this answer

Another makeshift solution with issues, but which also works for non-rectangular shapes:

  1. Apply Dynamic Offset to your object.
  2. Convert Object to Path.
  3. Add Nodes (under Extensions → Modify Path). This is optional but will most probably improve your results drastically. The more the merrier.
  4. Apply a dynamical inset (i.e., negative Dynamical Offset) to your object.
  5. If desired, convert Object to Path once more and Simplify.
share|improve this answer
    
see also inkscape.org/doc/advanced/tutorial-advanced.html -- inset / offset are ctrl+( and ctrl+), dynamic offset is ctrl+J to add a draggable handle – Jason S Dec 2 '14 at 16:10
  1. Select the rectangle or square
  2. Select the nodes option
  3. On the right hand corner, you will see a round node instead of a square node. Drag down the node until you get the rounded corner you want.
share|improve this answer
    
awesome and dead simple! – SleepyCod Feb 13 '15 at 15:46
    
What is this 'nodes option'? Screenshots would be lovely. – RAnders00 Sep 16 '15 at 19:23
    
That's great for rectangles or squares, but how does this help for more complex shapes like the one in the question? – Tom Pohl Nov 28 '15 at 18:04

This can be achieved using the Fillet/Chamfer path effect (currently only available in the developer version 0.91+devel, which can be found here).

Here's how you use it:

  1. Select the path that you want to modify and then open the path effects tab under Path > Path Effects....

    Unmodified path

  2. Add a new effect in the path effects window and select Fillet/Chamfer.

    enter image description here

  3. Choose a radius that you want to apply to the corners of the path, and press the Fillet button.

    The filleted path

  4. If you only want to round some of the corners, tick the Change only selected nodes box and select the nodes that you want to change in path edit mode before clicking the Fillet button.

share|improve this answer
    
This effect seems to be added in Inkscape 0.92 which is not released at the time I wrote this comment. – Levi Morrison Apr 12 at 19:05

Here's another method that I've just discovered when I wanted to add rounded corners to an existing irregular polygon for the purposes of creating a laser cut perspex design that is more resilient to cracking.

  1. Choose the Edit Paths By Node (F2) tool and select the corner node that you want to make rounded.

  2. Hold down Ctrl-Alt and click slightly along the horizontal line away from the corner to add a new node.

  3. Do the same again to create a new node slightly along the vertical line to add another new node.
  4. At this stage I return to the two new nodes and ensure that they both have a constant offset from the corner. e.g. 2mm away.
  5. Select the corner node and press Del to delete it. Your corner should now look like this:

rough corner

  1. Drag the two bezier points at the bottom left so that they form a satisfactory curve. I hold down Ctrl and align them on top of each other to look like this:

Aligned

share|improve this answer
    
Nice solution! One addition to Step 3: I would suggest to use Extensions -> Modify Path -> Add Notes ... to add the nodes in order to have the Nodes at the same distance to the edge at each edge. – daniel.neumann Feb 29 at 8:10

Another solution to this problem is to use the path division tool. The advantage here is that the radii can be explicitly set as a number

  1. Create the rectangle
  2. Create a circle with the desired radius
  3. Align the circle into the corner of the rectangle
  4. Select the rectangle and the circle, and use Path-> Division
  5. Delete the unwanted corner piece
  6. Do a Path-> Union between the new circle and the original rectangle
share|improve this answer

I've had success with just using Bezier curves. E.g. I would draw the OP's L shape like

|
|
|
 \
  \
   \_________

(very rough ASCII art!) i.e. with a diagonal line where the rounded corner should be, and then adjust the Bezier control points for the two line join points.

share|improve this answer

Since there is no clean solution, let's mention another one, using GIMP!

1- Make a copy of only this object in another Inkscape instance (in case you have other objects)

2- Export to bitmap (a png file)

3- Open the png with GIMP, select the shape by "Select by Color Tool"

3- Select -> Feather -> by R pixels (the radius)

4- Color the selection and save/export to png again

5- Open the modified png file with Inkscape and use "Trace Bitmap" tool to get a rounded path (since the shape should be single-colored, it's easy and probably clean)

share|improve this answer

For a purely cosmetic effect (that is, you don't end up with a rounded path) you could try applying the Filters > Blurs > Cross-smooth effect. Then open the Filter Editor and set the Standard Deviation Effect Parameter to about 1.0.

share|improve this answer

I have used another method. Once i got used to it, and learned how to use the snapping options, I find that I could work pretty fast. This works best with paths composed by orthogonal lines that are parallel to the axis.

  1. Subtract a circle having the radius you want from a square to create a 'cutter' shape. Put the centre of the circle on one of the square corners and size the square as the circle diametre. This ensures that the centre of your cutter will be aligned with the arc edges:
    enter image description here
  2. Duplicate your cutter to be able to reuse it and align it put it on the corner that you want to round. Activate snapping of centres of objects and cusp nodes to align the cutter exactly where you want. enter image description here
  3. If necessary, rotate the cutter along its centre to align the arc with the edges of the underlying path
  4. Select the original path and the cutter and do a boolean difference, if your corner is convex, a boolean union if it is concave. Your corner is now rounded!
  5. Duplicate the cutter and repeat for all the corners you wish.
  6. If your initial shape was open, the boolean operation will have closed it. You may have to reopen it att he end of the process.
share|improve this answer

You can use the XML Editor in Inkscape to make rectangles rounded corner. Open the XML Editor, select the <svg:rect element. Add the rx and ry attributes, in the lower right of the XML Editor there are two fields and a Set button. Put rx in the top field, and 10 or any other number, then press Set.

share|improve this answer
    
In theory a nice idea. Practically, the objects that are mentioned in the question are no rectangles anymore. One can set the ry and rx attributes but they are not interpreted. – daniel.neumann Feb 29 at 8:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.