1 TOC
Revar Desmera edited this page 2024-12-14 02:23:46 -08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Table of Contents

List of Files

Basic Modeling:

Advanced Modeling:

Math:

Data Management:

Threaded Parts:

Parts:

File Footnotes:

STD = Included in std.scad

1. constants.scad

Constants provided by the library
Included in std.scad

  • General Constants

    • $slop Const The slop amount to make printed items fit closely. 0.0 by default.
    • get_slop() Func Returns the $slop value.
    • INCH Const A constant containing the number of millimeters in an inch. 25.4
    • IDENT Const A constant containing the 3D identity transformation matrix. [Mat]
  • Directional Vectors

    • LEFT Const The left-wards (X-) direction vector constant [-1,0,0].
    • RIGHT Const The right-wards (X+) direction vector constant [1,0,0].
    • FRONT Const The front-wards (Y-) direction vector constant [0,-1,0].
    • BACK Const The backwards (Y+) direction vector constant [0,1,0].
    • BOTTOM Const The down-wards (Z-) direction vector constant [0,0,-1].
    • TOP Const The top-wards (Z+) direction vector constant [0,0,1].
    • CENTER Const The center vector constant [0,0,0].
    • EDGE() Func Named edge anchor constants
    • FACE() Func Named face anchor constants
  • Line specifiers

    • SEGMENT Const A constant for specifying a line segment in various geometry.scad functions. [true,true]
    • RAY Const A constant for specifying a ray line in various geometry.scad functions. [true,false]
    • LINE Const A constant for specifying an unbounded line in various geometry.scad functions. [false,false]

2. transforms.scad

Shortcuts for translation, rotation, etc. Can act on geometry, paths, or can return a matrix.
Included in std.scad

  • Affine Transformations

  • Translations

    • move() Func/Mod Translates children in an arbitrary direction. [Trans] [Path] [VNF] [Mat]
    • left() Func/Mod Translates children leftwards (X-). [Trans] [Path] [VNF] [Mat]
    • right() Func/Mod Translates children rightwards (X+). [Trans] [Path] [VNF] [Mat]
    • fwd() Func/Mod Translates children forwards (Y-). [Trans] [Path] [VNF] [Mat]
    • back() Func/Mod Translates children backwards (Y+). [Trans] [Path] [VNF] [Mat]
    • down() Func/Mod Translates children downwards (Z-). [Trans] [Path] [VNF] [Mat]
    • up() Func/Mod Translates children upwards (Z+). [Trans] [Path] [VNF] [Mat]
  • Rotations

    • rot() Func/Mod Rotates children in various ways. [Trans] [Path] [VNF] [Mat]
    • xrot() Func/Mod Rotates children around the X axis using the right-hand rule. [Trans] [Path] [VNF] [Mat]
    • yrot() Func/Mod Rotates children around the Y axis using the right-hand rule. [Trans] [Path] [VNF] [Mat]
    • zrot() Func/Mod Rotates children around the Z axis using the right-hand rule. [Trans] [Path] [VNF] [Mat]
    • tilt() Func/Mod Tilts children towards a direction [Trans] [Path] [VNF] [Mat]
  • Scaling

    • scale() Func/Mod Scales children arbitrarily. [Trans] [Path] [VNF] [Mat] [Ext]
    • xscale() Func/Mod Scales children along the X axis. [Trans] [Path] [VNF] [Mat]
    • yscale() Func/Mod Scales children along the Y axis. [Trans] [Path] [VNF] [Mat]
    • zscale() Func/Mod Scales children along the Z axis. [Trans] [Path] [VNF] [Mat]
  • Reflection (Mirroring)

    • mirror() Func/Mod Reflects children across an arbitrary plane. [Trans] [Path] [VNF] [Mat] [Ext]
    • xflip() Func/Mod Reflects children across the YZ plane. [Trans] [Path] [VNF] [Mat]
    • yflip() Func/Mod Reflects children across the XZ plane. [Trans] [Path] [VNF] [Mat]
    • zflip() Func/Mod Reflects children across the XY plane. [Trans] [Path] [VNF] [Mat]
  • Other Transformations

    • frame_map() Func/Mod Rotates and possibly skews children from one frame of reference to another. [Trans] [Path] [VNF] [Mat]
    • skew() Func/Mod Skews (or shears) children along various axes. [Trans] [Path] [VNF] [Mat]
  • Applying transformation matrices to data

    • apply() Func Applies a transformation matrix to a point, list of points, array of points, or a VNF. [Path] [VNF] [Mat]
  • Saving and restoring

