Difference object-path with line.

Post questions on how to use or achieve an effect in Inkscape.
lasselvdbc
Posts: 1
Joined: Tue Oct 08, 2013 12:02 am

Difference object-path with line.

Postby lasselvdbc » Tue Oct 08, 2013 9:22 pm

Hi,

As the title indicates, I'm trying to do a 'difference'-operation between two path-objects. The foreground-object is a shape with an inner cutout, the background-object is a simple line.
When executing the operation both objects disappears/are removed totally.
However when I perform a 'stroke-to-path' operation on the line and then executes the difference operation I get the required result except there is another issue:
Because of the 'stroke-to-path' operation the previous line has been turned into a rectangular path (four sides and points) instead of only being a two-pointed line.

Do you have any tips or solutions?

Best of

Lasse

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

Re: Difference object-path with line.

Postby Lazur » Thu Oct 10, 2013 5:16 am

Hi.

Not really sure what you are after.
Maybe you want the line to go from one end of the cutout to the other?

The easiest way I know of to draw such is by duplicating the background object,
and after enabling snapping to paths and path intersections at the snapping bar,
using the node editor tool to add nodes near the intersecting points, then by moving them a bit they will snap to position.
After that it's just deleting the unnecessary nodes and deleting the original background object.

I know other soltion as well, but that's a bit complicated compared to this.

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

Re: Difference object-path with line.

Postby tylerdurden » Thu Oct 10, 2013 10:45 pm

A straight line is a special case.

When Inkscape performs an operation (boolean), it converts open paths (lines) to closed paths.

"Any open paths are, for the purpose of these commands, closed by a line between the path's end points. Shape objects and text objects are automatically converted to paths."
http://tavmjong.free.fr/INKSCAPE/MANUAL ... ining.html

A straight line doesn't have enough information to let Inkscape form a closed path. If the line (open path) has a bend or more than one node (not inline), it can convert to a closed path.

So as Lazur points out, it depends on what you seek to achieve... If the "foreground object" needs to be divided by a line, there are likely simple ways to do that.
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/


Return to “Help with using Inkscape”