Strokes become spiky - why?

Post questions on how to use or achieve an effect in Inkscape.
six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 7:35 pm

Hello there,

did anyone else ever experience the problem of little spikes appearing out of nowhere when you choose "Miter join" in the stroke style menu (see pictures, first one is "Round join", second one is " Miter join", the spike is circled)? So far I always removed these spikes manually after converting the strokes into paths. Is this a bug? Do you have a solution to this problem?

Thanks a lot!

six67
Attachments
Round join.png
Round join.png (36.29 KiB) Viewed 4183 times
Miter join.png
Miter join.png (37.26 KiB) Viewed 4183 times

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

Re: Strokes become spiky - why?

Postby Lazur » Mon Oct 16, 2017 8:58 pm

Hi.

Captain obvious here, the miter joins are rendered at the joins.
Meaning, where you see those spikes rendered, you have an unnecessary "corner" in the path with more than one node.
There are probably at least 3 nodes in the area you circled -two too many.

With the node editor I'd select all of them,
click the delete segment between two non-endpoint nodes icon -this will result in only 2 nodes, both ow which are unconnected start-end nodes-
and then click the join selected nodes icon, maybe even set node smooth after.
This should prevent any spike in the area, and would produce a much better result after converting stroke to path.

Would suggest to use roun joins for such a task in general.

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 9:21 pm

Lazur wrote:Hi.

Captain obvious here, the miter joins are rendered at the joins.
Meaning, where you see those spikes rendered, you have an unnecessary "corner" in the path with more than one node.
There are probably at least 3 nodes in the area you circled -two too many.

With the node editor I'd select all of them,
click the delete segment between two non-endpoint nodes icon -this will result in only 2 nodes, both ow which are unconnected start-end nodes-
and then click the join selected nodes icon, maybe even set node smooth after.
This should prevent any spike in the area, and would produce a much better result after converting stroke to path.


When I take a closer look at the nodes of the stroke I see many nodes in irregular intervals. Deleting certain nodes does indeed remove the spike. But sometimes this leads to another spike popping up somewhere else. Besides it's a round stroke so there are no corners. The nodes simply follow each other along the round path. I don't really see why one of these nodes can cause such a spike. Anyway, by deleting some nodes I'm able to get rid of the spikes so you helped me solving my problem. Thank you! :-)

Lazur wrote:Hi.
Would suggest to use roun joins for such a task in general.


When using round joins I would also get round corners (see first picture) which is not really what I want in this case.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Strokes become spiky - why?

Postby tylerdurden » Mon Oct 16, 2017 9:26 pm

Was this a trace of a bitmap? It might help to simplify the paths (or parts of them) before stroke to path.

Feel free to attach/share an example file.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 9:36 pm

tylerdurden wrote:Was this a trace of a bitmap? It might help to simplify the paths (or parts of them) before stroke to path.

Feel free to attach/share an example file.


Thanks for your input. No, it's not a trace of a bitmap. It was made with Inkscape. Simplifying the path does only lead to crazy deformations of the whole stroke.

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 9:45 pm

That's crazy, even if there's no spike left there's one popping up again together with the conversion from stroke to path. That's obviously a bug!

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 9:48 pm

The way I see it the only solution is to remove the spikes manually after "stroke to path" which is not very professional. :-/

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Strokes become spiky - why?

Postby tylerdurden » Mon Oct 16, 2017 9:51 pm

Please share an example file, or a screenshot of the object's nodes.

Also, please let us know what the setting is in the preferences: Input/Output>SVG Output>Numeric Precision.

My poor simulation won't show the issue:
Image
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 10:01 pm

tylerdurden wrote:Please share an example file, or a screenshot of the object's nodes.

Also, please let us know what the setting is in the preferences: Input/Output>SVG Output>Numeric Precision.


Input/Output>SVG Output>Numeric Precision: 8
Attachments
Zeichnung-39.svg
Original File
(36.88 KiB) Downloaded 186 times
Screenshot.png
Screenshot
Screenshot.png (16.67 KiB) Viewed 4116 times

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

Re: Strokes become spiky - why?

Postby Moini » Mon Oct 16, 2017 10:07 pm

You might want to look into creating circles with the circle tool, instead of whichever way you used.
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)

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 10:12 pm

Moini wrote:You might want to look into creating circles with the circle tool, instead of whichever way you used.