3. attachments.scad

Positioning objects on or relative to other objects. Making your own objects support attachment.
Included in std.scad

4. shapes2d.scad

Attachable circles, squares, polygons, teardrop. Can make geometry or paths.
Included in std.scad

  • 2D Primitives

    • square() Func/Mod Creates a 2D square or rectangle. [Geom] [Path] [Ext]
    • rect() Func/Mod Creates a 2d rectangle with optional corner rounding. [Geom] [Path]
    • circle() Func/Mod Creates the approximation of a circle. [Geom] [Path] [Ext]
    • ellipse() Func/Mod Creates the approximation of an ellipse or a circle. [Geom] [Path]
  • Polygons

    • regular_ngon() Func/Mod Creates a regular N-sided polygon. [Geom] [Path]
    • pentagon() Func/Mod Creates a regular pentagon. [Geom] [Path]
    • hexagon() Func/Mod Creates a regular hexagon. [Geom] [Path]
    • octagon() Func/Mod Creates a regular octagon. [Geom] [Path]
    • right_triangle() Func/Mod Creates a right triangle. [Geom] [Path]
    • trapezoid() Func/Mod Creates a trapezoid with parallel top and bottom sides. [Geom] [Path]
    • star() Func/Mod Creates a star-shaped polygon or returns a star-shaped region. [Geom] [Path]
    • jittered_poly() Mod Creates a polygon with extra points for smoother twisted extrusions. [Geom]
  • Curved 2D Shapes

    • teardrop2d() Func/Mod Creates a 2D teardrop shape. [Geom] [Path]
    • egg() Func/Mod Creates an egg-shaped 2d object. [Geom] [Path]
    • ring() Func/Mod Draws a 2D ring or partial ring or returns a region or path [Geom] [Region] [Path]
    • glued_circles() Func/Mod Creates a shape of two circles joined by a curved waist. [Geom] [Path]
    • squircle() Func/Mod Creates a shape between a circle and a square, centered on the origin. [Geom] [Path]
    • keyhole() Func/Mod Creates a 2D keyhole shape. [Geom] [Path]
    • supershape() Func/Mod Creates a 2D Superformula shape. [Geom] [Path]
    • reuleaux_polygon() Func/Mod Creates a constant-width shape that is not circular. [Geom] [Path]
  • Text

    • text() Mod Creates an attachable block of text. [Geom]
  • Rounding 2D shapes

    • round2d() Mod Rounds the corners of 2d objects. [Geom]
    • shell2d() Mod Creates a shell from 2D children. [Geom]

5. shapes3d.scad

Attachable cubes, cylinders, spheres, ruler, and text. Many can produce a VNF.
Included in std.scad

  • Cuboids, Prismoids and Pyramids

    • cube() Func/Mod Creates a cube with anchors for attaching children. [Geom] [VNF] [Ext]
    • cuboid() Mod Creates a cube with chamfering and roundovers. [Geom]
    • prismoid() Func/Mod Creates a rectangular prismoid shape with optional roundovers and chamfering. [Geom] [VNF]
    • octahedron() Func/Mod Creates an octahedron with axis-aligned points. [Geom] [VNF]
    • regular_prism() Func/Mod Creates a regular prism with roundovers and chamfering [Geom] [VNF]
    • rect_tube() Mod Creates a rectangular tube. [Geom]
    • wedge() Func/Mod Creates a 3d triangular wedge. [Geom] [VNF]
  • Cylinders

    • cylinder() Func/Mod Creates an attachable cylinder. [Geom] [VNF] [Ext]
    • cyl() Func/Mod Creates an attachable cylinder with roundovers and chamfering. [Geom] [VNF]
    • xcyl() Mod creates a cylinder oriented along the X axis. [Geom]
    • ycyl() Mod Creates a cylinder oriented along the y axis. [Geom]
    • zcyl() Mod Creates a cylinder oriented along the Z axis. [Geom]
    • tube() Mod Creates a cylindrical or conical tube. [Geom]
    • pie_slice() Func/Mod Creates a pie slice shape. [Geom] [VNF]
  • Other Round Objects

    • sphere() Func/Mod Creates an attachable spherical object. [Geom] [VNF] [Ext]
    • spheroid() Func/Mod Creates an attachable spherical object with controllable triangulation. [Geom] [VNF]
    • torus() Func/Mod Creates an attachable torus. [Geom] [VNF]
    • teardrop() Func/Mod Creates a teardrop shape. [Geom] [VNF]
    • onion() Func/Mod Creates an attachable onion-like shape. [Geom] [VNF]
  • Text

    • text3d() Mod Creates an attachable 3d text block. [Geom]
    • path_text() Mod Creates 2d or 3d text placed along a path. [Geom]
  • Miscellaneous

    • fillet() Mod Creates a smooth fillet between two faces. [Geom] [VNF]
    • heightfield() Func/Mod Generates a 3D surface from a 2D grid of values. [Geom] [VNF]
    • cylindrical_heightfield() Func/Mod Generates a cylindrical 3d surface from a 2D grid of values. [Geom] [VNF]
    • ruler() Mod Creates a ruler. [Geom]

