6

Can you please explain how to convert one Bézier curve to several straight lines?

I have one curve:

What I have

I want (for example) five segments with points on this curve.

What I want

1
  • Illustrator: Object > Path > Add Anchor Points twice.. the ... Object > Path > Simplify and tick the straight paths only.
    – Scott
    Nov 5, 2020 at 6:13

3 Answers 3

7

You can apply extension Modify path > Flatten Bezier. the Flatness parameter affect "the smaller parameter the more nodes and the better fit". The numeric value unfortunately tells something exact only for those who have time to read the documentation and who understand Bezier Curve mathematics.

ADD: I must admit I do not know how Flatness exactly is calculated but there's a comment which says something about it.

You have no control where flattening actually inserts nodes.

There can occur cases where miter joints at nodes look weird. Check smoother joint options in the Stroke Style dialog.

You can draw the wanted polyline with the Bezier tool (=the Pen). Deselect the original to avoid joining. Set all point snaps on. Then click along the path. If you have snaps on you meet the curve with every click.

enter image description here

This needed 5 clicks on the curve and one right click to accept the generated red polyline.

3
  • Parameter is the max distance of deviation from actual path.
    – joojaa
    Nov 4, 2020 at 2:39
  • The 2nd option seems much better (+1) in a quick test as you can capture the narture of the curve in a smaller number of segments. My test had a tight loop and some tight bends - but flattening gave me spikes that looked very different. The snap that really matters is snap to paths. Snap to cusp nodes is good for the endpoints. Some of the other point snaps may be unhelpful if you haven't isolated the curve of interest.
    – Chris H
    Nov 4, 2020 at 10:51
  • 1
    About snaps: True every word. The questioner learns soon to turn OFF harmful snap options.
    – user82991
    Nov 4, 2020 at 11:06
2

Select the node tool from the tool bar.

node tool

Place the pointer/cursor over the desired location for the new node, double click. Before: un-modified curve

After:

modified curve

If you require to keep the original curve, create lines connecting the new nodes. If not, you can delete the original curve.

Another, less convenient method will change the curves to lines, by control-clicking on each node to change the type. This will then require to adjust the curve handles. It allows more flexibility than straight segments, but requires more work.

2
  1. Add nodes by double clicking while using the Edit Paths by Nodes Tool N

  2. Drag a selection around all the nodes to select them.

  3. Hit the "Make Selected Nodes Corner" button twice.

enter image description here

Now, if you want the lines totally separate continue as follows:

  1. Hit the "Break Path at Selected Nodes" button

  2. Do Path > Break apart

enter image description here

Your Answer

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

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