Help with removing a line from 2 rectangles side by side

Post questions on how to use or achieve an effect in Inkscape.
nick5454
Posts: 14
Joined: Thu Mar 28, 2013 11:28 pm

Help with removing a line from 2 rectangles side by side

Postby nick5454 » Thu Mar 28, 2013 11:34 pm

I drew 2 rectangles as soon below. I want to remove the center line and make it one big rectangle. I already converted them to a path.

How do I remove the center lines and use all of the exterior points to make it a box. When I delete the inside nodes it just looks like a spline.Image

Thanks,
Nick

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

Re: Help with removing a line from 2 rectangles side by side

Postby brynn » Fri Mar 29, 2013 12:51 pm

Image
Welcome to InkscapeForum!

It depends how the image is made. It sounds like you already know that they are 2 rectangles side by side. But just by looking at your image, it could be a larger rectangle with a line down the middle. So assuming they were originally 2 rectangles with the shared side on top of each other; and assuming it's been changed to path with Object to Path, here's what you can do. Note that there are probably several ways to do it, and this is my choice.

I would select one rectangle, click on the side that I want to remove, and click "Delete segment between 2 non-endpoint nodes" button. Then do that for the other rectangle. Now if you want the pieces to be connected, so that it's one piece, I would join the nodes. Using the Node tool, select both pieces (hold Shift for multiple selection). The draw tiny selection box around the 2 nodes that you want to join, then "Join selected nodes" button. Do that once for the top and once for the bottom. And if you want a true rectangle with 4 nodes, you'll need to delete the node created by joining 2 nodes.

If the original 2 rectangles are grouped, there will be a certain way to select one at a time. If the original 2 are subpaths, you won't need to make a multiple selection in the 2nd step (joining nodes). Instead of joining nodes, some people would use Union. However, if the original 2 rectangles were not precisely sharing their sides, Union might result in not a true rectangle. But if you happen to know that they precisely share their sides, Union will be faster than node editing. Or if you don't need precision, Union will be faster.

Actually....well if precision isn't needed, or you know that they were true rectangles originally, you could select the original 2 rectangles, and do Path menu > Union, right from the start!

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

Re: Help with removing a line from 2 rectangles side by side

Postby Lazur » Sat Mar 30, 2013 12:09 am

Just as brynn described, but
with the union part, to "avoid a union of two separate closed paths", I would move one side of the original rectangles to overlap the other, then press Ctrl++ to create union of them.
I would then delete every unnecessary nodes, and set segments straight, but there is an option of simplifying by pressing Ctrl+L
That union method can produce 0,02 pixel inaccuracy, but I have no idea why.

nick5454
Posts: 14
Joined: Thu Mar 28, 2013 11:28 pm

Re: Help with removing a line from 2 rectangles side by side

Postby nick5454 » Sat Mar 30, 2013 1:04 am

Than you so much.

I had an issue with union in that it splines all my rectangles ( made them curved ).

I actually am doing the helicopter tutorial and when I "unioned" it made them all curved. Which is probably because the nodes were not on the same point.

I actually used and liked your select rectangle, then side, then cut button. It's nice and I don't have to hope it worked on a complex object.

I do have problems when making 2 rectangles of getting the rectangle to snap to the same point as the other. But that's a separate question.

Thanks for the answer. It was great that you spent that much time on it. Helped me tons.

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

Re: Help with removing a line from 2 rectangles side by side

Postby brynn » Sun Mar 31, 2013 12:49 am

Awesome, I'm glad it worked :D


Return to “Help with using Inkscape”