I used the cirlce tool, that's the point. The additional nodes must have been added automatically during later steps of the process.

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

Re: Strokes become spiky - why?

Postby Moini » Mon Oct 16, 2017 10:14 pm

That's unusual ... :-/ Do you remember what you did? Perhaps union some circles? Or do an outset?
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)

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 10:27 pm

Moini wrote:That's unusual ... :-/ Do you remember what you did? Perhaps union some circles? Or do an outset?


Yeah, exactly. I have three of these circles and three of these curvy lines which I merged. During the merging process, Inkscape adds nodes. That seems to be the problem. But isn't it a usual and logical step to merge shapes that you don't need as separate shapes any longer?

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

Re: Strokes become spiky - why?

Postby Polygon » Mon Oct 16, 2017 10:35 pm

For what ever reason you have 2 nodes/points in the same spot which is easy to fix - but I´d start over again though:
2Pointsin1Spot.png
2Pointsin1Spot.png (22.43 KiB) Viewed 4083 times


Cheers
P.

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

Re: Strokes become spiky - why?

Postby Lazur » Mon Oct 16, 2017 10:36 pm

Moini wrote:That's unusual ... :-/


That's not unusual rather unfortunate.
Don't do Boolean operations between two of the same curved edge.

Example to reproduce the issue in this video.

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

Re: Strokes become spiky - why?

Postby Moini » Mon Oct 16, 2017 10:43 pm

To clarify: it would have been unusual if it would /only/ have been a circle. The other options I described are surefire ways of adding more useless nodes, just as you say, Lazur.
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)

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

Re: Strokes become spiky - why?

Postby Moini » Mon Oct 16, 2017 10:46 pm

(if the circles are *exactly* above one another, and are *exactly* identical, this does not add any additional nodes - but merging wouldn't make any sense, then...)
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)

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 10:52 pm

So how can I avoid adding "more useless nodes"? Is the only option to avoid merging shapes?

The circles are not above one another btw but they overlap with the curvy lines.
Attachments
Like that.png
Like that.png (20.03 KiB) Viewed 4069 times

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Strokes become spiky - why?

Postby tylerdurden » Mon Oct 16, 2017 11:01 pm

I'd work on just one to start:
Image

Delete the center circle after...

Then duplicate/rotate.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 11:03 pm

And why does Inkscape add nodes that are not only useless but also potentially problematic?

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

Re: Strokes become spiky - why?

Postby Polygon » Mon Oct 16, 2017 11:08 pm

When did Inkscape add points? As you see above there are no needles points introduced.

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

Re: Strokes become spiky - why?

Postby Lazur » Mon Oct 16, 2017 11:20 pm

six67 wrote:And why does Inkscape add nodes that are not only useless but also potentially problematic?


Because inkscape is not a parametric drawing program. It doesn't know wether the two shapes are supposed to be circles and the output as well, rather threats them as shapes regardless their nature.
Two circles of the same shape have tiny bit of differences as in the example -most notably Béziers cannot represent circles perfectly.
Inkscape adds those nodes because the opration itself is problematic in the first place.
Even autocad would generate "inconsistency errors" for such operations.

six67
Posts: 15
Joined: Mon Sep 25, 2017 1:43 am
Location: Belgium/Germany

Re: Strokes become spiky - why?

Postby six67 » Mon Oct 16, 2017 11:24 pm

Your little tutorial helped a lot, tylerdurden, thank you very much! All the other input was also very helpful. Thank you, guys! I really learned something! :-)

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

Re: Strokes become spiky - why?

Postby brynn » Wed Oct 18, 2017 2:43 pm

There are several situations you will come across in Inkscape, where Inkscape adds extra nodes, for no apparent reason (apparent to us, although I'm sure Inkscape's inner calculations were proper). Some of them are:

Using Trace Bitmap, path offsets, Paint Bucket tool, Calligraphy tool, Eraser tool. And even the Pencil tool with default settings can tend to add a ton of nodes that don't seem to be needed (usually with default settings). Also, sometimes various path operations can do it. Probably a couple more that I can't think of at the moment.

Sometimes, Path menu > Simplify can help. Sometimes you can try joining a series of adjacent nodes (is not supposed to work, but does) and it reduces the number.


Return to “Help with using Inkscape”