6. drawing.scad

Create and draw 2D and 3D paths: arc, helix, turtle graphics
Included in std.scad

7. masks2d.scad

2D masking shapes for edge profiling: including roundover, cove, teardrop, ogee.
Included in std.scad

8. masks3d.scad

3D masks for rounding or chamfering edges and corners.
Included in std.scad

9. distributors.scad

Copy or distribute objects onto a line, grid, or path. Mirror shortcuts.
Included in std.scad

10. color.scad

HSV and HSL conversion, color multiple objects, change color of objects
Included in std.scad

  • Coloring Objects

    • recolor() Mod Sets the color for attachable children and their descendants. [Trans]
    • color_this() Mod Sets the color for children at the current level only. [Trans]
    • rainbow() Mod Iterates through a list, displaying children in different colors. [Trans]
    • color_overlaps() Mod Shows ghostly children, with overlaps highlighted in color. [Trans]
  • Setting Object Modifiers

    • highlight() Mod Sets # modifier for attachable children and their descendents. [Trans]
    • highlight_this() Mod Apply # modifier to children at a single level. [Trans]
    • ghost() Mod Sets % modifier for attachable children and their descendents. [Trans]
    • ghost_this() Mod Apply % modifier to children at a single level. [Trans]
  • Colorspace Conversion

    • hsl() Func/Mod Sets the color of children to a specified hue, saturation, lightness and optional alpha channel value. [Trans]
    • hsv() Func/Mod Sets the color of children to a hue, saturation, value and optional alpha channel value. [Trans]

11. partitions.scad

Cut objects with a plane or partition them into interlocking pieces.
Included in std.scad

  • Planar Cutting

    • half_of() Func/Mod Masks half of an object at a cut plane. [Geom] [VNF] [Path] [Region]
    • left_half() Func/Mod Masks the right half of an object along the Y-Z plane, leaving the left half. [Geom] [VNF] [Path] [Region]
    • right_half() Func/Mod Masks the left half of an object along the Y-Z plane, leaving the right half. [Geom] [VNF] [Path] [Region]
    • front_half() Func/Mod Masks the back half of an object along the X-Z plane, leaving the front half. [Geom] [VNF] [Path] [Region]
    • back_half() Func/Mod Masks the front half of an object along the X-Z plane, leaving the back half. [Geom] [VNF] [Path] [Region]
    • bottom_half() Func/Mod Masks the top half of an object along the X-Y plane, leaving the bottom half. [Geom] [VNF] [Path] [Region]
    • top_half() Func/Mod Masks the bottom half of an object along the X-Y plane, leaving the top half. [Geom] [VNF] [Path] [Region]
  • Partioning into Interlocking Pieces

    • partition_mask() Mod Creates a mask to remove half an object with the remaining half suitable for reassembly. [Geom]
    • partition_cut_mask() Mod Creates a mask to cut an object into two subparts that can be reassembled. [Geom]
    • partition() Mod Cuts an object in two with matched joining edges, then separates the parts. [Geom] [VNF] [Path] [Region]

12. miscellaneous.scad

Extrusion, bounding box, chain hull and minkowski-based transforms.
Included in std.scad

13. paths.scad

Operations on paths: length, resampling, tangents, splitting into subpaths
Included in std.scad

14. regions.scad

Offsets and Boolean geometry of 2D paths and regions.
Included in std.scad

15. skin.scad

Construct 3D shapes from 2D cross sections of the desired shape.
Included in std.scad

16. vnf.scad

Vertices 'n' Faces structure. Makes polyhedron() easier to use.
Included in std.scad

17. beziers.scad

Bezier curves and surfaces.

18. nurbs.scad

