Macro EdgesToArc/en

Sometimes one encounters wires that contain arcs that are made up of small straight segments. This often happens when working with files from other programs. This macro makes it relatively easy to convert these discretized arcs back to circular arcs. This reduces the file size and makes the file more manageable.

To use this macro, you have to break down the wire into individual edges using the function. Then just select the segments that you want to replace by an circular arc and execute the macro. You need at least two segments.

The macro will check whether the segments all lie on a common circle and will abort if this is not the case. Otherwise it will create the arc and remove the segments.

Because of small inaccuracies in the calculations, the function can sometimes fail to recombine the other edges and the arcs back into a wire. In this case the SuperWire macro [] provides a more robust way to do this.