Arcs and Circle line segments for CNC

Is there a way to automatically draw arcs and circles with the appropriate number of line segments for designs that will eventually go to a CNC?

I know you can many change the number of segments when creating arcs and circles, but calculating for each one is a real pain. IS there a setting for this? An extension that automatically computes this when drawing?

What is the “appropriate number of sides”? How is it calculated?

@jimhami42 has a calculator, but you still need to know why and how to use it…

it’s not autoMAGIC…
john

I’ve seen this formula:
n = 180/(acos((r-t)/r))

where n is the number of segments per full circle, r is the arc radius, and t is your tolerance. r and t should be in the same units, but it doesn’t matter which specific unit- mm, inches, whatever. The acos function should be performed in degrees (if you want to use radians, replace the 180 in the numerator with pi).

I understand it’s not AutoCAD and it’s a free program, but for an otherwise powerful CAD program, this is a real PITA. Seems like there would be some kind of extension out there for this, but I haven’t been able to find one.

if you export your dxf correctly it will have centre point and a radius where needed, it doesn’t need a set number of segments…

DXF export is only available on Sketcup Pro, correct?

I’m using make and Sketch-u-cam to generate gcode.

The calculator plugin can be found [here][1].

When machining metals using CNC, it is generally desirable to use enough points so that the “flats” are kept to a minimum to provide a smooth finish. On the other hand, when machining a hole (for example), it is desirable to have enough points so that the diameter is maintained to some tolerance to insure the proper size (the sagitta). For a very large circle, the number of points is substantially different than what is needed for a small circle. As @scurring pointed out, the units will cancel out in the calculation and yield only a number representing the number of segments (i.e., works in inches, millimeters, etc.). More information can be found in this thread: How many points for a smooth curve?

The calculations I used are:

Flat: n = scale * Math::PI / Math.asin(error / (2.0 * radius))
Sagitta: n = scale * Math::PI / Math.acos((radius - error) / radius)

(The second equation is identical to the one scurring posted although I allow for portions of a full circle)
[1]: https://sites.google.com/site/spirixcode/code/jrh_n_calc.rb