NURBS and B-spline curves and surfaces.

19. rounding.scad

Round path corners, rounded prisms, rounded cutouts in tubes, filleted prism joints

  • Types of Roundovers

  • Rounding Paths

    • round_corners() Func Round or chamfer the corners of a path (clipping them off). [Path]
    • smooth_path() Func Create smoothed path that passes through all the points of a given path. [Path]
    • path_join() Func Join paths end to end with optional rounding. [Path]
    • offset_stroke() Func/Mod Draws a line along a path with options to specify angles and roundings at the ends. [Path] [Region]
  • Three-Dimensional Rounding

    • offset_sweep() Func/Mod Make a solid from a polygon with offset that changes along its length. [Geom] [VNF]
    • convex_offset_extrude() Mod Make a solid from geometry where offset changes along the object's length. [Geom]
    • rounded_prism() Func/Mod Make a rounded 3d object by connecting two polygons with the same vertex count. [Geom] [VNF]
    • bent_cutout_mask() Mod Create a mask for making a round-edged cutout in a cylindrical shell. [Geom]
    • join_prism() Func/Mod Join an arbitrary prism to a plane, sphere, cylinder or another arbitrary prism with a fillet. [Geom] [VNF]

20. turtle3d.scad

3D turtle graphics for making paths or lists of transformations.

21. math.scad

Math on lists, special functions, quantization, random numbers, calculus, root finding
Included in std.scad

  • Math Constants

    • PHI Const The golden ratio φ (phi). Approximately 1.6180339887
    • EPSILON Const A tiny value to compare floating point values. 1e-9
    • INF Const The floating point value for Infinite.
    • NAN Const The floating point value for Not a Number.
  • Interpolation and Counting

    • count() Func Creates a list of incrementing numbers.
    • lerp() Func Linearly interpolates between two values.
    • lerpn() Func Returns exactly n values, linearly interpolated between a and b.
  • Miscellaneous Functions

    • sqr() Func Returns the square of the given value.
    • log2() Func Returns the log base 2 of the given value.
    • hypot() Func Returns the hypotenuse length of a 2D or 3D triangle.
    • factorial() Func Returns the factorial of the given integer.
    • binomial() Func Returns the binomial coefficients of the integer n.
    • binomial_coefficient() Func Returns the k-th binomial coefficient of the integer n.
    • gcd() Func Returns the Greatest Common Divisor/Factor of two integers.
    • lcm() Func Returns the Least Common Multiple of two or more integers.
  • Hyperbolic Trigonometry

    • sinh() Func Returns the hyperbolic sine of the given value.
    • cosh() Func Returns the hyperbolic cosine of the given value.
    • tanh() Func Returns the hyperbolic tangent of the given value.
    • asinh() Func Returns the hyperbolic arc-sine of the given value.
    • acosh() Func Returns the hyperbolic arc-cosine of the given value.
    • atanh() Func Returns the hyperbolic arc-tangent of the given value.
  • Quantization

    • quant() Func Returns x quantized to the nearest integer multiple of y.
    • quantdn() Func Returns x quantized down to an integer multiple of y.
    • quantup() Func Returns x quantized uo to an integer multiple of y.
  • Constraints and Modulos

    • constrain() Func Returns a value constrained between minval and maxval, inclusive.
    • posmod() Func Returns the positive modulo of a value.
    • modang() Func Returns an angle normalized to between -180º and 180º.
  • Operations on Lists (Sums, Mean, Products)

    • sum() Func Returns the sum of a list of values.
    • mean() Func Returns the mean value of a list of values.
    • median() Func Returns the median value of a list of values.
    • deltas() Func Returns the deltas between a list of values.
    • cumsum() Func Returns the running cumulative sum of a list of values.
    • product() Func Returns the multiplicative product of a list of values.
    • cumprod() Func Returns the running cumulative product of a list of values.
    • convolve() Func Returns the convolution of p and q.
    • sum_of_sines() Func Returns the sum of one or more sine waves at a given angle.
  • Random Number Generation

  • Calculus

    • deriv() Func Returns the first derivative estimate of a list of data.
    • deriv2() Func Returns the second derivative estimate of a list of data.
    • deriv3() Func Returns the third derivative estimate of a list of data.
  • Complex Numbers

    • complex() Func Replaces scalars in a list or matrix with complex number 2-vectors.
    • c_mul() Func Multiplies two complex numbers.
    • c_div() Func Divides two complex numbers.
    • c_conj() Func Returns the complex conjugate of the input.
    • c_real() Func Returns the real part of a complex number, vector or matrix..
    • c_imag() Func Returns the imaginary part of a complex number, vector or matrix..
    • c_ident() Func Returns an n by n complex identity matrix.
    • c_norm() Func Returns the norm of a complex number or vector.
  • Polynomials

    • quadratic_roots() Func Computes roots for the quadratic equation.
    • polynomial() Func Evaluate a polynomial at a real or complex value.
    • poly_mult() Func Compute product of two polynomials, returning a polynomial.
    • poly_div() Func Returns the polynomial quotient and remainder results of dividing two polynomials.
    • poly_add() Func Returns the polynomial sum of adding two polynomials.
    • poly_roots() Func Returns all complex valued roots of the given real polynomial.
    • real_roots() Func Returns all real roots of the given real polynomial.
  • Operations on Functions

    • root_find() Func Finds a root of the given continuous function.

22. linalg.scad

Linear Algebra: solve linear systems, construct and modify matrices.
Included in std.scad

23. vectors.scad

Vector arithmetic, angle, and searching.
Included in std.scad

  • Vector Testing

    • is_vector() Func Returns true if the given value is a vector.
  • Scalar operations on vectors

    • add_scalar() Func Adds a scalar value to every item in a vector.
    • v_mul() Func Returns the element-wise multiplication of two equal-length vectors.
    • v_div() Func Returns the element-wise division of two equal-length vectors.
    • v_abs() Func Returns the absolute values of the given vector.
    • v_floor() Func Returns the values of the given vector, rounded down.
    • v_ceil() Func Returns the values of the given vector, rounded up.
    • v_lookup() Func Like lookup(), but it can interpolate between vector results.
  • Vector Properties

    • unit() Func Returns the unit length of a given vector.
    • v_theta() Func Returns the angle counter-clockwise from X+ on the XY plane.
    • vector_angle() Func Returns the minor angle between two vectors.
    • vector_axis() Func Returns the perpendicular axis between two vectors.
    • vector_bisect() Func Returns the vector that bisects two vectors.
    • vector_perp() Func Returns component of a vector perpendicular to a second vector
  • Vector Searching

24. coords.scad

Conversions between coordinate systems.
Included in std.scad

25. geometry.scad

Geometrical calculations including intersections of lines, circles and planes, circle from 3 points
Included in std.scad

26. trigonometry.scad

Trigonometry shortcuts for when you can't recall the mnemonic SOHCAHTOA.
Included in std.scad

  • 2D General Triangle Functions

    • law_of_cosines() Func Applies the Law of Cosines for an arbitrary triangle.
    • law_of_sines() Func Applies the Law of Sines for an arbitrary triangle.
  • 2D Right Triangle Functions

    • hyp_opp_to_adj() Func Returns the adjacent side length from the lengths of the hypotenuse and the opposite side.
    • hyp_ang_to_adj() Func Returns the adjacent side length from the length of the hypotenuse and the angle.
    • opp_ang_to_adj() Func Returns the adjacent side length from the length of the opposite side and the angle.
    • hyp_adj_to_opp() Func Returns the opposite side length from the lengths of the hypotenuse and the adjacent side.
    • hyp_ang_to_opp() Func Returns the opposite side length from the length of the hypotenuse and the angle.
    • adj_ang_to_opp() Func Returns the opposite side length from the length of the adjacent side and the angle.
    • adj_opp_to_hyp() Func Returns the hypotenuse length from the lengths of the adjacent and opposite sides.
    • adj_ang_to_hyp() Func Returns the hypotenuse length from the length of the adjacent and the angle.
    • opp_ang_to_hyp() Func Returns the hypotenuse length from the length of the opposite side and the angle.
    • hyp_adj_to_ang() Func Returns the angle from the lengths of the hypotenuse and the adjacent side.
    • hyp_opp_to_ang() Func Returns the angle from the lengths of the hypotenuse and the opposite side.
    • adj_opp_to_ang() Func Returns the angle from the lengths of the adjacent and opposite sides.

27. version.scad

Parse and compare semantic versions.
Included in std.scad

28. comparisons.scad

Comparisons and sorting.
Included in std.scad

  • List comparison operations

    • approx() Func Returns true if two values are equal to within a small epsilon value.
    • all_zero() Func Returns true if the value(s) given are aproximately zero.
    • all_nonzero() Func Returns true if the value(s) given are not aproximately zero.
    • all_positive() Func Returns true if the value(s) given are greater than zero.
    • all_negative() Func Returns true if the value(s) given are less than zero.
    • all_nonpositive() Func Returns true if the value(s) given are less than or equal to zero.
    • all_nonnegative() Func Returns true if the value(s) given are greater than or equal to zero.
    • all_equal() Func Returns true if all items in a list are approximately equal to each other.
    • are_ends_equal() Func Returns true if the first and last items in a list are approximately equal.
    • is_increasing() Func Returns true if every item in a list is greater than the previous item.
    • is_decreasing() Func Returns true if exery item in a list is less than the previous item.
    • compare_vals() Func Compares two values, possibly of different type.
    • compare_lists() Func Compares two lists of values, possibly of different type.
  • Finding the index of the minimum or maximum of a list

    • min_index() Func Returns the index of the minimal value in the given list.
    • max_index() Func Returns the index of the minimal value in the given list.
  • Dealing with duplicate list entries

    • find_approx() Func Finds the indexes of the item(s) in the given list that are aproximately the given value.
    • deduplicate() Func Returns a list with all consecutive duplicate values removed.
    • deduplicate_indexed() Func Takes a list of indices into a list of values, and returns a list of indices whose values are not consecutively the same.
    • list_wrap() Func Returns a list whose last value is the same as the first.
    • list_unwrap() Func Removes the last item of a list if its first and last values are equal.
    • unique() Func Returns a sorted list with all duplicates removed.
    • unique_count() Func Returns a sorted list of unique items with counts.
  • Sorting

    • sort() Func Returns a sorted list.
    • sortidx() Func Returns a list of sorted indices into a list.
    • group_sort() Func Returns a sorted list of groups of values.
    • group_data() Func Groups list data by integer group numbers.
    • list_smallest() Func Returns the k smallest values in the list, in arbitrary order.

29. lists.scad

List indexing, change list structure, rearrange/modify lists
Included in std.scad

30. utility.scad

Type checking, dealing with undefs, processing function args
Included in std.scad

  • Type Checking

    • typeof() Func Returns a string representing the type of the value.
    • is_type() Func Returns true if the type of 'x' is one of those in the list types.
    • is_def() Func Returns true if x is not undef.
    • is_str() Func Returns true if the argument is a string.
    • is_int() Func Returns true if the argument is an integer.
    • all_integer() Func Returns true if all of the numbers in the argument are integers.
    • is_nan() Func Return true if the argument is "not a number".
    • is_finite() Func Returns true if the argument is a finite number.
    • is_range() Func Returns true if the argument is a range.
    • valid_range() Func Returns true if the argument is a valid range.
    • is_func() Func Returns true if the argument is a function literal.
    • is_consistent() Func Returns true if the argument is a list with consistent structure and finite numerical data.
    • same_shape() Func Returns true if the argument lists are numeric and of the same shape.
    • is_bool_list() Func Returns true if the argument list contains only booleans.
  • Boolean list testing

    • any() Func Returns true if any item in the argument list is true.
    • all() Func Returns true if all items in the argument list are true.
    • num_true() Func Returns the number of true entries in the arguemnt list.
  • Handling undefs.

    • default() Func Returns a default value if the argument is 'undef', else returns the argument.
    • first_defined() Func Returns the first value in the argument list that is not 'undef'.
    • one_defined() Func Returns the defined value in the argument list if only a single value is defined.
    • num_defined() Func Returns the number of defined values in the the argument list.
    • any_defined() Func Returns true if any item in the argument list is not undef.
    • all_defined() Func Returns true if all items in the given array are defined.
  • Undef Safe Arithmetic

    • u_add() Func Returns the sum of 2 numbers if both are defined, otherwise returns undef.
    • u_sub() Func Returns the difference of 2 numbers if both are defined, otherwise returns undef.
    • u_mul() Func Returns the product of 2 numbers if both are defined, otherwise returns undef.
    • u_div() Func Returns the quotient of 2 numbers if both are defined, otherwise returns undef.
  • Processing Arguments to Functions and Modules

    • get_anchor() Func Returns the correct anchor from anchor and center.
    • get_radius() Func Given various radii and diameters, returns the most specific radius.
    • scalar_vec3() Func Expands a scalar or a list with length less than 3 to a length 3 vector.
    • segs() Func Returns the number of sides for a circle given $fn, $fa, and $fs.
    • no_children() Mod Assert that the calling module does not support children.
    • req_children() Mod Assert that the calling module requires children.
    • no_function() Func Assert that the argument exists only as a module and not as a function.
    • no_module() Mod Assert that the argument exists only as a function and not as a module.
    • deprecate() Mod Display a console note that a module is deprecated and suggest a replacement.
  • Testing Helpers

  • C-Style For Loop Helpers

    • looping() Func Returns true if the argument indicates the current C-style loop should continue.
    • loop_while() Func Returns true if both arguments indicate the current C-style loop should continue.
    • loop_done() Func Returns true if the argument indicates the current C-style loop is finishing.

31. strings.scad

String manipulation functions.
Included in std.scad

32. structs.scad

Structure/Dictionary Manipulation
Included in std.scad

33. fnliterals.scad

Function Literal Algorithms, and factories for generating function literals for builtin functions.

  • Function Literal Algorithms

    • map() Func Applies a function to each item in a list.
    • filter() Func Returns just the list items which the given function returns true for.
    • reduce() Func Applies a 2-arg function cumulatively to the items of a list, returning the final result.
    • accumulate() Func Applies a 2-arg function cumulatively to the items of a list, returning a list of every result.
    • while() Func While a cond function returns true, iteratively calls a work function, returning the final result.
    • for_n() Func Iteratively calls a work function n times, returning the final result.
    • find_all() Func Returns the indices of all items in a list that a given function returns true for.
    • find_first() Func Returns the index of the first item in a list, after start, that a given function returns true for.
    • binsearch() Func Does a binary search of a sorted list to find the index of a given value.
    • simple_hash() Func Returns an integer hash of a given value.
    • hashmap() Func Creates a hashmap manipulation function.
  • Function Meta-Generators

    • f_1arg() Func Creates a factory for a 2-arg function literal, where you can optionally pre-fill the arg.
    • f_2arg() Func Creates a factory for a 2-arg function literal, where you can optionally pre-fill the args.
    • f_2arg_simple() Func Creates a factory for a 2-arg function literal, where you can optionally pre-fill the args.
    • f_3arg() Func Creates a factory for a 3-arg function literal, where you can optionally pre-fill the args.
    • ival() Func Generates a function with signature (i,x) that calls func(i)
    • xval() Func Generates a function with signature (i,x) that calls func(x)
  • Comparator Generators

    • f_cmp() Func Returns a function to compare values.
    • f_gt() Func Returns a function to compare if a is greater than b.
    • f_lt() Func Returns a function to compare if a is less than b.
    • f_gte() Func Returns a function to compare if a is greater than or equal to b.
    • f_lte() Func Returns a function to compare if a is less than or equal to b.
    • f_eq() Func Returns a function to compare if a is exactly equal to b.
    • f_neq() Func Returns a function to compare if a is not exactly equal to b.
    • f_approx() Func Returns a function to compare if a is approximately equal to b.
    • f_napprox() Func Returns a function to compare if a is not approximately equal to b.
  • Logic Operators

    • f_or() Func Returns a function to check if either a or b is true.
    • f_and() Func Returns a function to check if both a and b are true.
    • f_nor() Func Returns a function to check if neither a nor b are true.
    • f_nand() Func Returns a function to check if a and b are not both true.
    • f_xor() Func Returns a function to check if either a or b, but not both, are true.
    • f_not() Func Returns a function to check if a is not true.
    • f_even() Func Returns a function to check if a is an even number.
    • f_odd() Func Returns a function to check if a is an odd number.
  • Math Operators

    • f_add() Func Returns a function to add a and b.
    • f_sub() Func Returns a function to subtract a from b.
    • f_mul() Func Returns a function to multiply a by b.
    • f_div() Func Returns a function to divide a by b.
    • f_mod() Func Returns a function to calculate the modulo of a divided by b.
    • f_pow() Func Returns a function to calculate a to the power of b.
    • f_neg() Func Returns a function to calculate -a
  • Min/Max Operators

    • f_min() Func Returns a function to calculate the minimum value of a list.
    • f_max() Func Returns a function to calculate the maximum value of a list.
    • f_min2() Func Returns a function to calculate the minimum of two values.
    • f_max2() Func Returns a function to calculate the maximum of two values.
    • f_min3() Func Returns a function to calculate the minimum of three values.
    • f_max3() Func Returns a function to calculate the maximum of three values.
  • Trigonometry Operators

    • f_sin() Func Returns a function to calculate the sine of a value.
    • f_cos() Func Returns a function to calculate the cosine of a value.
    • f_tan() Func Returns a function to calculate the tangent of a value.
    • f_asin() Func Returns a function to calculate the arcsine of a value.
    • f_acos() Func Returns a function to calculate the arccosine of a value.
    • f_atan() Func Returns a function to calculate the arctangent of a value.
    • f_atan2() Func Returns a function to calculate the arctangent of y and x
  • String Operators

    • f_len() Func Returns a function to calculate the length of a string or list.
    • f_chr() Func Returns a function to get a string character from its ordinal number.
    • f_ord() Func Returns a function to get the ordinal number of a string character.
    • f_str() Func Returns a function to get the string representation of an arbitrary value.
    • f_str2() Func Returns a function to concatenate the string representations of two arbitrary values.
    • f_str3() Func Returns a function to concatenate the string representations of three arbitrary values.
  • Miscellaneous Operators

    • f_floor() Func Returns a function to calculate the integer floor of a given number.
    • f_round() Func Returns a function to calculate the integer rounding of a given number.
    • f_ceil() Func Returns a function to calculate the integer ceiling of a given number.
    • f_abs() Func Returns a function to calculate the absolute value of a given number.
    • f_sign() Func Returns a function to calculate the sign of a given number.
    • f_ln() Func Returns a function to calculate the natural logarithm of a given number.
    • f_log() Func Returns a function to calculate the base 10 logarithm of a given number.
    • f_exp() Func Returns a function to calculate the natural exponent of a given number.
    • f_sqr() Func Returns a function to calculate the square of a given number.
    • f_sqrt() Func Returns a function to calculate the square root of a given number.
    • f_norm() Func Returns a function to calculate the norm of a given vector.
    • f_cross() Func Returns a function to calculate the norm of a given vector.
  • Type Queries

    • f_is_def() Func Returns a function to determine if a value is not undef.
    • f_is_undef() Func Returns a function to determine if a value is undef.
    • f_is_bool() Func Returns a function to determine if a value is a boolean.
    • f_is_num() Func Returns a function to determine if a value is a number.
    • f_is_int() Func Returns a function to determine if a value is an integer number.
    • f_is_nan() Func Returns a function to determine if a value is a number type that is Not a Number (NaN).
    • f_is_finite() Func Returns a function to determine if a value is a number type that is finite.
    • f_is_string() Func Returns a function to determine if a value is a string.
    • f_is_list() Func Returns a function to determine if a value is a list.
    • f_is_range() Func Returns a function to determine if a value is a range.
    • f_is_function() Func Returns a function to determine if a value is a function literal.
    • f_is_vector() Func Returns a function to determine if a value is a list of numbers.
    • f_is_path() Func Returns a function to determine if a value is a Path (a list of points).
    • f_is_region() Func Returns a function to determine if a value is a Region (a list of Paths).
    • f_is_vnf() Func Returns a function to determine if a value is a VNF structure.
    • f_is_patch() Func Returns a function to determine if a value is a Bezier Patch structure.

34. threading.scad

Various types of threaded rods and nuts.

35. screws.scad

ISO (metric) and UTS screws and nuts.

36. screw_drive.scad

Masks for Phillips, Torx and square (Robertson) driver holes.

37. bottlecaps.scad

Standard bottle caps and necks.

38. ball_bearings.scad

Models for standard ball bearing cartridges.

39. cubetruss.scad

Modular open-framed trusses and joiners.

40. gears.scad

Gears, racks, worms, and worm gears.

41. hinges.scad

Hinges and snap-locking hinged parts.

42. joiners.scad

Joiner shapes for connecting separately printed objects.

43. linear_bearings.scad

Mounts for LMxUU style linear bearings.

44. modular_hose.scad

Modular flexible hose segments.

45. nema_steppers.scad

NEMA motor mounts and stepper motor models.

46. polyhedra.scad

Platonic, Archimidean, Catalan, and stellated polyhedra

47. sliders.scad

Simple sliders and rails.

  • Modules
    • slider() Mod Creates a V-groove slider. [Geom]
    • rail() Mod Creates a V-groove rail. [Geom]

48. tripod_mounts.scad

Tripod mount plates: RC2
- manfrotto_rc2_plate() Mod Creates a Manfrotto RC2 tripod quick release mount plate. [Geom]

49. walls.scad

Walls and structural elements that 3D print without support.

50. wiring.scad

Routed bundles of wires.