[SOLVED] Faster way to make corner rounded with given radius

Flesh out your ideas for new or improved Inkscape features before submitting a request.
User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

[SOLVED] Faster way to make corner rounded with given radius

Postby Grobe » Sun Jul 08, 2012 1:42 am

Hi.

If I have a path (not a square) with angles that is not equal to 90 degrees and I want to make a bend rounded, say I want a radius of 10 for that bend.
It's not very difficult to achieve that, but I need to create a circle and use guides to get it right.
I attach a simple file that show how I use to make a corner node round with radius.

I wish that there was a extension that made it possible to select a corner node and to make that two nodes with a given radius.
Attachments
Manual_rounded_corner.svg
(3.47 KiB) Downloaded 558 times
Last edited by Grobe on Sun Jul 22, 2012 9:13 pm, edited 1 time in total.
:lol:


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

Re: A faster way to make a corner rounded with given radius

Postby Grobe » Sat Jul 21, 2012 9:17 am

Hi.

The main disadvantage of using dynamic offset is
  • The whole outer line moves outwards. I need the object to stay put and not grow in size.
  • Cannot precisely control the bend radius.

If I must make several corners round with same radius, then I just use the same circle. But still - I wish there was an more automatic way to achieve this.

[edit]
I suddenly get aware ot that I only can achieve this easilly when the angle is close to 90 degrees. When the angle is wider or sharper, then I have to do the math to know where to put the other nodes :(
In the example I have a file with a bended path. I want that bend to have equal radius to the circle.

[edit #2]
Druban - The thread you link to have another type of problem. In that case the path is not determined from start and must be created. In this case, the path is already here and I have to change a corner node into two smooth nodes. The nodes and the node handles must be placed so the path forms into a rounded corner.
Rule to take acount for: The path that isn't part of any round corner is not allowed to move!
Attachments
Cannotgetitright.svg
(3.33 KiB) Downloaded 424 times
:lol:

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: A faster way to make a corner rounded with given radius

Postby ~suv » Sun Jul 22, 2012 11:15 am

Grobe wrote: In this case, the path is already here and I have to change a corner node into two smooth nodes. The nodes and the node handles must be placed so the path forms into a rounded corner.
Rule to take acount for: The path that isn't part of any round corner is not allowed to move!

Attached file was done with current trunk using tangential (to the circle) and perpendicular (to the line segments) snapping for the positioning of the guides. I'll post detailed steps later [1].

For the path forming the rounded corner I used a spiro spline with three nodes (with 3 nodes, this AFAIU always produces an arc) - the end nodes are snapped to intersections of guides with the original path, and the middle one to the intersection of guide and circle. I prefer this to path operations because you get nicer positioned nodes for the arc after converting the spiro spline effect to path.

The original path can either be node-edited (break at original sharp corner, snap end nodes to new position), or cut/divided/differenced with whatever combination of path operations you prefer (possibly with help of an auxiliary shape drawn on top, based on the guides).

grobe-Cannotgetitright-done-screenshot.png
grobe-Cannotgetitright-done-screenshot.png (33.99 KiB) Viewed 14940 times
grobe-Cannotgetitright-done.svg
(4.96 KiB) Downloaded 455 times

[1] Quick summary:
  1. convert path to guides (duplicate first unless you have changed the pref)
  2. move each guide and position it tangential to the circle (which itself is snapped with its center to the cusp corner node)
    --> the intersection of the two tangential guides gives you the center of the arc for the rounded corner
  3. create three additional guides, with the origin at the intersection of the two first guides:
    - two are rotated and snapped perpendicular to each of the line segments of the original path
    - one is rotated and snapped to the cusp corner node of the original path (angle bisector)
  4. (duplicate and) move the circle (snap its center to the guides intersection)
  5. zoom in closer and use the pen tool with 'Spiro splines' mode to draw the three-node path
    (draw only straight line segments (simple clicks, no fancy click&drag with the pen tool needed)):
    - start node snapped to intersection of perpendicular guide with line segment
    - mid node snapped to intersection of bisector guide and circle
    - end node snapped to intersection of perpendicular guide with line segment
  6. switch to the node tool, 'Ctrl+A', 'Shift+A' -> there's your arc.

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

Re: A faster way to make a corner rounded with given radius

Postby Grobe » Sun Jul 22, 2012 9:12 pm

Thanks a lot :D

I sat here yesturday and spent like two hours and stilll not getting it when trying myself. But I didn't had in mind the new features like snap to tangential, so therefore I was stuck.

Also because the fact that I've already told on the forum that I get it right, I did feel a certain pressure on me that I had to make it work somehow :?
:lol:

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: [SOLVED] Faster way to make corner rounded with given ra

Postby ~suv » Sun Jul 22, 2012 9:43 pm

Grobe wrote:I sat here yesturday and spent like two hours and stilll not getting it when trying myself. But I didn't had in mind the new features like snap to tangential, so therefore I was stuck.
It is also doable with current stable (i.e. without those new snap targets):

Basic steps for
  • Tangential guide: rotate the guide through the origin of the circle by 90° (relative), draw an auxiliary path (line) snapped along the rotated guide (e.g. from the center of the circle outwards, extending beyond the border of the circle), recreate the guide aligned with the original line segment, drag it and let the guide origin snap to the intersection of the circle and the auxiliary path (requires both snap targets 'Snap to path' and 'Snap to intersection' to be active. Tip: disable those two snap targets after that again (i.e. when not actively needed))
  • Perpendicular guide: create a guide along the original path (line segment), rotate it by 90° (relative), grab it and position it by snapping the origin to the intersection of the two tangential guides. Recreate the guide aligned to the original path (line segments), and the intersection between the perpendicular guide and the parallel guide is where to break the original path and combine it with the newly created arc segment.

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

Re: [SOLVED] Faster way to make corner rounded with given ra

Postby druban » Mon Jul 23, 2012 10:11 pm

Hi Grobe, ~suv has shown you a very nice and accurate construction method, but when you said
Grobe wrote:The main disadvantage of using dynamic offset is
The whole outer line moves outwards. I need the object to stay put and not grow in size.
Cannot precisely control the bend radius.

I felt I had not described my suggestion very accurately, so here's a little graphic that might explain better.
rect4230.png
rect4230.png (120.7 KiB) Viewed 14886 times

I am not sure if you understood the other method, making an arc using the ellipse control bar - or just did not like it, but I thought I should explain
druban wrote:The angle of the sector you will need to round your corner will be (180 - the angle of your corner).
says 180 MINUS the angle of your corner .... looked like a dash, and probably made no sense. If you need more explanation let me know.
Your mind is what you think it is.

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: [SOLVED] Faster way to make corner rounded with given ra

Postby RobA » Tue Jul 24, 2012 6:03 am

I came up with a relatively easy way to create controlled fillets and rounds to many shapes in Inkscape:

http://www.youtube.com/watch?v=KNerZKQk8tE

It will not work for all shapes - specifically, when you set the initial stroke width defining the round/fillet radius, that stroke can't overlap itself or this will not work.

-Rob A>

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: [SOLVED] Faster way to make corner rounded with given ra

Postby ~suv » Wed Jul 25, 2012 6:38 am

RobA wrote:I came up with a relatively easy way to create controlled fillets and rounds to many shapes in Inkscape: (…)

Great idea!! thanks for sharing :)

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

Re: [SOLVED] Faster way to make corner rounded with given ra

Postby druban » Thu Jul 26, 2012 5:48 am

I made a graphic showing the ellipse tool method, i hope it's a better explanation than before. No use of special developmental or deprecated tools. I had a little method to bisect an angle here http://www.inkscapeforum.com/viewtopic.php?f=28&t=12312&sid=5d35822c6c7b8c3772762f031731aa92#p46711 so I am carrying on from that point.
rect4885.png
rect4885.png (66.6 KiB) Viewed 14813 times
Not terribly exciting eh.
Your mind is what you think it is.

GeorgeZ
Posts: 6
Joined: Tue Dec 19, 2017 9:39 am

Re: [SOLVED] Faster way to make corner rounded with given radius

Postby GeorgeZ » Tue Jun 26, 2018 9:40 am

I had a very similar problem and wrote a simple extension to draw a chamfered corner when a radius is given.

Screenshot_2018-06-25_19-30-14.png
How to use
Screenshot_2018-06-25_19-30-14.png (128.99 KiB) Viewed 6583 times


Here is how to use the extension:
1. You draw an auxiliary line from points 1 to 5 to 4.
2. With the auxiliary line selected, click menu Extensions > Render > Draw Chamfer
3. Enter the radius in inches (I normally draw in inches).
4. The extension will draw a path from 1 to 2 to 3 to 4. The arc from 2 to 3 is the chamfered corner with a radius R.

I try to make the extension very simple. It currently only draws arc in clockwise direction. If you draw the auxiliary line from 4 to 5 to 1, result will be different.
Feel free to modify the code to suite your needs.
Attachments
draw_chamfer.zip
(2.56 KiB) Downloaded 354 times

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

Re: [SOLVED] Faster way to make corner rounded with given radius

Postby Moini » Wed Jun 27, 2018 4:39 am

Can you share the extension on the Inkscape website (and if you have a repository for it, link to it from there - for example, gitlab.com offers free hosting for open source projects)? It looks like a very useful addition.

See https://inkscape.org/en/develop/extensi ... -extension for more info about the requirements for extensions uploaded to the inkscape.org website.
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 “Inkscape Ideas”