Union two separate shapes with a line in the middle ?
-
- 4 Star Member
- Posts: 817
- Joined: Wed Nov 26, 2014 1:22 pm
- Location: Fairfield, CT.
- Contact:
Union two separate shapes with a line in the middle ?
This is probably easy. I am not good at playing with nodes or drawing straight lines. So lets say I have two square boxes and and snap them together so there is just one middle line now. How do I do a union on these so it will create one rectangular object, i.e. remove that middle line.
Thanks.
ps- when using the bezier tool and I want to draw a straight line and I click the mouse at the end of the line it always goes crooked.
Thanks.
ps- when using the bezier tool and I want to draw a straight line and I click the mouse at the end of the line it always goes crooked.
-
- 2.5 Star Elite Contributing Member
- Posts: 170
- Joined: Sun Jul 17, 2022 9:43 pm
Re: Union two separate shapes with a line in the middle ?
Did you ensure you did "object to path" after creating the rectangles? Double check using outline mode. This applies only if you created objects. If using only line tools, disregard. You should just be able to choose union and they will merge. Might have to overlap them a little but dont think so.
-
- 5 Star Elite Contributing Member
- Posts: 2869
- Joined: Thu Jul 24, 2008 11:15 am
Re: Union two separate shapes with a line in the middle ?
I am not a Inkscape guy, Corel is more my thing and in Corel the 2 boxes must be overlapping, even just the slightest amount will do. This is something martyy mentioned also so hopefully that works for you. Let us know.
-
- 4 Star Member
- Posts: 817
- Joined: Wed Nov 26, 2014 1:22 pm
- Location: Fairfield, CT.
- Contact:
Re: Union two separate shapes with a line in the middle ?
Yes they are object to path. And yes that is the only way i get them to union is to overlap them a little. To me that is cheating if you are targeting toward a specific size of an object.martyy wrote: Thu Mar 20, 2025 12:19 pm Did you ensure you did "object to path" after creating the rectangles? Double check using outline mode. This applies only if you created objects. If using only line tools, disregard. You should just be able to choose union and they will merge. Might have to overlap them a little but dont think so.
- ROKCRLER
- 3.5 Star Elite Contributing Member
- Posts: 681
- Joined: Sun Sep 30, 2018 5:19 pm
Re: Union two separate shapes with a line in the middle ?
TJ, the two rectangles need to overlap a smidge then union (control ++)
you could make the two rectangles, place them where you want then drag either the top edge of the bottom rectangle or the bottom edge of the top rectangle to overlap the other and union.
you could make the two rectangles, place them where you want then drag either the top edge of the bottom rectangle or the bottom edge of the top rectangle to overlap the other and union.
4x8 Dynatorch
PM85
~Mo~
PM85
~Mo~
-
- 6 Star Elite Contributing Member
- Posts: 11254
- Joined: Thu Sep 21, 2017 5:22 pm
- Location: Tucson, Arizona
- Contact:
Re: Union two separate shapes with a line in the middle ?
TJS wrote: Thu Mar 20, 2025 12:01 pm This is probably easy. I am not good at playing with nodes or drawing straight lines. So lets say I have two square boxes and and snap them together so there is just one middle line now. How do I do a union on these so it will create one rectangular object, i.e. remove that middle line.
Thanks.
ps- when using the bezier tool and I want to draw a straight line and I click the mouse at the end of the line it always goes crooked.
TJ - the rectangles don't need to overlap, they only need to be touching each other. Turn on your snaps and snap the corner of one rectangle to the corner of the other rectangle. Or you can snap midpoint to midpoint as well. See my attached screen shots.
David
-
- 6 Star Elite Contributing Member
- Posts: 11254
- Joined: Thu Sep 21, 2017 5:22 pm
- Location: Tucson, Arizona
- Contact:
Re: Union two separate shapes with a line in the middle ?
When you are drawing your straight line with the Bezier draw tool, click on your start location, then hold down the Ctrl button on your keyboard to force the line to either horizontal or vertical - depending on which direction your are drawing your line.TJS wrote: Thu Mar 20, 2025 12:01 pm
ps- when using the bezier tool and I want to draw a straight line and I click the mouse at the end of the line it always goes crooked.
David
-
- 6 Star Elite Contributing Member
- Posts: 11254
- Joined: Thu Sep 21, 2017 5:22 pm
- Location: Tucson, Arizona
- Contact:
Re: Union two separate shapes with a line in the middle ?
Or - if you turn on your grid display and enable Snapping to Grid, then you draw your lines they will automatically snap from one grid point to another grid point - thus keeping your lines orthogonal (vertical or horizontal).
David
David
-
- 4 Star Member
- Posts: 817
- Joined: Wed Nov 26, 2014 1:22 pm
- Location: Fairfield, CT.
- Contact:
Re: Union two separate shapes with a line in the middle ?
Thanks David. I tried the two rectangles just like you did and the Union does not work. I am going to try it again.
-
- 6 Star Elite Contributing Member
- Posts: 11254
- Joined: Thu Sep 21, 2017 5:22 pm
- Location: Tucson, Arizona
- Contact:
Re: Union two separate shapes with a line in the middle ?
TJS wrote: Fri Mar 21, 2025 7:46 am Thanks David. I tried the two rectangles just like you did and the Union does not work. I am going to try it again.
-
- 4 Star Member
- Posts: 817
- Joined: Wed Nov 26, 2014 1:22 pm
- Location: Fairfield, CT.
- Contact:
Re: Union two separate shapes with a line in the middle ?
Are you doing Object to Path on both shapes before you Union them ?
-
- 6 Star Elite Contributing Member
- Posts: 11254
- Joined: Thu Sep 21, 2017 5:22 pm
- Location: Tucson, Arizona
- Contact:
Re: Union two separate shapes with a line in the middle ?
It will work either way - rectangles or after your do object to path.TJS wrote: Fri Mar 21, 2025 9:18 am Are you doing Object to Path on both shapes before you Union them ?
David
-
- 6 Star Elite Contributing Member
- Posts: 11254
- Joined: Thu Sep 21, 2017 5:22 pm
- Location: Tucson, Arizona
- Contact:
Re: Union two separate shapes with a line in the middle ?
TJ - I have attached a file with the before and after sequence so you can see what it looks like. Also, be sure you have the appropriate boxes checked for your snaps settings.
David
David
-
- 4 Star Member
- Posts: 817
- Joined: Wed Nov 26, 2014 1:22 pm
- Location: Fairfield, CT.
- Contact:
Re: Union two separate shapes with a line in the middle ?
Thanks David. Unfortunately just my luck. My laptop has crashed. I am going to try and find my boot CD and see if I can at least get the files I need off of it or remove the hard drive. More fun. I will however try this on my table PC. It is an older version of inkscape but hopefully it works.
-
- 6 Star Elite Contributing Member
- Posts: 11254
- Joined: Thu Sep 21, 2017 5:22 pm
- Location: Tucson, Arizona
- Contact:
Re: Union two separate shapes with a line in the middle ?
TJ - I expect that it should work fine on any Inkscape version. I'm doing my cad work on a PC, don't have a laptop so I don't know if that could cause a problem or not with your Inkscape editing. Good luck with your laptop repair.TJS wrote: Mon Mar 24, 2025 6:38 am Thanks David. Unfortunately just my luck. My laptop has crashed. I am going to try and find my boot CD and see if I can at least get the files I need off of it or remove the hard drive. More fun. I will however try this on my table PC. It is an older version of inkscape but hopefully it works.
I still use Windows 2000, xp, and Windows 7 on some of my desktop computers - so don't feel too bad if you don't have the "latest and greatest" PC.
David
-
- 4 Star Member
- Posts: 817
- Joined: Wed Nov 26, 2014 1:22 pm
- Location: Fairfield, CT.
- Contact:
Re: Union two separate shapes with a line in the middle ?
So I got another laptop up and running. I did union the squares and they did become one rectangle that would in fact be cut-able path. However when drawing two circles or other shapes and have snapping on with no overlap and perform a union they are not one cut-able path as seen in your screen shot here I get the same results.
Thanks
T.J.
-
- 6 Star Elite Contributing Member
- Posts: 11254
- Joined: Thu Sep 21, 2017 5:22 pm
- Location: Tucson, Arizona
- Contact:
Re: Union two separate shapes with a line in the middle ?
TJS wrote: Wed Apr 16, 2025 12:55 pmSo I got another laptop up and running. I did union the squares and they did become one rectangle that would in fact be cut-able path. However when drawing two circles or other shapes and have snapping on with no overlap and perform a union they are not one cut-able path as seen in your screen shot here I get the same results.
Thanks
T.J.
Yes TJ, that is correct. For the circles, ovals, etc. there needs to be some overlap. Just like adding "bridges" to hold part together.
David