Skip to content
/ BOSL2 Public

# Topics

Revar Desmera edited this page Feb 25, 2024 · 1 revision

# Topic Index

An index of topics, with related functions, modules, and constants.

J: Joiners

K: Knurling

O: Offsets

W: Walls, Wiring

### Colors

• `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]

### Colorspace

• `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]

### Comparators

• `are_polygons_equal()` Func – Check if two polygons (not necessarily in the same point order) are equal.
• `f_approx()` Func – Returns a function to compare if `a` is approximately equal to `b`.
• `f_cmp()` Func – Returns a function to compare values.
• `f_eq()` Func – Returns a function to compare if `a` is exactly equal to `b`.
• `f_gt()` Func – Returns a function to compare if `a` is greater than `b`.
• `f_gte()` Func – Returns a function to compare if `a` is greater than or equal to `b`.
• `f_lt()` Func – Returns a function to compare if `a` is less than `b`.
• `f_lte()` Func – Returns a function to compare if `a` is less than or equal to `b`.
• `f_napprox()` Func – Returns a function to compare if `a` is not approximately equal to `b`.
• `f_neq()` Func – Returns a function to compare if `a` is not exactly equal to `b`.

### Constants

• `\$slop` Const – The slop amount to make printed items fit closely. `0.0` by default.
• `BACK` Const – The backwards (Y+) direction vector constant `[0,1,0]`.
• `BOTTOM` Const – The down-wards (Z-) direction vector constant `[0,0,-1]`.
• `BOTTOM` Const – The down-wards (Z-) direction vector constant `[0,0,-1]`.
• `CENTER` Const – The center vector constant `[0,0,0]`.
• `CENTER` Const – The center vector constant `[0,0,0]`.
• `CENTER` Const – The center vector constant `[0,0,0]`.
• `BOTTOM` Const – The down-wards (Z-) direction vector constant `[0,0,-1]`.
• `EPSILON` Const – A tiny value to compare floating point values. `1e-9`
• `FRONT` Const – The front-wards (Y-) direction vector constant `[0,-1,0]`.
• `FRONT` Const – The front-wards (Y-) direction vector constant `[0,-1,0]`.
• `FRONT` Const – The front-wards (Y-) direction vector constant `[0,-1,0]`.
• `IDENT` Const – A constant containing the 3D identity transformation matrix. [Mat]
• `INCH` Const – A constant containing the number of millimeters in an inch. `25.4`
• `INF` Const – The floating point value for Infinite.
• `LEFT` Const – The left-wards (X-) direction vector constant `[-1,0,0]`.
• `LINE` Const – A constant for specifying an unbounded line in various geometry.scad functions. `[false,false]`
• `NAN` Const – The floating point value for Not a Number.
• `PHI` Const – The golden ratio φ (phi). Approximately 1.6180339887
• `RAY` Const – A constant for specifying a ray line in various geometry.scad functions. `[true,false]`
• `RIGHT` Const – The right-wards (X+) direction vector constant `[1,0,0]`.
• `SEGMENT` Const – A constant for specifying a line segment in various geometry.scad functions. `[true,true]`
• `TOP` Const – The top-wards (Z+) direction vector constant `[0,0,1]`.
• `TOP` Const – The top-wards (Z+) direction vector constant `[0,0,1]`.

### Logic

• `f_and()` Func – Returns a function to check if both `a` and `b` are true.
• `f_nand()` Func – Returns a function to check if `a` and `b` are not both true.
• `f_nor()` Func – Returns a function to check if neither `a` nor `b` are true.
• `f_not()` Func – Returns a function to check if `a` is not true.
• `f_or()` Func – Returns a function to check if either `a` or `b` is true.
• `f_xor()` Func – Returns a function to check if either `a` or `b`, but not both, are true.

### Looping

• `accumulate()` Func – Applies a 2-arg function cumulatively to the items of a list, returning a list of every result.
• `filter()` Func – Returns just the list items which the given function returns true for.
• `find_all()` Func – Returns the indices of all items in a list that a given function returns true for.
• `for_n()` Func – Iteratively calls a work function `n` times, returning the final result.
• `map()` Func – Applies a function to each item in a list.
• `reduce()` Func – Applies a 2-arg function cumulatively to the items of a list, returning the final result.
• `while()` Func – While a `cond` function returns true, iteratively calls a work function, returning the final result.

### Partitions

• `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]
• `front_half()` Func/Mod – Masks the back half of an object along the X-Z plane, leaving the front half. [Geom] [VNF] [Path] [Region]
• `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]
• `partition()` Mod – Cuts an object in two with matched joining edges, then separates the parts. [Geom] [VNF] [Path] [Region]
• `partition_cut_mask()` Mod – Creates a mask to cut an object into two subparts that can be reassembled. [Geom]
• `partition_mask()` Mod – Creates a mask to remove half an object with the remaining half suitable for reassembly. [Geom]
• `right_half()` Func/Mod – Masks the left half of an object along the Y-Z plane, leaving the right 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]

### 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`.

### Searching

• `binsearch()` Func – Does a binary search of a sorted list to find the index of a given value.
• `find_first()` Func – Returns the index of the first item in a list, after `start`, that a given function returns true for.

### Skin

• `skin()` Func/Mod – Connect a sequence of arbitrary polygons into a 3D object. [VNF] [Geom]

## List of Files:

Basic Modeling:

Advanced Modeling:

Math:

Data Management:

Threaded Parts:

Parts:

## Footnotes:

STD = Included in std.scad