2

I'm trying to use a (complex-ish) shape to add anchor points to another group of paths where the paths cross over- however i'd like to do it without effecting the stroke weights etc as then the blend will lose its gradient effect.

For example, i'd like to add points to the black strokes where the pink stroke crosses over them without the black strokes losing their relative weights. Diagram

I've tried Pathfinder and different ways of stacking the two items but it either isn't doable or it instantly removes the stroke.

Any suggestions?

2 Answers 2

2

You can add nothing to intermediate black lines until the blend is expanded. That's because the blend is an effect and before expanding it the intermediate lines aren't selectable objects.

So, expand the blend. Select your red curve, send it to back and lock it temporarily to keep it safe.

Then add manually one by one with the anchor insertion tool new anchors to the crossings. Be sure you have snap to points and smart quides =ON. Otherwise you will not get the indications "On path" and "Intersect".

enter image description here

It's not known what is the future usage of the created nodes. If they are not needed for anything else than as markers, starting points for new curves, you can as well have invisible lines in front of your black lines or behind them for that purpose.

Copy at first your line mixture to the clipboard. Then make with pathfinder outline the splitted no-stroke cloud, as you already have done.

Delete from it the extras, leave only say left halves of the lines and group them. Give a good name to that group in the layers panel.

Paste in place the line mixture. Now there's anchors in the right places.

You can even join a ghost line and the actual line. You get a folded line where the marker is the end of the line. The stroke doesn't vanish if your ghost line is in the background when you join.

Not asked: Inkscape has some functionality that you maybe can use. Illustrator and Inkscape have a common file format, SVG. At least curves, their widths and simple colorings seem to work identically in both programs.

For Inkscape there's available an extension package for enhanced path operations. It's downloadable from here: https://gitlab.com/su-v/inx-pathops

Extension Generate from Path > Path Ops > Cut Path proceeds through a bunch of selected paths. The topmost path splits all underlying paths. Nothing vanishes. The cutter path and all formattings in splitted paths stay intact.

Unfortunately there's included no automatic tool for having continuous lines with the wanted new nodes. A programmer is still needed, if you cannot join the halves manually line by line.

5
  • Hi, thanks for the reply. The blend is expanded, i just mentioned it was a blend as that was the best way to articulate that the various stroke widths need to stay as they are- as they are in the decimals. I understand I can do it manually but I have 1000s of these to do, so manually adding the points using snap won't cut it unfortunately. I need the anchors to be on the black lines to split them into two groups where the pink line crosses, if I expand it (even if i back up the strokes to the clipboard) Mar 4, 2019 at 22:08
  • I will lose the editability strokes provide, and if I outline them then paste the strokes back in the anchors are on the wrong lines. Im sure there was a function where by you could automatically add anchors where strokes overlap? Mar 4, 2019 at 22:08
  • In Inkscape it's possible to split a line or other curve with another line or curve. Select 2 crossing curves, goto Path > Divide, then you have the bottom curve splitted and the top curve vanishes. A programmer is needed to make it usable in your case. A programmer obviously could make it as well in Illustrator. I am not a programmer, sorry!
    – user82991
    Mar 4, 2019 at 23:29
  • @CrookedCartoon A programmer seems to have already visited. Inkscape has a path operations extension which has extended path cut. The topmost path splits all underlying paths, no formatting is lost, the top path also stays. It's here and it works gitlab.com/su-v/inx-pathops
    – user82991
    Mar 5, 2019 at 0:23
  • Thanks for the replies, but It think the Shape Builder/Live Paint methods are the easiest and don't require other programs etc. Seems like a very simple function that's not included in CC. Mar 6, 2019 at 11:15
1

Here's how I would handle this scenario:

  1. Expand your blend, Ungroup it and then select everything.

  2. With everything selected, use the Shape Builder Tool (Shift+M) and while holding down Alt click and drag on one side (to delete it).

  3. Select the other sides paths and copy it.

  4. Hit Ctrl+Z to undo the last step.

  5. Repeat last step, only this time do the other side.

  6. Once you removed the other side (the one you previously copied) delete the pink line.

  7. Hit Ctrl+F to paste the original ones you copied in their place.

  8. Now select line by line using the Selection Tool (V) and then Right click → Join (Ctrl+J) to merge the lines, they will all have anchor points at their cut points.


Here's a GIF of steps 1-7.

1
  • Thanks for the reply, using Live Paint was the only way I could do it, the Shape Builder idea was something that also worked (I chose the live paint option; create live paint group, use the selected tool to select half the lines, cut them, paste them back in, release paint group) but either way both methods are a round about way! I'd of thought Adobe would've included a simple divide function where lines cross over. Thank you though. Mar 6, 2019 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.