Mobile app version of vmapp.org
Login or Join
Bryan765

: Is there a trim command for lines/paths in Inkscape? Is there a trim command for lines/paths in Inkscape? Example: given are two lines. After selecting both I'd like to press a button. Then

@Bryan765

Posted in: #Inkscape

Is there a trim command for lines/paths in Inkscape?

Example: given are two lines. After selecting both I'd like to press a button. Then both lines are elongated or shortened until they intersect. As a result I get a polygon consisting out of two lines.

It is similar to the wish found here: wiki.inkscape.org/wiki/index.php/Intersection_Tools

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Bryan765

4 Comments

Sorted by latest first Latest Oldest Best

 

@Lengel450

There is not a single tool or command to do this in Inkscape, but you can get accurate results by using the Path Editor, Snapping, Guides, and Object to Guides.


Duplicate the your paths
With the 3 duplicated paths still selected, convert them to guides with Objects > Objects to Guides
With snapping enabled, move the nodes to the guide intersections.
join the nodes at the points to make your single shape.

10% popularity Vote Up Vote Down


 

@Ogunnowo857

I'd say the short answer is no, there's no such tool/button/command in Inkscape (that I'm aware of).

To solve the problem for trimming intersecting paths, apart from what's mentioned already you can also use Paths > Cut Path. Note that Cut Path deletes the upper path of the two and cuts only the lower path in parts. So to cut the two paths at their intersection, you'll have to do Cut Path twice, and duplicate each time the upper path first.
After cutting the paths, you can delete the ends you don't want, and combine the remaining paths by using the Node tool, selecting the overlapping nodes on the intersection, and press the button "join selected nodes" (in the Tool options bar).

10% popularity Vote Up Vote Down


 

@Connie430

No. This is not easily accomplished in Inkscape.

The closest work around would be to extend the two lines, and using snapping to draw a new path over them.


Using the Node Tool F2, select the nodes to be extended.
Hold Ctrl + Alt and drag the node to extend it. Repeat with the other line until they intersect.
Turn on snapping. Make sure that "Snap to Intersections" is enabled.
Draw a new line Shift + F6, using the end points and intersection of your two lines as snapping points. (If Inkscape doesn't automatically snap to these, check what snapping options you have set and try again).
Delete the original two lines


If you're working with lines that are right angles, it might be easy to draw a single line between two end points, add a node in the middle, and then manually assign coordinates to that node instead of drawing a new line.

This operation isn't too difficult if you have 2 simple straight lines. There's a good chance that your drawing is more complex than this and you'll need to integrate this with other objects. The commands in the Path menu, such as Union can help with those finishing touches.

Inkscape can be extended with scripts. It might be possible to write a script that will do this all for you at the click of a button, as you wanted, however I'm not aware of any.

10% popularity Vote Up Vote Down


 

@Frith110

Enable snapping to paths and nodes, then move the first line to the intersection with the second line and then move the second line to the end of the first line.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme