trim a line

Post questions on how to use or achieve an effect in Inkscape.
Lorenzo

trim a line

Postby Lorenzo » Wed Jul 08, 2009 1:35 am

Hi, I'm an absolute beginner and probably I'm missing some fundamental concept in Inkscape, but I find terribly difficult to cut a line.

I have just one line connecting the centers of two discs. What is the best (and fastest) method to trim the line accurately to the borders of the discs?

Thx in advance!

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: trim a line

Postby prkos » Wed Jul 08, 2009 9:56 am

Duplicate one of the circles, select that duplicate and add the line to the selection, then go to Path > Cut path.

The duplicated circle will be created above the line, as it should be, and it will disappear after the cutting.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
ErikTiePie
Posts: 92
Joined: Fri Nov 21, 2008 10:52 pm

Re: trim a line

Postby ErikTiePie » Wed Jul 08, 2009 4:30 pm

Hmm, good tip.

I should invest some more time in the path operation, it might save me quite some work.

What I would have done was :
  • duplicating the line (ctrl D) and then convert the duplicate in a guide (shift G).
  • duplicating the circle (ctrl D) and then convert the duplicate in a guide (shift G).
  • use the node tool :tool_node: to move the nodes of the line to the requested positions, where the guides cross.

Apparently more roads lead to Rome, and your road seems shorter :)

Lorenzo

Re: trim a line

Postby Lorenzo » Thu Jul 09, 2009 6:02 am

Thank you for your suggestions!

The "duplicate and cut path" method is faster but has one problem.
The part of the line which remains on the screen is the one WITHIN the circle, rather than the one outside of the circle.
Any idea on how to reverse this?

Following the "guides" is something I had not learned about, yet. This works, but if the diagrams get complex it is not very handy.

Best would be the "cut path" method if there would be a way to leave the outside part of the line.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: trim a line

Postby prkos » Thu Jul 09, 2009 7:18 am

I'm not sure if this is a bug, I'll have to look into it, but you can work around it.

Duplicate the line, duplicate both circles, then cut the paths, one path with one circle, then the other path with the other circle.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

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

Re: trim a line

Postby ~suv » Thu Jul 09, 2009 8:07 am

Use 'Path > Revert' on the duplicated path you want to trim - this leaves the other side of the path (outside the circle).

Lorenzo

Re: trim a line

Postby Lorenzo » Thu Jul 09, 2009 10:15 am

Ok, that works! Thx!


Return to “Help with using Inkscape”