Replace Closed Curves With Circle

 From:  bemfarmer
8080.18 In reply to 8080.17 
Possible? I think Yes.
Augment the script with .htm file to select some or all closed curves,
and also to request the desired range of "dist" (dist = box.diagonalLength;), as distMin, and distMax.
distMin and distMax can be any value, not just integers.


Filter the selected closed curves with "dist", as follows:

If a closed curve's "dist" value is outside of the range, do not process that closed curve.

If a closed curve's "dist" value is inside the range, process that closed curve.
modify factory.setInput( 3, (Math.sqrt(dist*dist/2)/2));, by applying
Math.round(Math.sqrt(dist*dist/2)/2)),
or Math.ceil(), or Math.floor(),
to get the circle's radius in an integer value.

- Brian