pyboxbuilder.precision.Precision

class pyboxbuilder.precision.Precision(fn: int | None = None, fa: float = 12.0, fs: float = 2.0)[source]

Bases: object

How finely curves are tessellated.

Mirrors OpenSCAD’s three special variables. fn is absolute and wins when set; otherwise fa and fs together decide the facet count, so a small radius gets few facets and a large one gets many.

kwargs() → dict[str, Any][source]

Return the settings as keyword arguments for a pybosl2 call.

Returns:

A dict carrying fa/fs, plus fn when it is set. Splat it into any curve-producing constructor: cylinder(height=h, radius=r, **precision().kwargs()).

fa : float = 12.0

Minimum angle per fragment, in degrees. Lower is finer.

fn : int | None = None

Fixed number of facets per full circle. None defers to fa/fs.

fs : float = 2.0

Minimum fragment size, in mm. Lower is finer.