• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cut several lines with one line

New Here ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

Hey everyone!

I'm a greenhorn in working with illustrator and I need help for a problem which is probably very easy to solve....

From a Geology software (Move) I exported a profile which shows a topography line (black) and some lines (many different colours) which cross this topography:

illustrator_1.JPG

so I would like to cut all these colourful lines with the back topography line. Then I want to delete the parts of the coloured lines which are above of the topography line. in the end it should look something like this:

illustrator_2.JPG

I tried to do it with the Pathfinder but I only got errors (because i don't have any filled forms, only paths) or weird results...

I also uploaded the file here if you want to try it yourself on the original file called 'section_active' : https://we.tl/obt2XXCP7y

It would be awesome if someone could help me!

thanks in advance!

Sibylla

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 02, 2017 Dec 02, 2017

This is just one of those questions that I could not let go of. It took awhile but now I know why the method I described in comment #3 had so much trouble.

LINE DIVIDE.png

In the procedure I originally described you must convert all of the lines to be cut into closed paths with the Outline Stroke command (top picture) that is still the case. What has made it not work previously was not that your topography line was some kind of funky closed path but that it was actually two lines—one on top of each other and on

...

Votes

Translate

Translate
Adobe
Community Expert ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

Select all lines and then with the shapebuilder tool press Alt and click on the parts of the lines you want to delet.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

you're genius! it works thank you!

just out of interest -it is not possible to intersect all lines with just 1 line -im my case  the topography line (and not with each other) so it would result in 1 topography line (unchanged) and 1 set of lines below the topography and 1 set of lines above the topography?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

In order to do this you will have to outline the paths that are to be cut and use the "Divide Objects Below" feature:

CUT LINES.png

First step is to select the lines that are to be divided and use the Outline Stroke option found through Object> Path. The strokes will now be closed paths. Next you are going to use the topography line to divide the paths but in doing so the topography line will disappear. So you will have to make a copy of that line by selecting it and using the Copy Command (Command-C on a Mac and Control-C on a PC). Then while it is still selected you will paste a copy in front of the original using Command-F on a Mac or Control-F on a PC. Then while still selected you will lock the copy using the keyboard command Command-2 for Mac or Control-2 for a PC. Then you will select the other copy of the topography line (which did not get locked) and making sure that it is above the colored lines—actually closed paths (Object Menu>Arrange>Bring to Front) use the "Divide Objects Below" option found through Object>Path. The colored paths will now be split and the unwanted sections can be selected and deleted. The remaining topography line can be unlocked using the key commands Option-Command-2 on a Mac and Alt-Control-2 on a PC.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

thank you Bill for your answer!

I tried It And It all worked out untli the last step but when I clicked 'Divide Objects Below' it gives me this fancy result:

from this (before I click 'Divide Objects Below'):

illustrator_4.JPG

to this (after I clicked 'Divide Objects Below' ):

illustrator_5.JPG

If I put the topography line in the same Layer as the colourful lines something else happens after clicking 'Divide Objects Below':

illustrator_6.JPG

the lines seem to be cut (you can see a fine blue line where the topography was crossing it) but if I want to select just the upper part of the lines in order to delete them i doesn't work (the whole line gets selected -above and below topography)...

Maybe my topography line is formated in a strange way?

If You want to try it on the original file you can check it here: https://we.tl/XwyqrECnad

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

I can see by your screen shot that your topography line has a black fill and no stroke which means that it is actually a closed path rather than a stroke. What I showed you uses a line (an open path) that has no fill but a black stroke. Try it with a stroke for the topography line rather than a filled path. Also remember to save a copy of the stroke as I showed as the original will disappear after dividing the other paths.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

I just want to add one additional thought. When I said that the strokes need to be changed into closed paths (in comment #3) I was only referring to the strokes that were to be cut. The topography line should remain a stroke if it already was one and as I said in post #5 if it was a closed path it should be redrawn as stroke with no fill and a black stroke.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

I just took another look at your screen shot. Only the topography line which is above (or on a layer above) tha other lines should be selected when applying Divide Objects Below. It looks like you might have everything selected.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

Hi Bill

thank you for investing so much time and helping me!

i made a screen record for you so you can see what I did (following your instruction in post 3):

WeTransfer  (since I don't have any of the required accounts on YouTube or vimeo I just uploaded it on Wetransfer:

I think you might be right that my topography line is not a stroke -I exported the Profile from a geology program and didnt change anything... how could I change the topography line to a stroke?

here another close-up screenshot where I think you can see that the topography line:

illustrator_7.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

You might just have to trace the topography line with the pen tool to make it an open path line. You're probably right that the line as it came in from the other program is a closed path.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

I just got a chance to look at your video and your problem is that the topography line is definitely a closed path. As I said above you will have to make it a open path using either the pen tool or the pencil tool (which may be able to match the character of the topography line better than the pen tool). The pencil tool can be found in the pull-down menu from the Shaper Tool.

Screen Shot 2017-12-01 at 3.06.17 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

Actually, I just thought of a way that though similar to both my original post and also the post by Anna Lander may actually be a little closer to what you actually are looking for. It is to use the Divide Pathfinder option. In this method all of the strokes will be converted to outlines (although based on what we've seen about your topography line already being a closed path they may already be closed paths). Then making sure that the topography line is above all of the others select them all and apply the Divide Option. See Screen Shot:

Screen Shot 2017-12-01 at 3.15.22 PM.png

After applying this option you can select the segments of your lines above and below the topography line using the direct selection tool (the white arrow). The topography line will then actually itself be broken into segments but since it isn't going anywhere that most likely will be OK.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

Hi Bill!

I just tried it: I thought I better try cutting the coloured lines with a simple line (made with the pencil tool) before I rip out my hair trying to trace the topography line

I tried it 2 times: once I drew a line in the same layer as the coloured lines were and the second time I made a new layer for the pencil-line. Unfortunately it did not work.... the coloured lines haven't been cut. I made another video so You can see what I did: https://we.tl/AqBtuqKhoN

I really do not know what I did wrong....

I actually really like the first suggestion you made in post no.3 -It sounds very simple and I would really like to do it that way. Could you maybe have a look at my the Illustrator file (link in post no.1 or 4)? I think If you see the file I'm working with It might be easier for you to see why it does not work...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

I just tried your file and the same happened to me. It just did not cut more than one of the shapes.

Then I tried two things:

1. I ungrouped all those "Polylines"

2 I drew some random other shapes

Then it worked.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

I took a look at your video and as I see it the problem is that you did not use the outline path on the lines that you wanted to cut. The Divide Objects Below option works when a line cuts through a path or, as in this case several paths. At any rate, it appears from these videos that the lines to be cut are open paths and as I saw from your earlier video the topography line is a closed path. So either redraw the topography line as an open path while making the lines to be cut into closed paths and use the method from comment #3 or leave the topography line as a closed path and use the outline stroke on the lines to be cut (making them closed paths aka objects) and use the method from comment #12 (Pathfinder Divide).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

I just tried both methods on your original and realized that your topography line was an open path all along (it did not appear so from your original video). Probably because of the way that the lines were generated in the first place the method from #3 probably is not best. However, by making both the topography line and the other lines all into closed paths with Outline Stroke the method from #12 worked perfectly.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

This is just one of those questions that I could not let go of. It took awhile but now I know why the method I described in comment #3 had so much trouble.

LINE DIVIDE.png

In the procedure I originally described you must convert all of the lines to be cut into closed paths with the Outline Stroke command (top picture) that is still the case. What has made it not work previously was not that your topography line was some kind of funky closed path but that it was actually two lines—one on top of each other and on separate layers (see layers panel for picture two). Then when I told you to make a duplicate of the line and lock it we actually had three copies of the line which led to it not working correctly. In the third picture above you can see that I put both copies of the line on the same layer (the same one that the other lines are on—making sure that I use the Object>Arrange>Bring to Front command to put the two copies of the line above the ones to be cut) and then used the Command/Control-2 command to lock one of the lines. When I then use the Divide Objects Below command it does divide the lines but for some reason (which I don't think really matters) makes the line on the far right lose its color fill. Selecting just that line and restoring the color (bottom middle picture) fixes that problem. In the bottom right picture using the Direct Selection tool (the white arrow) I selected all of the lines (actually closed paths) above the topography line and moved them slightly to show that they are now divided. Note that each of the now divided paths are still groups to one another so you will need to either ungroup them or use the direct selection tool to select them.

As I said in comment #17 the Divide method also works and may actually be simpler and less prone to funky things happening.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 03, 2017 Dec 03, 2017

Copy link to clipboard

Copied

Hi Bill!

It worked!!!! You are AWESOME! thank you so much for spending so much time and energy on solving my Illustrator problem!

Have a nice sunday evening

Sibylla

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 03, 2017 Dec 03, 2017

Copy link to clipboard

Copied

LATEST

You too. Happy it all worked out.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 01, 2017 Dec 01, 2017

Copy link to clipboard

Copied

You can also use Outline button on Pathfinder pane. It divides all paths by all intersection points (on my sample I moved the short lines for better visibility, actually they stay at their original place). A result is a group, and you can ungroup it or work in Isolated Mode.

But be careful, there are some nuances:

1. This tool divides ALL lines by ALL intersection points, so you will need to replace the broken main path by its original.

2. This tool sets the fills and strokes to Zero, so you will need to restore the attributes.

But this is not a problem if you work with a copy of the original composition 003.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2017 Dec 02, 2017

Copy link to clipboard

Copied

Hi Anna!

thank you for your answer.

I already tried this but since this is not the only profile I have to work with it and this method is quite 'work-intensive' i try to find another solution. but thank you anyway!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines