Module OManifold.Quality

Quality globals akin to OpenSCAD's facet governing "special" parameters, $fn, $fa, and $fs. These are global variables that are handy for quickly switching from quick and dirty rough iteration quality to computationally expensive smooth final products.

val get_circular_segments : float -> int

get_circular_segments r

Determine how many segment there would be in a circle with radius r, based on the global quality parameters (set by set_circular_segments, set_min_circular_angle, and set_min_circular_edge_length).

val set_circular_segments : int -> unit

set_circular_segments fn

Set a default number of segments that circular shape are drawn with (by default this is unset, and minimum circular angle and length are used to calculate the number of segments instead). This takes precedence over both minumum circular angle and edge length, and is akin to defining the special $fn variable at the top level of an OpenSCAD script.

val set_min_circular_angle : float -> unit

set_min_circular_angle fa

Change the default minimum angle (in radians) between consecutive segments on a circular object/edge (default is pi /. 18.). This is akin to setting the special $fa variable at the top level of an OpenSCAD script.

val set_min_circular_edge_length : float -> unit

set_min_circular_edge_length fs

Change the default minimum edge length for segments that that circular objects/edges are drawn with (default = 1.). This is akin to setting the special $fs variable at the top level of an OpenSCAD script.