mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Tweaks for docs usage lines.
This commit is contained in:
parent
85a7085ea9
commit
5a355434ce
28 changed files with 509 additions and 509 deletions
12
affine.scad
12
affine.scad
|
@ -42,7 +42,7 @@ function ident(n) = [
|
|||
|
||||
// Function: is_affine()
|
||||
// Usage:
|
||||
// bool = is_affine(x,<dim>);
|
||||
// bool = is_affine(x, [dim]);
|
||||
// Topics: Affine, Matrices, Transforms, Type Checking
|
||||
// See Also: is_matrix()
|
||||
// Description:
|
||||
|
@ -649,10 +649,10 @@ function affine3d_rot_from_to(from, to) =
|
|||
|
||||
// Function: affine3d_frame_map()
|
||||
// Usage:
|
||||
// map = affine3d_frame_map(v1, v2, v3, <reverse>);
|
||||
// map = affine3d_frame_map(x=VECTOR1, y=VECTOR2, <reverse>);
|
||||
// map = affine3d_frame_map(x=VECTOR1, z=VECTOR2, <reverse>);
|
||||
// map = affine3d_frame_map(y=VECTOR1, z=VECTOR2, <reverse>);
|
||||
// map = affine3d_frame_map(v1, v2, v3, [reverse=]);
|
||||
// map = affine3d_frame_map(x=VECTOR1, y=VECTOR2, [reverse=]);
|
||||
// map = affine3d_frame_map(x=VECTOR1, z=VECTOR2, [reverse=]);
|
||||
// map = affine3d_frame_map(y=VECTOR1, z=VECTOR2, [reverse=]);
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: rot(), xrot(), yrot(), zrot(), affine2d_zrot()
|
||||
// Description:
|
||||
|
@ -750,7 +750,7 @@ function affine3d_mirror(v) =
|
|||
|
||||
// Function: affine3d_skew()
|
||||
// Usage:
|
||||
// mat = affine3d_skew(<sxy>, <sxz>, <syx>, <syz>, <szx>, <szy>);
|
||||
// mat = affine3d_skew([sxy=], [sxz=], [syx=], [syz=], [szx=], [szy=]);
|
||||
// Topics: Affine, Matrices, Transforms, Skewing
|
||||
// See Also: skew(), affine3d_skew_xy(), affine3d_skew_xz(), affine3d_skew_yz(), affine2d_skew()
|
||||
// Description:
|
||||
|
|
94
arrays.scad
94
arrays.scad
|
@ -20,7 +20,7 @@
|
|||
// Function: is_homogeneous()
|
||||
// Alias: is_homogenous()
|
||||
// Usage:
|
||||
// bool = is_homogeneous(list,depth);
|
||||
// bool = is_homogeneous(list, depth);
|
||||
// Topics: List Handling, Type Checking
|
||||
// See Also: is_vector(), is_matrix()
|
||||
// Description:
|
||||
|
@ -62,10 +62,10 @@ function _same_type(a,b, depth) =
|
|||
// at that position when `start` is a number or the selected list of entries when `start` is
|
||||
// a list of indices or a range.
|
||||
// Usage:
|
||||
// item = select(list,start);
|
||||
// item = select(list,[s:d:e]);
|
||||
// item = select(list,[i0,i1...,ik]);
|
||||
// list = select(list,start,end);
|
||||
// item = select(list, start);
|
||||
// item = select(list, RANGE);
|
||||
// item = select(list, INDEXLIST);
|
||||
// list = select(list, start, end);
|
||||
// Arguments:
|
||||
// list = The list to get the portion of.
|
||||
// start = Either the index of the first item or an index range or a list of indices.
|
||||
|
@ -102,7 +102,7 @@ function select(list, start, end) =
|
|||
|
||||
// Function: slice()
|
||||
// Usage:
|
||||
// list = slice(list,s,e);
|
||||
// list = slice(list, s, e);
|
||||
// Description:
|
||||
// Returns a slice of a list, from the first position `s` up to and including the last position `e`.
|
||||
// The first item in the list is at index 0. Negative indexes are counted back from the end.
|
||||
|
@ -150,7 +150,7 @@ function last(list) =
|
|||
|
||||
// Function: list_head()
|
||||
// Usage:
|
||||
// list = list_head(list,<to>);
|
||||
// list = list_head(list, [to]);
|
||||
// Topics: List Handling
|
||||
// See Also: select(), slice(), list_tail(), last()
|
||||
// Description:
|
||||
|
@ -177,7 +177,7 @@ function list_head(list, to=-2) =
|
|||
|
||||
// Function: list_tail()
|
||||
// Usage:
|
||||
// list = list_tail(list,<from>);
|
||||
// list = list_tail(list, [from]);
|
||||
// Topics: List Handling
|
||||
// See Also: select(), slice(), list_tail(), last()
|
||||
// Description:
|
||||
|
@ -223,7 +223,7 @@ function list(l) = is_list(l)? l : [for (x=l) x];
|
|||
|
||||
// Function: force_list()
|
||||
// Usage:
|
||||
// list = force_list(value, <n>, <fill>);
|
||||
// list = force_list(value, [n], [fill]);
|
||||
// Topics: List Handling
|
||||
// See Also: scalar_vec3()
|
||||
// Description:
|
||||
|
@ -248,7 +248,7 @@ function force_list(value, n=1, fill) =
|
|||
|
||||
// Function: add_scalar()
|
||||
// Usage:
|
||||
// v = add_scalar(v,s);
|
||||
// v = add_scalar(v, s);
|
||||
// Topics: List Handling
|
||||
// Description:
|
||||
// Given a list and a scalar, returns the list with the scalar added to each item in it.
|
||||
|
@ -265,7 +265,7 @@ function add_scalar(v,s) =
|
|||
|
||||
// Function: in_list()
|
||||
// Usage:
|
||||
// bool = in_list(val,list, <idx>);
|
||||
// bool = in_list(val, list, [idx]);
|
||||
// Topics: List Handling
|
||||
// Description:
|
||||
// Returns true if value `val` is in list `list`. When `val==NAN` the answer will be false for any list.
|
||||
|
@ -290,8 +290,8 @@ function in_list(val,list,idx) =
|
|||
// Topics: List Handling
|
||||
// See Also: in_list()
|
||||
// Usage:
|
||||
// idx = find_first_match(val, list, <start=>, <eps=>);
|
||||
// indices = find_first_match(val, list, all=true, <start=>, <eps=>);
|
||||
// idx = find_first_match(val, list, [start=], [eps=]);
|
||||
// indices = find_first_match(val, list, all=true, [start=], [eps=]);
|
||||
// Description:
|
||||
// Finds the first item in `list` that matches `val`, returning the index.
|
||||
// Arguments:
|
||||
|
@ -322,7 +322,7 @@ function __find_first_match(val, list, eps, i=0) =
|
|||
// Function: min_index()
|
||||
// Usage:
|
||||
// idx = min_index(vals);
|
||||
// idxlist = min_index(vals,all=true);
|
||||
// idxlist = min_index(vals, all=true);
|
||||
// Topics: List Handling
|
||||
// See Also: max_index(), list_increasing(), list_decreasing()
|
||||
// Description:
|
||||
|
@ -421,7 +421,7 @@ function repeat(val, n, i=0) =
|
|||
|
||||
// Function: count()
|
||||
// Usage:
|
||||
// list = count(n,<s>,<step>);
|
||||
// list = count(n, [s], [step], [reverse]);
|
||||
// Description:
|
||||
// Creates a list of `n` numbers, starting at `s`, incrementing by `step` each time.
|
||||
// Arguments:
|
||||
|
@ -461,7 +461,7 @@ function reverse(x) =
|
|||
|
||||
// Function: list_rotate()
|
||||
// Usage:
|
||||
// rlist = list_rotate(list,<n>);
|
||||
// rlist = list_rotate(list, [n]);
|
||||
// Topics: List Handling
|
||||
// See Also: select(), reverse()
|
||||
// Description:
|
||||
|
@ -497,7 +497,7 @@ function list_rotate(list,n=1) =
|
|||
|
||||
// Function: deduplicate()
|
||||
// Usage:
|
||||
// list = deduplicate(list,<close>,<eps>);
|
||||
// list = deduplicate(list, [close], [eps]);
|
||||
// Topics: List Handling
|
||||
// See Also: deduplicate_indexed()
|
||||
// Description:
|
||||
|
@ -528,7 +528,7 @@ function deduplicate(list, closed=false, eps=EPSILON) =
|
|||
|
||||
// Function: deduplicate_indexed()
|
||||
// Usage:
|
||||
// new_idxs = deduplicate_indexed(list, indices, <closed>, <eps>);
|
||||
// new_idxs = deduplicate_indexed(list, indices, [closed], [eps]);
|
||||
// Topics: List Handling
|
||||
// See Also: deduplicate()
|
||||
// Description:
|
||||
|
@ -572,7 +572,7 @@ function deduplicate_indexed(list, indices, closed=false, eps=EPSILON) =
|
|||
|
||||
// Function: repeat_entries()
|
||||
// Usage:
|
||||
// newlist = repeat_entries(list, N, <exact>);
|
||||
// newlist = repeat_entries(list, N, [exact]);
|
||||
// Topics: List Handling
|
||||
// See Also: repeat()
|
||||
// Description:
|
||||
|
@ -613,7 +613,7 @@ function repeat_entries(list, N, exact=true) =
|
|||
|
||||
// Function: list_set()
|
||||
// Usage:
|
||||
// list = list_set(list, indices, values, <dflt>, <minlen>);
|
||||
// list = list_set(list, indices, values, [dflt], [minlen]);
|
||||
// Topics: List Handling
|
||||
// See Also: list_insert(), list_remove(), list_remove_values()
|
||||
// Description:
|
||||
|
@ -727,8 +727,8 @@ function list_remove(list, indices) =
|
|||
|
||||
// Function: list_remove_values()
|
||||
// Usage:
|
||||
// list = list_remove_values(list,values);
|
||||
// list = list_remove_values(list,values,all=true);
|
||||
// list = list_remove_values(list, values);
|
||||
// list = list_remove_values(list, values, all=true);
|
||||
// Topics: List Handling
|
||||
// See Also: list_set(), list_insert(), list_remove()
|
||||
// Description:
|
||||
|
@ -756,7 +756,7 @@ function list_remove_values(list,values=[],all=false) =
|
|||
|
||||
// Function: bselect()
|
||||
// Usage:
|
||||
// array = bselect(array,index);
|
||||
// array = bselect(array, index);
|
||||
// Topics: List Handling
|
||||
// See Also: list_bset()
|
||||
// Description:
|
||||
|
@ -775,7 +775,7 @@ function bselect(array,index) =
|
|||
|
||||
// Function: list_bset()
|
||||
// Usage:
|
||||
// arr = list_bset(indexset, valuelist, <dflt>);
|
||||
// arr = list_bset(indexset, valuelist, [dflt]);
|
||||
// Topics: List Handling
|
||||
// See Also: bselect()
|
||||
// Description:
|
||||
|
@ -838,7 +838,7 @@ function list_longest(array) =
|
|||
|
||||
// Function: list_pad()
|
||||
// Usage:
|
||||
// arr = list_pad(array, minlen, <fill>);
|
||||
// arr = list_pad(array, minlen, [fill]);
|
||||
// Topics: List Handling
|
||||
// See Also: list_trim(), list_fit()
|
||||
// Description:
|
||||
|
@ -920,7 +920,7 @@ function _valid_idx(idx,imin,imax) =
|
|||
|
||||
// Function: shuffle()
|
||||
// Usage:
|
||||
// shuffled = shuffle(list,<seed>);
|
||||
// shuffled = shuffle(list, [seed]);
|
||||
// Topics: List Handling
|
||||
// See Also: sort(), sortidx(), unique(), unique_count()
|
||||
// Description:
|
||||
|
@ -1066,7 +1066,7 @@ function _indexed_sort(arrind) =
|
|||
|
||||
// Function: sort()
|
||||
// Usage:
|
||||
// slist = sort(list, <idx>);
|
||||
// slist = sort(list, [idx]);
|
||||
// Topics: List Handling
|
||||
// See Also: shuffle(), sortidx(), unique(), unique_count(), group_sort()
|
||||
// Description:
|
||||
|
@ -1107,7 +1107,7 @@ function sort(list, idx=undef) =
|
|||
|
||||
// Function: sortidx()
|
||||
// Usage:
|
||||
// idxlist = sortidx(list, <idx>);
|
||||
// idxlist = sortidx(list, [idx]);
|
||||
// Topics: List Handling
|
||||
// See Also: shuffle(), sort(), group_sort(), unique(), unique_count()
|
||||
// Description:
|
||||
|
@ -1263,8 +1263,8 @@ function unique_count(list) =
|
|||
|
||||
// Function: idx()
|
||||
// Usage:
|
||||
// rng = idx(list, <s=>, <e=>, <step=>);
|
||||
// for(i=idx(list, <s=>, <e=>, <step=>)) ...
|
||||
// rng = idx(list, [s=], [e=], [step=]);
|
||||
// for(i=idx(list, [s=], [e=], [step=])) ...
|
||||
// Topics: List Handling, Iteration
|
||||
// See Also: enumerate(), pair(), triplet(), combinations(), permutations()
|
||||
// Description:
|
||||
|
@ -1289,8 +1289,8 @@ function idx(list, s=0, e=-1, step=1) =
|
|||
|
||||
// Function: enumerate()
|
||||
// Usage:
|
||||
// arr = enumerate(l, <idx>);
|
||||
// for (x = enumerate(l, <idx>)) ... // x[0] is the index number, x[1] is the item.
|
||||
// arr = enumerate(l, [idx]);
|
||||
// for (x = enumerate(l, [idx])) ... // x[0] is the index number, x[1] is the item.
|
||||
// Topics: List Handling, Iteration
|
||||
// See Also: idx(), pair(), triplet(), combinations(), permutations()
|
||||
// Description:
|
||||
|
@ -1316,8 +1316,8 @@ function enumerate(l,idx=undef) =
|
|||
|
||||
// Function: pair()
|
||||
// Usage:
|
||||
// p = pair(list, <wrap>);
|
||||
// for (p = pair(list, <wrap>)) ... // On each iteration, p contains a list of two adjacent items.
|
||||
// p = pair(list, [wrap]);
|
||||
// for (p = pair(list, [wrap])) ... // On each iteration, p contains a list of two adjacent items.
|
||||
// Topics: List Handling, Iteration
|
||||
// See Also: idx(), enumerate(), triplet(), combinations(), permutations()
|
||||
// Description:
|
||||
|
@ -1346,8 +1346,8 @@ function pair(list, wrap=false) =
|
|||
|
||||
// Function: triplet()
|
||||
// Usage:
|
||||
// list = triplet(list, <wrap>);
|
||||
// for (t = triplet(list, <wrap>)) ...
|
||||
// list = triplet(list, [wrap]);
|
||||
// for (t = triplet(list, [wrap])) ...
|
||||
// Topics: List Handling, Iteration
|
||||
// See Also: idx(), enumerate(), pair(), combinations(), permutations()
|
||||
// Description:
|
||||
|
@ -1375,8 +1375,8 @@ function triplet(list, wrap=false) =
|
|||
|
||||
// Function: combinations()
|
||||
// Usage:
|
||||
// list = combinations(l, <n>);
|
||||
// for (p = combinations(l, <n>)) ...
|
||||
// list = combinations(l, [n]);
|
||||
// for (p = combinations(l, [n])) ...
|
||||
// Topics: List Handling, Iteration
|
||||
// See Also: idx(), enumerate(), pair(), triplet(), permutations()
|
||||
// Description:
|
||||
|
@ -1401,8 +1401,8 @@ function combinations(l,n=2,_s=0) =
|
|||
|
||||
// Function: permutations()
|
||||
// Usage:
|
||||
// list = permutations(l, <n>);
|
||||
// for (p = permutations(l, <n>)) ...
|
||||
// list = permutations(l, [n]);
|
||||
// for (p = permutations(l, [n])) ...
|
||||
// Topics: List Handling, Iteration
|
||||
// See Also: idx(), enumerate(), pair(), triplet(), combinations()
|
||||
// Description:
|
||||
|
@ -1487,7 +1487,7 @@ function zip_long(a,b,c,fill) =
|
|||
|
||||
// Function: set_union()
|
||||
// Usage:
|
||||
// s = set_union(a, b, <get_indices>);
|
||||
// s = set_union(a, b, [get_indices]);
|
||||
// Topics: Set Handling, List Handling
|
||||
// See Also: set_difference(), set_intersection()
|
||||
// Description:
|
||||
|
@ -1732,7 +1732,7 @@ function block_matrix(M) =
|
|||
|
||||
// Function: diagonal_matrix()
|
||||
// Usage:
|
||||
// mat = diagonal_matrix(diag, <offdiag>);
|
||||
// mat = diagonal_matrix(diag, [offdiag]);
|
||||
// Topics: Matrices, Array Handling
|
||||
// See Also: subindex(), submatrix()
|
||||
// Description:
|
||||
|
@ -1749,7 +1749,7 @@ function diagonal_matrix(diag, offdiag=0) =
|
|||
|
||||
// Function: submatrix_set()
|
||||
// Usage:
|
||||
// mat = submatrix_set(M,A,<m>,<n>);
|
||||
// mat = submatrix_set(M, A, [m], [n]);
|
||||
// Topics: Matrices, Array Handling
|
||||
// See Also: subindex(), submatrix()
|
||||
// Description:
|
||||
|
@ -1777,7 +1777,7 @@ function submatrix_set(M,A,m=0,n=0) =
|
|||
|
||||
// Function: array_group()
|
||||
// Usage:
|
||||
// groups = array_group(v, <cnt>, <dflt>);
|
||||
// groups = array_group(v, [cnt], [dflt]);
|
||||
// Description:
|
||||
// Takes a flat array of values, and groups items in sets of `cnt` length.
|
||||
// The opposite of this is `flatten()`.
|
||||
|
@ -1851,7 +1851,7 @@ function _array_dim_recurse(v) =
|
|||
|
||||
// Function: array_dim()
|
||||
// Usage:
|
||||
// dims = array_dim(v, <depth>);
|
||||
// dims = array_dim(v, [depth]);
|
||||
// Topics: Matrices, Array Handling
|
||||
// Description:
|
||||
// Returns the size of a multi-dimensional array. Returns a list of dimension lengths. The length
|
||||
|
@ -1883,7 +1883,7 @@ function array_dim(v, depth=undef) =
|
|||
|
||||
// Function: transpose()
|
||||
// Usage:
|
||||
// arr = transpose(arr, <reverse>);
|
||||
// arr = transpose(arr, [reverse]);
|
||||
// Topics: Matrices, Array Handling
|
||||
// See Also: submatrix(), block_matrix(), hstack(), flatten()
|
||||
// Description:
|
||||
|
@ -1947,7 +1947,7 @@ function transpose(arr, reverse=false) =
|
|||
|
||||
// Function: is_matrix_symmetric()
|
||||
// Usage:
|
||||
// b = is_matrix_symmetric(A,<eps>)
|
||||
// b = is_matrix_symmetric(A, [eps])
|
||||
// Description:
|
||||
// Returns true if the input matrix is symmetric, meaning it equals its transpose.
|
||||
// Matrix should have numerical entries.
|
||||
|
|
|
@ -87,7 +87,7 @@ $tags_hidden = [];
|
|||
|
||||
// Function: anchorpt()
|
||||
// Usage:
|
||||
// a = anchorpt(name, pos, <orient>, <spin>);
|
||||
// a = anchorpt(name, pos, [orient], [spin]);
|
||||
// Topics: Attachments
|
||||
// See Also: attach_geom(), reorient(), attachable()
|
||||
// Description:
|
||||
|
@ -104,21 +104,21 @@ function anchorpt(name, pos=[0,0,0], orient=UP, spin=0) = [name, pos, orient, sp
|
|||
// Function: attach_geom()
|
||||
//
|
||||
// Usage: Square/Trapezoid Geometry
|
||||
// geom = attach_geom(two_d=true, size=, <size2=>, <shift=>, ...);
|
||||
// geom = attach_geom(two_d=true, size=, [size2=], [shift=], ...);
|
||||
// Usage: Circle/Oval Geometry
|
||||
// geom = attach_geom(two_d=true, r=|d=, ...);
|
||||
// Usage: 2D Path/Polygon Geometry
|
||||
// geom = attach_geom(two_d=true, path=, <extent=>, ...);
|
||||
// geom = attach_geom(two_d=true, path=, [extent=], ...);
|
||||
// Usage: Cubical/Prismoidal Geometry
|
||||
// geom = attach_geom(size=, <size2=>, <shift=>, ...);
|
||||
// geom = attach_geom(size=, [size2=], [shift=], ...);
|
||||
// Usage: Cylindrical Geometry
|
||||
// geom = attach_geom(r=|d=, l=, <axis=>, ...);
|
||||
// geom = attach_geom(r=|d=, l=, [axis=], ...);
|
||||
// Usage: Conical Geometry
|
||||
// geom = attach_geom(r1|d1=, r2=|d2=, l=, <axis=>, ...);
|
||||
// geom = attach_geom(r1|d1=, r2=|d2=, l=, [axis=], ...);
|
||||
// Usage: Spheroid/Ovoid Geometry
|
||||
// geom = attach_geom(r=|d=, ...);
|
||||
// Usage: VNF Geometry
|
||||
// geom = attach_geom(vnf=, <extent=>, ...);
|
||||
// geom = attach_geom(vnf=, [extent=], ...);
|
||||
//
|
||||
// Topics: Attachments
|
||||
// See Also: reorient(), attachable()
|
||||
|
@ -657,29 +657,29 @@ function attachment_is_shown(tags) =
|
|||
// Function: reorient()
|
||||
//
|
||||
// Usage: Square/Trapezoid Geometry
|
||||
// mat = reorient(anchor, spin, <orient>, two_d=true, size=, <size2=>, <shift=>, ...);
|
||||
// pts = reorient(anchor, spin, <orient>, two_d=true, size=, <size2=>, <shift=>, p=, ...);
|
||||
// mat = reorient(anchor, spin, [orient], two_d=true, size=, [size2=], [shift=], ...);
|
||||
// pts = reorient(anchor, spin, [orient], two_d=true, size=, [size2=], [shift=], p=, ...);
|
||||
// Usage: Circle/Oval Geometry
|
||||
// mat = reorient(anchor, spin, <orient>, two_d=true, r=|d=, ...);
|
||||
// pts = reorient(anchor, spin, <orient>, two_d=true, r=|d=, p=, ...);
|
||||
// mat = reorient(anchor, spin, [orient], two_d=true, r=|d=, ...);
|
||||
// pts = reorient(anchor, spin, [orient], two_d=true, r=|d=, p=, ...);
|
||||
// Usage: 2D Path/Polygon Geometry
|
||||
// mat = reorient(anchor, spin, <orient>, two_d=true, path=, <extent=>, ...);
|
||||
// pts = reorient(anchor, spin, <orient>, two_d=true, path=, <extent=>, p=, ...);
|
||||
// mat = reorient(anchor, spin, [orient], two_d=true, path=, [extent=], ...);
|
||||
// pts = reorient(anchor, spin, [orient], two_d=true, path=, [extent=], p=, ...);
|
||||
// Usage: Cubical/Prismoidal Geometry
|
||||
// mat = reorient(anchor, spin, <orient>, size=, <size2=>, <shift=>, ...);
|
||||
// pts = reorient(anchor, spin, <orient>, size=, <size2=>, <shift=>, p=, ...);
|
||||
// mat = reorient(anchor, spin, [orient], size=, [size2=], [shift=], ...);
|
||||
// pts = reorient(anchor, spin, [orient], size=, [size2=], [shift=], p=, ...);
|
||||
// Usage: Cylindrical Geometry
|
||||
// mat = reorient(anchor, spin, <orient>, r=|d=, l=, <axis=>, ...);
|
||||
// pts = reorient(anchor, spin, <orient>, r=|d=, l=, <axis=>, p=, ...);
|
||||
// mat = reorient(anchor, spin, [orient], r=|d=, l=, [axis=], ...);
|
||||
// pts = reorient(anchor, spin, [orient], r=|d=, l=, [axis=], p=, ...);
|
||||
// Usage: Conical Geometry
|
||||
// mat = reorient(anchor, spin, <orient>, r1=|d1=, r2=|d2=, l=, <axis=>, ...);
|
||||
// pts = reorient(anchor, spin, <orient>, r1=|d1=, r2=|d2=, l=, <axis=>, p=, ...);
|
||||
// mat = reorient(anchor, spin, [orient], r1=|d1=, r2=|d2=, l=, [axis=], ...);
|
||||
// pts = reorient(anchor, spin, [orient], r1=|d1=, r2=|d2=, l=, [axis=], p=, ...);
|
||||
// Usage: Spheroid/Ovoid Geometry
|
||||
// mat = reorient(anchor, spin, <orient>, r|d=, ...);
|
||||
// pts = reorient(anchor, spin, <orient>, r|d=, p=, ...);
|
||||
// mat = reorient(anchor, spin, [orient], r|d=, ...);
|
||||
// pts = reorient(anchor, spin, [orient], r|d=, p=, ...);
|
||||
// Usage: VNF Geometry
|
||||
// mat = reorient(anchor, spin, <orient>, vnf, <extent>, ...);
|
||||
// pts = reorient(anchor, spin, <orient>, vnf, <extent>, p=, ...);
|
||||
// mat = reorient(anchor, spin, [orient], vnf, [extent], ...);
|
||||
// pts = reorient(anchor, spin, [orient], vnf, [extent], p=, ...);
|
||||
//
|
||||
// Topics: Attachments
|
||||
// See Also: reorient(), attachable()
|
||||
|
@ -772,21 +772,21 @@ function reorient(
|
|||
// Module: attachable()
|
||||
//
|
||||
// Usage: Square/Trapezoid Geometry
|
||||
// attachable(anchor, spin, two_d=true, size=, <size2=>, <shift=>, ...) {...}
|
||||
// attachable(anchor, spin, two_d=true, size=, [size2=], [shift=], ...) {...}
|
||||
// Usage: Circle/Oval Geometry
|
||||
// attachable(anchor, spin, two_d=true, r=|d=, ...) {...}
|
||||
// Usage: 2D Path/Polygon Geometry
|
||||
// attachable(anchor, spin, two_d=true, path=, <extent=>, ...) {...}
|
||||
// attachable(anchor, spin, two_d=true, path=, [extent=], ...) {...}
|
||||
// Usage: Cubical/Prismoidal Geometry
|
||||
// attachable(anchor, spin, <orient>, size=, <size2=>, <shift=>, ...) {...}
|
||||
// attachable(anchor, spin, [orient], size=, [size2=], [shift=], ...) {...}
|
||||
// Usage: Cylindrical Geometry
|
||||
// attachable(anchor, spin, <orient>, r=|d=, l=, <axis=>, ...) {...}
|
||||
// attachable(anchor, spin, [orient], r=|d=, l=, [axis=], ...) {...}
|
||||
// Usage: Conical Geometry
|
||||
// attachable(anchor, spin, <orient>, r1=|d1=, r2=|d2=, l=, <axis=>, ...) {...}
|
||||
// attachable(anchor, spin, [orient], r1=|d1=, r2=|d2=, l=, [axis=], ...) {...}
|
||||
// Usage: Spheroid/Ovoid Geometry
|
||||
// attachable(anchor, spin, <orient>, r=|d=, ...) {...}
|
||||
// attachable(anchor, spin, [orient], r=|d=, ...) {...}
|
||||
// Usage: VNF Geometry
|
||||
// attachable(anchor, spin, <orient>, vnf=, <extent=>, ...) {...}
|
||||
// attachable(anchor, spin, [orient], vnf=, [extent=], ...) {...}
|
||||
//
|
||||
// Topics: Attachments
|
||||
// See Also: reorient()
|
||||
|
@ -997,7 +997,7 @@ module attachable(
|
|||
// Module: atext()
|
||||
// Topics: Attachments, Text
|
||||
// Usage:
|
||||
// atext(text, <h>, <size>, <font>);
|
||||
// atext(text, [h], [size], [font]);
|
||||
// Description:
|
||||
// Creates a 3D text block that can be attached to other attachable objects.
|
||||
// NOTE: This cannot have children attached to it.
|
||||
|
@ -1117,8 +1117,8 @@ module position(from)
|
|||
|
||||
// Module: attach()
|
||||
// Usage:
|
||||
// attach(from, <overlap=>, <norot=>) {...}
|
||||
// attach(from, to, <overlap=>, <norot=>) {...}
|
||||
// attach(from, [overlap=], [norot=]) {...}
|
||||
// attach(from, to, [overlap=], [norot=]) {...}
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), face_profile(), edge_profile(), corner_profile()
|
||||
// Description:
|
||||
|
@ -1164,7 +1164,7 @@ module attach(from, to, overlap, norot=false)
|
|||
|
||||
// Module: face_profile()
|
||||
// Usage:
|
||||
// face_profile(faces, r|d=, <convexity=>) {...}
|
||||
// face_profile(faces, r|d=, [convexity=]) {...}
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), edge_profile(), corner_profile()
|
||||
// Description:
|
||||
|
@ -1195,7 +1195,7 @@ module face_profile(faces=[], r, d, convexity=10) {
|
|||
|
||||
// Module: edge_profile()
|
||||
// Usage:
|
||||
// edge_profile(<edges>, <except>, <convexity>) {...}
|
||||
// edge_profile([edges], [except], [convexity]) {...}
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), face_profile(), corner_profile()
|
||||
// Description:
|
||||
|
@ -1248,7 +1248,7 @@ module edge_profile(edges=EDGES_ALL, except=[], convexity=10) {
|
|||
|
||||
// Module: corner_profile()
|
||||
// Usage:
|
||||
// corner_profile(<corners>, <except>, <r=|d=>, <convexity=>) {...}
|
||||
// corner_profile([corners], [except], <r=|d=>, [convexity=]) {...}
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), face_profile(), edge_profile()
|
||||
// Description:
|
||||
|
@ -1314,7 +1314,7 @@ module corner_profile(corners=CORNERS_ALL, except=[], r, d, convexity=10) {
|
|||
|
||||
// Module: edge_mask()
|
||||
// Usage:
|
||||
// edge_mask(<edges>, <except>) {...}
|
||||
// edge_mask([edges], [except]) {...}
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), face_profile(), edge_profile(), corner_mask()
|
||||
// Description:
|
||||
|
@ -1368,7 +1368,7 @@ module edge_mask(edges=EDGES_ALL, except=[]) {
|
|||
|
||||
// Module: corner_mask()
|
||||
// Usage:
|
||||
// corner_mask(<corners>, <except>) {...}
|
||||
// corner_mask([corners], [except]) {...}
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), face_profile(), edge_profile(), edge_mask()
|
||||
// Description:
|
||||
|
@ -1502,8 +1502,8 @@ module show(tags="")
|
|||
|
||||
// Module: diff()
|
||||
// Usage:
|
||||
// diff(neg, <keep>) {...}
|
||||
// diff(neg, pos, <keep>) {...}
|
||||
// diff(neg, [keep]) {...}
|
||||
// diff(neg, pos, [keep]) {...}
|
||||
// Topics: Attachments
|
||||
// See Also: tags(), recolor(), show(), hide(), intersect()
|
||||
// Description:
|
||||
|
@ -1564,8 +1564,8 @@ module diff(neg, pos, keep)
|
|||
|
||||
// Module: intersect()
|
||||
// Usage:
|
||||
// intersect(a, <keep=>) {...}
|
||||
// intersect(a, b, <keep=>) {...}
|
||||
// intersect(a, [keep=]) {...}
|
||||
// intersect(a, b, [keep=]) {...}
|
||||
// Topics: Attachments
|
||||
// See Also: tags(), recolor(), show(), hide(), diff()
|
||||
// Description:
|
||||
|
|
62
beziers.scad
62
beziers.scad
|
@ -25,8 +25,8 @@
|
|||
// Topics: Bezier Paths
|
||||
// See Also: bez_tang(), bez_joint(), bez_end()
|
||||
// Usage:
|
||||
// pts = bez_begin(pt, a, r, <p=>);
|
||||
// pts = bez_begin(pt, VECTOR, <r>, <p=>);
|
||||
// pts = bez_begin(pt, a, r, [p=]);
|
||||
// pts = bez_begin(pt, VECTOR, [r], [p=]);
|
||||
// Description:
|
||||
// This is used to create the first endpoint and control point of a cubic bezier path.
|
||||
// Arguments:
|
||||
|
@ -94,8 +94,8 @@ function bez_begin(pt,a,r,p) =
|
|||
// Topics: Bezier Paths
|
||||
// See Also: bez_begin(), bez_joint(), bez_end()
|
||||
// Usage:
|
||||
// pts = bez_tang(pt, a, r1, r2, <p=>);
|
||||
// pts = bez_tang(pt, VECTOR, <r1>, <r2>, <p=>);
|
||||
// pts = bez_tang(pt, a, r1, r2, [p=]);
|
||||
// pts = bez_tang(pt, VECTOR, [r1], [r2], [p=]);
|
||||
// Description:
|
||||
// This creates a smooth joint in a cubic bezier path. It creates three points, being the
|
||||
// approaching control point, the fixed bezier control point, and the departing control
|
||||
|
@ -128,8 +128,8 @@ function bez_tang(pt,a,r1,r2,p) =
|
|||
// Topics: Bezier Paths
|
||||
// See Also: bez_begin(), bez_tang(), bez_end()
|
||||
// Usage:
|
||||
// pts = bez_joint(pt, a1, a2, r1, r2, <p1=>, <p2=>);
|
||||
// pts = bez_joint(pt, VEC1, VEC2, <r1=>, <r2=>, <p1=>, <p2=>);
|
||||
// pts = bez_joint(pt, a1, a2, r1, r2, [p1=], [p2=]);
|
||||
// pts = bez_joint(pt, VEC1, VEC2, [r1=], [r2=], [p1=], [p2=]);
|
||||
// Description:
|
||||
// This creates a disjoint corner joint in a cubic bezier path. It creates three points, being
|
||||
// the aproaching control point, the fixed bezier control point, and the departing control point.
|
||||
|
@ -167,8 +167,8 @@ function bez_joint(pt,a1,a2,r1,r2,p1,p2) =
|
|||
// Topics: Bezier Paths
|
||||
// See Also: bez_tang(), bez_joint(), bez_end()
|
||||
// Usage:
|
||||
// pts = bez_end(pt, a, r, <p=>);
|
||||
// pts = bez_end(pt, VECTOR, <r>, <p=>);
|
||||
// pts = bez_end(pt, a, r, [p=]);
|
||||
// pts = bez_end(pt, VECTOR, [r], [p=]);
|
||||
// Description:
|
||||
// This is used to create the approaching control point, and the endpoint of a cubic bezier path.
|
||||
// See {{bez_begin()}} for examples.
|
||||
|
@ -336,9 +336,9 @@ function _bezier_matrix(N) =
|
|||
|
||||
// Function: bezier_derivative()
|
||||
// Usage:
|
||||
// deriv = bezier_derivative(curve, u, <order>);
|
||||
// derivs = bezier_derivative(curve, LIST, <order>);
|
||||
// derivs = bezier_derivative(curve, RANGE, <order>);
|
||||
// deriv = bezier_derivative(curve, u, [order]);
|
||||
// derivs = bezier_derivative(curve, LIST, [order]);
|
||||
// derivs = bezier_derivative(curve, RANGE, [order]);
|
||||
// Topics: Bezier Segments
|
||||
// See Also: bezier_curvature(), bezier_tangent(), bezier_points()
|
||||
// Description:
|
||||
|
@ -409,7 +409,7 @@ function bezier_curvature(curve, u) =
|
|||
|
||||
// Function: bezier_curve()
|
||||
// Usage:
|
||||
// path = bezier_curve(curve, n, <endpoint>);
|
||||
// path = bezier_curve(curve, n, [endpoint]);
|
||||
// Topics: Bezier Segments
|
||||
// See Also: bezier_curvature(), bezier_tangent(), bezier_derivative(), bezier_points()
|
||||
// Description:
|
||||
|
@ -442,7 +442,7 @@ function bezier_curve(curve,n,endpoint=true) =
|
|||
|
||||
// Function: bezier_segment_closest_point()
|
||||
// Usage:
|
||||
// u = bezier_segment_closest_point(bezier, pt, <max_err>);
|
||||
// u = bezier_segment_closest_point(bezier, pt, [max_err]);
|
||||
// Topics: Bezier Segments
|
||||
// See Also: bezier_points()
|
||||
// Description:
|
||||
|
@ -491,7 +491,7 @@ function bezier_segment_closest_point(curve, pt, max_err=0.01, u=0, end_u=1) =
|
|||
|
||||
// Function: bezier_segment_length()
|
||||
// Usage:
|
||||
// pathlen = bezier_segment_length(curve, <start_u>, <end_u>, <max_deflect>);
|
||||
// pathlen = bezier_segment_length(curve, [start_u], [end_u], [max_deflect]);
|
||||
// Topics: Bezier Segments
|
||||
// See Also: bezier_points()
|
||||
// Description:
|
||||
|
@ -602,9 +602,9 @@ function fillet3pts(p0, p1, p2, r, d, maxerr=0.1, w=0.5, dw=0.25) = let(
|
|||
|
||||
// Function: bezier_path_point()
|
||||
// Usage:
|
||||
// pt = bezier_path_point(path, seg, u, <N>);
|
||||
// ptlist = bezier_path_point(path, seg, LIST, <N>);
|
||||
// path = bezier_path_point(path, seg, RANGE, <N>);
|
||||
// pt = bezier_path_point(path, seg, u, [N]);
|
||||
// ptlist = bezier_path_point(path, seg, LIST, [N]);
|
||||
// path = bezier_path_point(path, seg, RANGE, [N]);
|
||||
// Topics: Bezier Paths
|
||||
// See Also: bezier_points(), bezier_curve()
|
||||
// Description:
|
||||
|
@ -665,7 +665,7 @@ function bezier_path_closest_point(path, pt, N=3, max_err=0.01, seg=0, min_seg=u
|
|||
|
||||
// Function: bezier_path_length()
|
||||
// Usage:
|
||||
// plen = bezier_path_length(path, <N>, <max_deflect>);
|
||||
// plen = bezier_path_length(path, [N], [max_deflect]);
|
||||
// Topics: Bezier Paths
|
||||
// See Also: bezier_points(), bezier_curve(), bezier_segment_length()
|
||||
// Description:
|
||||
|
@ -691,7 +691,7 @@ function bezier_path_length(path, N=3, max_deflect=0.001) =
|
|||
|
||||
// Function: bezier_path()
|
||||
// Usage:
|
||||
// path = bezier_path(bezier, <splinesteps>, <N>, <endpoint>)
|
||||
// path = bezier_path(bezier, [splinesteps], [N], [endpoint])
|
||||
// Topics: Bezier Paths
|
||||
// See Also: bezier_points(), bezier_curve()
|
||||
// Description:
|
||||
|
@ -728,7 +728,7 @@ function bezier_path(bezier, splinesteps=16, N=3, endpoint=true) =
|
|||
|
||||
// Function: path_to_bezier()
|
||||
// Usage:
|
||||
// bezpath = path_to_bezier(path, <closed>, <tangents>, <uniform>, <size=>|<relsize=>);
|
||||
// bezpath = path_to_bezier(path, [closed], [tangents], [uniform], [size=]|[relsize=]);
|
||||
// Topics: Bezier Paths, Rounding
|
||||
// See Also: path_tangents(), fillet_path()
|
||||
// Description:
|
||||
|
@ -810,7 +810,7 @@ function path_to_bezier(path, closed=false, tangents, uniform=false, size, relsi
|
|||
|
||||
// Function: fillet_path()
|
||||
// Usage:
|
||||
// bezpath = fillet_path(pts, fillet, <maxerr>);
|
||||
// bezpath = fillet_path(pts, fillet, [maxerr]);
|
||||
// Topics: Bezier Paths, Rounding
|
||||
// See Also: path_to_bezier(), bezier_path()
|
||||
// Description:
|
||||
|
@ -839,7 +839,7 @@ function fillet_path(pts, fillet, maxerr=0.1) = concat(
|
|||
|
||||
// Function: bezier_close_to_axis()
|
||||
// Usage:
|
||||
// bezpath = bezier_close_to_axis(bezier, <axis>, <N>);
|
||||
// bezpath = bezier_close_to_axis(bezier, [axis], [N]);
|
||||
// Topics: Bezier Paths
|
||||
// See Also: bezier_offset()
|
||||
// Description:
|
||||
|
@ -880,7 +880,7 @@ function bezier_close_to_axis(bezier, axis="X", N=3) =
|
|||
|
||||
// Function: bezier_offset()
|
||||
// Usage:
|
||||
// bezpath = bezier_offset(offset, bezier, <N>);
|
||||
// bezpath = bezier_offset(offset, bezier, [N]);
|
||||
// Topics: Bezier Paths
|
||||
// See Also: bezier_close_to_axis()
|
||||
// Description:
|
||||
|
@ -919,7 +919,7 @@ function bezier_offset(offset, bezier, N=3) =
|
|||
|
||||
// Module: bezier_polygon()
|
||||
// Usage:
|
||||
// bezier_polygon(bezier, <splinesteps>, <N>);
|
||||
// bezier_polygon(bezier, [splinesteps], [N]);
|
||||
// Topics: Bezier Paths
|
||||
// See Also: bezier_path()
|
||||
// Description:
|
||||
|
@ -951,7 +951,7 @@ module bezier_polygon(bezier, splinesteps=16, N=3) {
|
|||
|
||||
// Module: trace_bezier()
|
||||
// Usage:
|
||||
// trace_bezier(bez, <size>, <N=>);
|
||||
// trace_bezier(bez, [size], [N=]);
|
||||
// Topics: Bezier Paths, Debugging
|
||||
// See Also: bezier_path()
|
||||
// Description:
|
||||
|
@ -1105,7 +1105,7 @@ function is_patch(x) =
|
|||
|
||||
// Function: bezier_patch()
|
||||
// Usage:
|
||||
// vnf = bezier_patch(patch, <splinesteps>, <vnf=>, <style=>);
|
||||
// vnf = bezier_patch(patch, [splinesteps], [vnf=], [style=]);
|
||||
// Topics: Bezier Patches
|
||||
// See Also: bezier_points(), bezier_curve(), bezier_path(), bezier_patch_points(), bezier_triangle_point()
|
||||
// Description:
|
||||
|
@ -1225,8 +1225,8 @@ function bezier_patch(patch, splinesteps=16, vnf=EMPTY_VNF, style="default") =
|
|||
|
||||
// Function: bezier_patch_degenerate()
|
||||
// Usage:
|
||||
// vnf = bezier_patch_degenerate(patch, <splinesteps>, <reverse>);
|
||||
// vnf_edges = bezier_patch_degenerate(patch, <splinesteps>, <reverse>, return_edges=true);
|
||||
// vnf = bezier_patch_degenerate(patch, [splinesteps], [reverse]);
|
||||
// vnf_edges = bezier_patch_degenerate(patch, [splinesteps], [reverse], return_edges=true);
|
||||
// Description:
|
||||
// Returns a VNF for a degenerate rectangular bezier patch where some of the corners of the patch are
|
||||
// equal. If the resulting patch has no faces then returns an empty VNF. Note that due to the degeneracy,
|
||||
|
@ -1442,7 +1442,7 @@ function _bezier_triangle(tri, splinesteps=16, vnf=EMPTY_VNF) =
|
|||
|
||||
// Function: bezier_patch_flat()
|
||||
// Usage:
|
||||
// patch = bezier_patch_flat(size, <N=>, <spin=>, <orient=>, <trans=>);
|
||||
// patch = bezier_patch_flat(size, [N=], [spin=], [orient=], [trans=]);
|
||||
// Topics: Bezier Patches
|
||||
// See Also: bezier_patch_points()
|
||||
// Description:
|
||||
|
@ -1487,7 +1487,7 @@ function patch_reverse(patch) =
|
|||
|
||||
// Function: bezier_surface()
|
||||
// Usage:
|
||||
// vnf = bezier_surface(patches, <splinesteps>, <vnf=>, <style=>);
|
||||
// vnf = bezier_surface(patches, [splinesteps], [vnf=], [style=]);
|
||||
// Topics: Bezier Patches
|
||||
// See Also: bezier_patch_points(), bezier_patch_flat()
|
||||
// Description:
|
||||
|
@ -1530,7 +1530,7 @@ function bezier_surface(patches=[], splinesteps=16, vnf=EMPTY_VNF, style="defaul
|
|||
|
||||
// Module: trace_bezier_patches()
|
||||
// Usage:
|
||||
// trace_bezier_patches(patches, <size=>, <splinesteps=>, <showcps=>, <showdots=>, <showpatch=>, <convexity=>, <style=>);
|
||||
// trace_bezier_patches(patches, [size=], [splinesteps=], [showcps=], [showdots=], [showpatch=], [convexity=], [style=]);
|
||||
// Topics: Bezier Patches, Debugging
|
||||
// See Also: bezier_patch_points(), bezier_patch_flat(), bezier_surface()
|
||||
// Description:
|
||||
|
|
|
@ -16,7 +16,7 @@ include <knurling.scad>
|
|||
|
||||
// Module: pco1810_neck()
|
||||
// Usage:
|
||||
// pco1810_neck(<wall>)
|
||||
// pco1810_neck([wall])
|
||||
// Description:
|
||||
// Creates an approximation of a standard PCO-1810 threaded beverage bottle neck.
|
||||
// Arguments:
|
||||
|
@ -137,7 +137,7 @@ function pco1810_neck(wall=2, anchor="support-ring", spin=0, orient=UP) =
|
|||
|
||||
// Module: pco1810_cap()
|
||||
// Usage:
|
||||
// pco1810_cap(<wall>, <texture>);
|
||||
// pco1810_cap([wall], [texture]);
|
||||
// Description:
|
||||
// Creates a basic cap for a PCO1810 threaded beverage bottle.
|
||||
// Arguments:
|
||||
|
@ -208,7 +208,7 @@ function pco1810_cap(wall=2, texture="none", anchor=BOTTOM, spin=0, orient=UP) =
|
|||
|
||||
// Module: pco1881_neck()
|
||||
// Usage:
|
||||
// pco1881_neck(<wall>)
|
||||
// pco1881_neck([wall])
|
||||
// Description:
|
||||
// Creates an approximation of a standard PCO-1881 threaded beverage bottle neck.
|
||||
// Arguments:
|
||||
|
@ -329,7 +329,7 @@ function pco1881_neck(wall=2, anchor="support-ring", spin=0, orient=UP) =
|
|||
|
||||
// Module: pco1881_cap()
|
||||
// Usage:
|
||||
// pco1881_cap(wall, <texture>);
|
||||
// pco1881_cap(wall, [texture]);
|
||||
// Description:
|
||||
// Creates a basic cap for a PCO1881 threaded beverage bottle.
|
||||
// Arguments:
|
||||
|
@ -391,7 +391,7 @@ function pco1881_cap(wall=2, texture="none", anchor=BOTTOM, spin=0, orient=UP) =
|
|||
|
||||
// Module: generic_bottle_neck()
|
||||
// Usage:
|
||||
// generic_bottle_neck(<wall>, ...)
|
||||
// generic_bottle_neck([wall], ...)
|
||||
// Description:
|
||||
// Creates a bottle neck given specifications.
|
||||
// Arguments:
|
||||
|
@ -516,7 +516,7 @@ function generic_bottle_neck(
|
|||
|
||||
// Module: generic_bottle_cap()
|
||||
// Usage:
|
||||
// generic_bottle_cap(wall, <texture>, ...);
|
||||
// generic_bottle_cap(wall, [texture], ...);
|
||||
// Description:
|
||||
// Creates a basic threaded cap given specifications.
|
||||
// Arguments:
|
||||
|
@ -605,7 +605,7 @@ function generic_bottle_cap(
|
|||
|
||||
// Module: bottle_adapter_neck_to_cap()
|
||||
// Usage:
|
||||
// bottle_adapter_neck_to_cap(wall, <texture>);
|
||||
// bottle_adapter_neck_to_cap(wall, [texture]);
|
||||
// Description:
|
||||
// Creates a threaded neck to cap adapter
|
||||
// Arguments:
|
||||
|
@ -718,7 +718,7 @@ function bottle_adapter_neck_to_cap(
|
|||
|
||||
// Module: bottle_adapter_cap_to_cap()
|
||||
// Usage:
|
||||
// bottle_adapter_cap_to_cap(wall, <texture>);
|
||||
// bottle_adapter_cap_to_cap(wall, [texture]);
|
||||
// Description:
|
||||
// Creates a threaded cap to cap adapter.
|
||||
// Arguments:
|
||||
|
|
24
common.scad
24
common.scad
|
@ -200,7 +200,7 @@ function is_func(x) = version_num()>20210000 && is_function(x);
|
|||
|
||||
// Function: is_consistent()
|
||||
// Usage:
|
||||
// bool = is_consistent(list, <pattern>);
|
||||
// bool = is_consistent(list, [pattern]);
|
||||
// Topics: Type Checking
|
||||
// See Also: typeof(), is_type(), is_str(), is_def(), is_int(), is_range(), is_homogeneous()
|
||||
// Description:
|
||||
|
@ -254,7 +254,7 @@ function same_shape(a,b) = is_def(b) && _list_pattern(a) == b*0;
|
|||
|
||||
// Function: is_bool_list()
|
||||
// Usage:
|
||||
// check = is_bool_list(list,<length>)
|
||||
// check = is_bool_list(list,[length])
|
||||
// Topics: Type Checking
|
||||
// See Also: is_homogeneous(), is_consistent()
|
||||
// Description:
|
||||
|
@ -285,7 +285,7 @@ function default(v,dflt=undef) = is_undef(v)? dflt : v;
|
|||
|
||||
// Function: first_defined()
|
||||
// Usage:
|
||||
// val = first_defined(v, <recursive>);
|
||||
// val = first_defined(v, [recursive]);
|
||||
// Topics: Undef Handling
|
||||
// See Also: default(), one_defined(), num_defined(), any_defined(), all_defined()
|
||||
// Description:
|
||||
|
@ -308,7 +308,7 @@ function first_defined(v,recursive=false,_i=0) =
|
|||
|
||||
// Function: one_defined()
|
||||
// Usage:
|
||||
// val = one_defined(vals, names, <dflt>)
|
||||
// val = one_defined(vals, names, [dflt])
|
||||
// Topics: Undef Handling
|
||||
// See Also: default(), first_defined(), num_defined(), any_defined(), all_defined()
|
||||
// Description:
|
||||
|
@ -361,7 +361,7 @@ function num_defined(v) =
|
|||
|
||||
// Function: any_defined()
|
||||
// Usage:
|
||||
// bool = any_defined(v, <recursive>);
|
||||
// bool = any_defined(v, [recursive]);
|
||||
// Topics: Undef Handling
|
||||
// See Also: default(), first_defined(), one_defined(), num_defined(), all_defined()
|
||||
// Description:
|
||||
|
@ -382,7 +382,7 @@ function any_defined(v,recursive=false) =
|
|||
|
||||
// Function: all_defined()
|
||||
// Usage:
|
||||
// bool = all_defined(v, <recursive>);
|
||||
// bool = all_defined(v, [recursive]);
|
||||
// Description:
|
||||
// Returns true if all items in the given array are not `undef`.
|
||||
// Arguments:
|
||||
|
@ -405,7 +405,7 @@ function all_defined(v,recursive=false) =
|
|||
|
||||
// Function: get_anchor()
|
||||
// Usage:
|
||||
// anchr = get_anchor(anchor,center,<uncentered>,<dflt>);
|
||||
// anchr = get_anchor(anchor,center,[uncentered],[dflt]);
|
||||
// Topics: Argument Handling
|
||||
// See Also: get_radius()
|
||||
// Description:
|
||||
|
@ -435,7 +435,7 @@ function get_anchor(anchor,center,uncentered=BOT,dflt=CENTER) =
|
|||
|
||||
// Function: get_radius()
|
||||
// Usage:
|
||||
// r = get_radius(<r1=>, <r2=>, <r=>, <d1=>, <d2=>, <d=>, <dflt=>);
|
||||
// r = get_radius([r1=], [r2=], [r=], [d1=], [d2=], [d=], [dflt=]);
|
||||
// Topics: Argument Handling
|
||||
// See Also: get_anchor()
|
||||
// Description:
|
||||
|
@ -484,7 +484,7 @@ function get_radius(r1, r2, r, d1, d2, d, dflt) =
|
|||
|
||||
// Function: scalar_vec3()
|
||||
// Usage:
|
||||
// vec = scalar_vec3(v, <dflt>);
|
||||
// vec = scalar_vec3(v, [dflt]);
|
||||
// Topics: Argument Handling
|
||||
// See Also: get_anchor(), get_radius(), force_list()
|
||||
// Description:
|
||||
|
@ -583,7 +583,7 @@ function _valstr(x) =
|
|||
|
||||
// Module: assert_approx()
|
||||
// Usage:
|
||||
// assert_approx(got, expected, <info>);
|
||||
// assert_approx(got, expected, [info]);
|
||||
// Topics: Error Checking, Debugging
|
||||
// See Also: no_children(), no_function(), no_module(), assert_equal()
|
||||
// Description:
|
||||
|
@ -615,7 +615,7 @@ module assert_approx(got, expected, info) {
|
|||
|
||||
// Module: assert_equal()
|
||||
// Usage:
|
||||
// assert_equal(got, expected, <info>);
|
||||
// assert_equal(got, expected, [info]);
|
||||
// Topics: Error Checking, Debugging
|
||||
// See Also: no_children(), no_function(), no_module(), assert_approx()
|
||||
// Description:
|
||||
|
@ -646,7 +646,7 @@ module assert_equal(got, expected, info) {
|
|||
|
||||
// Module: shape_compare()
|
||||
// Usage:
|
||||
// shape_compare(<eps>) {test_shape(); expected_shape();}
|
||||
// shape_compare([eps]) {test_shape(); expected_shape();}
|
||||
// Topics: Error Checking, Debugging, Testing
|
||||
// See Also: assert_approx(), assert_equal()
|
||||
// Description:
|
||||
|
|
10
coords.scad
10
coords.scad
|
@ -10,7 +10,7 @@
|
|||
|
||||
// Function: point2d()
|
||||
// Usage:
|
||||
// pt = point2d(p, <fill>);
|
||||
// pt = point2d(p, [fill]);
|
||||
// Topics: Coordinates, Points
|
||||
// See Also: path2d(), point3d(), path3d()
|
||||
// Description:
|
||||
|
@ -41,7 +41,7 @@ function path2d(points) =
|
|||
|
||||
// Function: point3d()
|
||||
// Usage:
|
||||
// pt = point3d(p, <fill>);
|
||||
// pt = point3d(p, [fill]);
|
||||
// Topics: Coordinates, Points
|
||||
// See Also: path2d(), point2d(), path3d()
|
||||
// Description:
|
||||
|
@ -54,7 +54,7 @@ function point3d(p, fill=0) = [for (i=[0:2]) (p[i]==undef)? fill : p[i]];
|
|||
|
||||
// Function: path3d()
|
||||
// Usage:
|
||||
// pts = path3d(points, <fill>);
|
||||
// pts = path3d(points, [fill]);
|
||||
// Topics: Coordinates, Points, Paths
|
||||
// See Also: point2d(), path2d(), point3d()
|
||||
// Description:
|
||||
|
@ -78,7 +78,7 @@ function path3d(points, fill=0) =
|
|||
|
||||
// Function: point4d()
|
||||
// Usage:
|
||||
// pt = point4d(p, <fill>);
|
||||
// pt = point4d(p, [fill]);
|
||||
// Topics: Coordinates, Points
|
||||
// See Also: point2d(), path2d(), point3d(), path3d(), path4d()
|
||||
// Description:
|
||||
|
@ -91,7 +91,7 @@ function point4d(p, fill=0) = [for (i=[0:3]) (p[i]==undef)? fill : p[i]];
|
|||
|
||||
// Function: path4d()
|
||||
// Usage:
|
||||
// pt = path4d(points, <fill>);
|
||||
// pt = path4d(points, [fill]);
|
||||
// Topics: Coordinates, Points, Paths
|
||||
// See Also: point2d(), path2d(), point3d(), path3d(), point4d()
|
||||
// Description:
|
||||
|
|
|
@ -16,7 +16,7 @@ $cubetruss_clip_thickness = 1.6;
|
|||
|
||||
// Function: cubetruss_dist()
|
||||
// Usage:
|
||||
// cubetruss_dist(cubes, gaps, <size>, <strut>);
|
||||
// cubetruss_dist(cubes, gaps, [size], [strut]);
|
||||
// Description:
|
||||
// Function to calculate the length of a cubetruss truss.
|
||||
// Arguments:
|
||||
|
@ -34,7 +34,7 @@ function cubetruss_dist(cubes=0, gaps=0, size, strut) =
|
|||
|
||||
// Module: cubetruss_segment()
|
||||
// Usage:
|
||||
// cubetruss_segment(<size>, <strut>, <bracing>);
|
||||
// cubetruss_segment([size], [strut], [bracing]);
|
||||
// Description:
|
||||
// Creates a single cubetruss cube segment.
|
||||
// Arguments:
|
||||
|
@ -103,7 +103,7 @@ module cubetruss_segment(size, strut, bracing, anchor=CENTER, spin=0, orient=UP)
|
|||
|
||||
// Module: cubetruss_support()
|
||||
// Usage:
|
||||
// cubetruss_support(<size>, <strut>);
|
||||
// cubetruss_support([size], [strut]);
|
||||
// Description:
|
||||
// Creates a single cubetruss support.
|
||||
// Arguments:
|
||||
|
@ -163,7 +163,7 @@ module cubetruss_support(size, strut, extents=1, anchor=CENTER, spin=0, orient=U
|
|||
|
||||
// Module: cubetruss_clip()
|
||||
// Usage:
|
||||
// cubetruss_clip(extents, <size>, <strut>, <clipthick>);
|
||||
// cubetruss_clip(extents, [size], [strut], [clipthick]);
|
||||
// Description:
|
||||
// Creates a pair of clips to add onto the end of a truss.
|
||||
// Arguments:
|
||||
|
@ -227,7 +227,7 @@ module cubetruss_clip(extents=1, size, strut, clipthick, anchor=CENTER, spin=0,
|
|||
|
||||
// Module: cubetruss_foot()
|
||||
// Usage:
|
||||
// cubetruss_foot(w, <size>, <strut>, <clipthick>);
|
||||
// cubetruss_foot(w, [size], [strut], [clipthick]);
|
||||
// Description:
|
||||
// Creates a foot that can be clipped onto the bottom of a truss for support.
|
||||
// Arguments:
|
||||
|
@ -303,7 +303,7 @@ module cubetruss_foot(w=1, size, strut, clipthick, anchor=CENTER, spin=0, orient
|
|||
|
||||
// Module: cubetruss_joiner()
|
||||
// Usage:
|
||||
// cubetruss_joiner(<w>, <vert>, <size>, <strut>, <clipthick>);
|
||||
// cubetruss_joiner([w], [vert], [size], [strut], [clipthick]);
|
||||
// Description:
|
||||
// Creates a part to join two cubetruss trusses end-to-end.
|
||||
// Arguments:
|
||||
|
@ -370,7 +370,7 @@ module cubetruss_joiner(w=1, vert=true, size, strut, clipthick, anchor=CENTER, s
|
|||
|
||||
// Module: cubetruss_uclip()
|
||||
// Usage:
|
||||
// cubetruss_uclip(dual, <size>, <strut>, <clipthick>);
|
||||
// cubetruss_uclip(dual, [size], [strut], [clipthick]);
|
||||
// Description:
|
||||
// Creates a small clip that can snap around one or two adjacent struts.
|
||||
// Arguments:
|
||||
|
@ -415,7 +415,7 @@ module cubetruss_uclip(dual=true, size, strut, clipthick, anchor=CENTER, spin=0,
|
|||
|
||||
// Module: cubetruss()
|
||||
// Usage:
|
||||
// cubetruss(extents, <clips>, <bracing>, <size>, <strut>, <clipthick>);
|
||||
// cubetruss(extents, [clips], [bracing], [size], [strut], [clipthick]);
|
||||
// Description:
|
||||
// Creates a cubetruss truss, assembled out of one or more cubical segments.
|
||||
// Arguments:
|
||||
|
@ -485,7 +485,7 @@ module cubetruss(extents=6, clips=[], bracing, size, strut, clipthick, anchor=CE
|
|||
|
||||
// Module: cubetruss_corner()
|
||||
// Usage:
|
||||
// cubetruss_corner(h, extents, <bracing>, <size>, <strut>, <clipthick>);
|
||||
// cubetruss_corner(h, extents, [bracing], [size], [strut], [clipthick]);
|
||||
// Description:
|
||||
// Creates a corner cubetruss with extents jutting out in one or more directions.
|
||||
// Arguments:
|
||||
|
|
28
debug.scad
28
debug.scad
|
@ -10,7 +10,7 @@
|
|||
|
||||
// Module: trace_path()
|
||||
// Usage:
|
||||
// trace_path(path, <closed=>, <showpts=>, <N=>, <size=>, <color=>);
|
||||
// trace_path(path, [closed=], [showpts=], [N=], [size=], [color=]);
|
||||
// Description:
|
||||
// Renders lines between each point of a path.
|
||||
// Can also optionally show the individual vertex points.
|
||||
|
@ -58,7 +58,7 @@ module trace_path(path, closed=false, showpts=false, N=1, size=1, color="yellow"
|
|||
|
||||
// Module: debug_polygon()
|
||||
// Usage:
|
||||
// debug_polygon(points, paths, <convexity=>, <size=>);
|
||||
// debug_polygon(points, paths, [convexity=], [size=]);
|
||||
// Description:
|
||||
// A drop-in replacement for `polygon()` that renders and labels the path points.
|
||||
// Arguments:
|
||||
|
@ -129,7 +129,7 @@ module debug_polygon(points, paths, convexity=2, size=1)
|
|||
|
||||
// Module: debug_vertices()
|
||||
// Usage:
|
||||
// debug_vertices(vertices, <size>, <disabled=>);
|
||||
// debug_vertices(vertices, [size], [disabled=]);
|
||||
// Description:
|
||||
// Draws all the vertices in an array, at their 3D position, numbered by their
|
||||
// position in the vertex array. Also draws any children of this module with
|
||||
|
@ -177,7 +177,7 @@ module debug_vertices(vertices, size=1, disabled=false) {
|
|||
|
||||
// Module: debug_faces()
|
||||
// Usage:
|
||||
// debug_faces(vertices, faces, <size=>, <disabled=>);
|
||||
// debug_faces(vertices, faces, [size=], [disabled=]);
|
||||
// Description:
|
||||
// Draws all the vertices at their 3D position, numbered in blue by their
|
||||
// position in the vertex array. Each face will have their face number drawn
|
||||
|
@ -243,7 +243,7 @@ module debug_faces(vertices, faces, size=1, disabled=false) {
|
|||
|
||||
// Module: debug_vnf()
|
||||
// Usage:
|
||||
// debug_vnf(vnfs, <convexity=>, <txtsize=>, <disabled=>);
|
||||
// debug_vnf(vnfs, [convexity=], [txtsize=], [disabled=]);
|
||||
// Description:
|
||||
// A drop-in module to replace `vnf_polyhedron()` and help debug vertices and faces.
|
||||
// Draws all the vertices at their 3D position, numbered in blue by their
|
||||
|
@ -270,7 +270,7 @@ module debug_vnf(vnf, convexity=6, txtsize=1, disabled=false) {
|
|||
|
||||
// Function: standard_anchors()
|
||||
// Usage:
|
||||
// anchs = standard_anchors(<two_d>);
|
||||
// anchs = standard_anchors([two_d]);
|
||||
// Description:
|
||||
// Return the vectors for all standard anchors.
|
||||
// Arguments:
|
||||
|
@ -291,7 +291,7 @@ function standard_anchors(two_d=false) = [
|
|||
|
||||
// Module: anchor_arrow()
|
||||
// Usage:
|
||||
// anchor_arrow(<s>, <color>, <flag>);
|
||||
// anchor_arrow([s], [color], [flag]);
|
||||
// Description:
|
||||
// Show an anchor orientation arrow. By default, tagged with the name "anchor-arrow".
|
||||
// Arguments:
|
||||
|
@ -320,7 +320,7 @@ module anchor_arrow(s=10, color=[0.333,0.333,1], flag=true, $tags="anchor-arrow"
|
|||
|
||||
// Module: anchor_arrow2d()
|
||||
// Usage:
|
||||
// anchor_arrow2d(<s>, <color>, <flag>);
|
||||
// anchor_arrow2d([s], [color], [flag]);
|
||||
// Description:
|
||||
// Show an anchor orientation arrow.
|
||||
// Arguments:
|
||||
|
@ -354,7 +354,7 @@ module expose_anchors(opacity=0.2) {
|
|||
|
||||
// Module: show_anchors()
|
||||
// Usage:
|
||||
// ... show_anchors(<s>, <std=>, <custom=>);
|
||||
// ... show_anchors([s], [std=], [custom=]);
|
||||
// Description:
|
||||
// Show all standard anchors for the parent object.
|
||||
// Arguments:
|
||||
|
@ -436,7 +436,7 @@ module frame_ref(s=15, opacity=1) {
|
|||
|
||||
// Module: ruler()
|
||||
// Usage:
|
||||
// ruler(length, width, <thickness=>, <depth=>, <labels=>, <pipscale=>, <maxscale=>, <colors=>, <alpha=>, <unit=>, <inch=>);
|
||||
// ruler(length, width, [thickness=], [depth=], [labels=], [pipscale=], [maxscale=], [colors=], [alpha=], [unit=], [inch=]);
|
||||
// Description:
|
||||
// Creates a ruler for checking dimensions of the model
|
||||
// Arguments:
|
||||
|
@ -527,7 +527,7 @@ module ruler(length=100, width, thickness=1, depth=3, labels=false, pipscale=1/3
|
|||
|
||||
// Function: mod_indent()
|
||||
// Usage:
|
||||
// str = mod_indent(<indent>);
|
||||
// str = mod_indent([indent]);
|
||||
// Description:
|
||||
// Returns a string that is the total indentation for the module level you are at.
|
||||
// Arguments:
|
||||
|
@ -540,7 +540,7 @@ function mod_indent(indent=" ") =
|
|||
|
||||
// Function: mod_trace()
|
||||
// Usage:
|
||||
// str = mod_trace(<levs>, <indent=>, <modsep=>);
|
||||
// str = mod_trace([levs], [indent=], [modsep=]);
|
||||
// Description:
|
||||
// Returns a string that shows the current module and its parents, indented for each unprinted parent module.
|
||||
// Arguments:
|
||||
|
@ -559,8 +559,8 @@ function mod_trace(levs=2, indent=" ", modsep="->") =
|
|||
|
||||
// Function&Module: echo_matrix()
|
||||
// Usage:
|
||||
// echo_matrix(M, <description=>, <sig=>, <eps=>);
|
||||
// dummy = echo_matrix(M, <description=>, <sig=>, <eps=>),
|
||||
// echo_matrix(M, [description=], [sig=], [eps=]);
|
||||
// dummy = echo_matrix(M, [description=], [sig=], [eps=]),
|
||||
// Description:
|
||||
// Display a numerical matrix in a readable columnar format with `sig` significant
|
||||
// digits. Values smaller than eps display as zero. If you give a description
|
||||
|
|
|
@ -43,21 +43,21 @@ module move_copies(a=[[0,0,0]])
|
|||
// Function&Module: line_of()
|
||||
//
|
||||
// Usage: Spread `n` copies by a given spacing
|
||||
// line_of(spacing, <n>, <p1=>) ...
|
||||
// line_of(spacing, [n], [p1=]) ...
|
||||
// Usage: Spread copies every given spacing along the line
|
||||
// line_of(spacing, <l=>, <p1=>) ...
|
||||
// line_of(spacing, [l=], [p1=]) ...
|
||||
// Usage: Spread `n` copies along the length of the line
|
||||
// line_of(<n=>, <l=>, <p1=>) ...
|
||||
// line_of([n=], [l=], [p1=]) ...
|
||||
// Usage: Spread `n` copies along the line from `p1` to `p2`
|
||||
// line_of(<n=>, <p1=>, <p2=>) ...
|
||||
// line_of([n=], [p1=], [p2=]) ...
|
||||
// Usage: Spread copies every given spacing, centered along the line from `p1` to `p2`
|
||||
// line_of(<spacing>, <p1=>, <p2=>) ...
|
||||
// line_of([spacing], [p1=], [p2=]) ...
|
||||
// Usage: As a function
|
||||
// pts = line_of(<spacing>, <n>, <p1=>);
|
||||
// pts = line_of(<spacing>, <l=>, <p1=>);
|
||||
// pts = line_of(<n=>, <l=>, <p1=>);
|
||||
// pts = line_of(<n=>, <p1=>, <p2=>);
|
||||
// pts = line_of(<spacing>, <p1=>, <p2=>);
|
||||
// pts = line_of([spacing], [n], [p1=]);
|
||||
// pts = line_of([spacing], [l=], [p1=]);
|
||||
// pts = line_of([n=], [l=], [p1=]);
|
||||
// pts = line_of([n=], [p1=], [p2=]);
|
||||
// pts = line_of([spacing], [p1=], [p2=]);
|
||||
// Description:
|
||||
// When called as a function, returns a list of points at evenly spread positions along a line.
|
||||
// When called as a module, copies `children()` at one or more evenly spread positions along a line.
|
||||
|
|
|
@ -295,7 +295,7 @@ function edges(v, except=[]) =
|
|||
// Module: show_edges()
|
||||
// Topics: Edges, Debugging
|
||||
// Usage:
|
||||
// show_edges(edges, <size=>, <text=>, <txtsize=>);
|
||||
// show_edges(edges, [size=], [text=], [txtsize=]);
|
||||
// Description:
|
||||
// Draws a semi-transparent cube with the given edges highlighted in red.
|
||||
// Arguments:
|
||||
|
@ -555,7 +555,7 @@ function _corners_text(corners) =
|
|||
// Module: show_corners()
|
||||
// Topics: Corners, Debugging
|
||||
// Usage:
|
||||
// show_corners(corners, <size=>, <text=>, <txtsize=>);
|
||||
// show_corners(corners, [size=], [text=], [txtsize=]);
|
||||
// Description:
|
||||
// Draws a semi-transparent cube with the given corners highlighted in red.
|
||||
// Arguments:
|
||||
|
|
|
@ -77,7 +77,7 @@ function filter(func, list) =
|
|||
// Function: reduce()
|
||||
// Topics: Function Literals, Looping
|
||||
// Usage:
|
||||
// res = reduce(func, list, <init>);
|
||||
// res = reduce(func, list, [init]);
|
||||
// res = reduce(function (a,b) a+b, list, <init=);
|
||||
// Description:
|
||||
// First the accumulator is set to the value in `init`. Then, for each item in `list`, the function
|
||||
|
@ -119,8 +119,8 @@ function reduce(func, list, init=0) =
|
|||
// Function: accumulate()
|
||||
// Topics: Function Literals, Looping
|
||||
// Usage:
|
||||
// res = accumulate(func, list, <init>);
|
||||
// res = accumulate(function (a,b) a+b, list, <init=>);
|
||||
// res = accumulate(func, list, [init]);
|
||||
// res = accumulate(function (a,b) a+b, list, [init=]);
|
||||
// Description:
|
||||
// First the accumulator is set to the value in `init`. Then, for each item in `list`, the function
|
||||
// in `func` is called with the accumulator and that list item, and the result is stored in the
|
||||
|
@ -234,7 +234,7 @@ function for_n(n,init,func) =
|
|||
// Function: find_first()
|
||||
// Topics: Function Literals, Searching
|
||||
// Usage:
|
||||
// idx = find_first(val, list, <start=>, <func=>);
|
||||
// idx = find_first(val, list, [start=], [func=]);
|
||||
// Description:
|
||||
// Finds the first item in `list` which, when compared against `val` using the function literal
|
||||
// `func` gets a true result. By default, `func` just calls `approx()`. The signature of the
|
||||
|
@ -265,7 +265,7 @@ function find_first(val, list, start=0, func=f_approx()) =
|
|||
// Function: binsearch()
|
||||
// Topics: Function Literals, Data Structures, Searching
|
||||
// Usage:
|
||||
// idx = binsearch(key,list, <cmp>);
|
||||
// idx = binsearch(key,list, [cmp]);
|
||||
// Description:
|
||||
// Searches a sorted list for an entry with the given key, using a binary search strategy.
|
||||
// Returns the index of the matching item found. If none found, returns undef.
|
||||
|
@ -326,9 +326,9 @@ function simple_hash(x) =
|
|||
// Function: hashmap()
|
||||
// Topics: Function Literals, Data Structures, Hashing
|
||||
// Usage: Creating an Empty HashMap.
|
||||
// hm = hashmap(<hashsize=>);
|
||||
// hm = hashmap([hashsize=]);
|
||||
// Usage: Creating a Populated HashMap.
|
||||
// hm = hashmap(items=KEYVAL_LIST, <hashsize=>);
|
||||
// hm = hashmap(items=KEYVAL_LIST, [hashsize=]);
|
||||
// Usage: Adding an Entry
|
||||
// hm2 = hm(key, val);
|
||||
// Usage: Adding Multiple Entries
|
||||
|
|
52
gears.scad
52
gears.scad
|
@ -115,7 +115,7 @@ function adendum(pitch=5, mod) =
|
|||
|
||||
// Function: dedendum()
|
||||
// Usage:
|
||||
// ddn = dedendum(pitch|mod, <clearance>);
|
||||
// ddn = dedendum(pitch|mod, [clearance]);
|
||||
// Topics: Gears
|
||||
// Description:
|
||||
// The depth of the gear tooth valley, below the pitch radius.
|
||||
|
@ -167,7 +167,7 @@ function pitch_radius(pitch=5, teeth=11, mod) =
|
|||
|
||||
// Function: outer_radius()
|
||||
// Usage:
|
||||
// or = outer_radius(pitch|mod, teeth, <clearance>, <interior>);
|
||||
// or = outer_radius(pitch|mod, teeth, [clearance], [interior]);
|
||||
// Topics: Gears
|
||||
// Description:
|
||||
// Calculates the outer radius for the gear. The gear fits entirely within a cylinder of this radius.
|
||||
|
@ -193,7 +193,7 @@ function outer_radius(pitch=5, teeth=11, clearance, interior=false, mod) =
|
|||
|
||||
// Function: root_radius()
|
||||
// Usage:
|
||||
// rr = root_radius(pitch|mod, teeth, <clearance>, <interior>);
|
||||
// rr = root_radius(pitch|mod, teeth, [clearance], [interior]);
|
||||
// Topics: Gears
|
||||
// Description:
|
||||
// Calculates the root radius for the gear, at the base of the dedendum.
|
||||
|
@ -219,7 +219,7 @@ function root_radius(pitch=5, teeth=11, clearance, interior=false, mod) =
|
|||
|
||||
// Function: base_radius()
|
||||
// Usage:
|
||||
// br = base_radius(pitch|mod, teeth, <pressure_angle>);
|
||||
// br = base_radius(pitch|mod, teeth, [pressure_angle]);
|
||||
// Topics: Gears
|
||||
// Description:
|
||||
// Get the base circle for involute teeth, at the base of the teeth.
|
||||
|
@ -243,7 +243,7 @@ function base_radius(pitch=5, teeth=11, pressure_angle=28, mod) =
|
|||
|
||||
// Function: bevel_pitch_angle()
|
||||
// Usage:
|
||||
// ang = bevel_pitch_angle(teeth, mate_teeth, <drive_angle>);
|
||||
// ang = bevel_pitch_angle(teeth, mate_teeth, [drive_angle]);
|
||||
// Topics: Gears
|
||||
// See Also: bevel_gear()
|
||||
// Description:
|
||||
|
@ -274,7 +274,7 @@ function bevel_pitch_angle(teeth, mate_teeth, drive_angle=90) =
|
|||
|
||||
// Function: worm_gear_thickness()
|
||||
// Usage:
|
||||
// thick = worm_gear_thickness(pitch|mod, teeth, worm_diam, <worm_arc>, <crowning>, <clearance>);
|
||||
// thick = worm_gear_thickness(pitch|mod, teeth, worm_diam, [worm_arc], [crowning], [clearance]);
|
||||
// Topics: Gears
|
||||
// See Also: worm(), worm_gear()
|
||||
// Description:
|
||||
|
@ -327,9 +327,9 @@ function _gear_q7(f,r,b,r2,t,s) = _gear_q6(b,s,t,(1-f)*max(b,r)+f*r2); //
|
|||
|
||||
// Function&Module: gear_tooth_profile()
|
||||
// Usage: As Module
|
||||
// gear_tooth_profile(pitch|mod, teeth, <pressure_angle>, <clearance>, <backlash>, <interior>, <valleys>);
|
||||
// gear_tooth_profile(pitch|mod, teeth, [pressure_angle], [clearance], [backlash], [interior], [valleys]);
|
||||
// Usage: As Function
|
||||
// path = gear_tooth_profile(pitch|mod, teeth, <pressure_angle>, <clearance>, <backlash>, <interior>, <valleys>);
|
||||
// path = gear_tooth_profile(pitch|mod, teeth, [pressure_angle], [clearance], [backlash], [interior], [valleys]);
|
||||
// Topics: Gears
|
||||
// See Also: spur_gear2d()
|
||||
// Description:
|
||||
|
@ -427,9 +427,9 @@ module gear_tooth_profile(
|
|||
|
||||
// Function&Module: spur_gear2d()
|
||||
// Usage: As Module
|
||||
// spur_gear2d(pitch|mod, teeth, <hide>, <pressure_angle>, <clearance>, <backlash>, <interior>);
|
||||
// spur_gear2d(pitch|mod, teeth, [hide], [pressure_angle], [clearance], [backlash], [interior]);
|
||||
// Usage: As Function
|
||||
// poly = spur_gear2d(pitch|mod, teeth, <hide>, <pressure_angle>, <clearance>, <backlash>, <interior>);
|
||||
// poly = spur_gear2d(pitch|mod, teeth, [hide], [pressure_angle], [clearance], [backlash], [interior]);
|
||||
// Topics: Gears
|
||||
// See Also: spur_gear()
|
||||
// Description:
|
||||
|
@ -526,9 +526,9 @@ module spur_gear2d(
|
|||
|
||||
// Function&Module: rack2d()
|
||||
// Usage: As a Function
|
||||
// path = rack2d(pitch|mod, teeth, height, <pressure_angle>, <backlash>);
|
||||
// path = rack2d(pitch|mod, teeth, height, [pressure_angle], [backlash]);
|
||||
// Usage: As a Module
|
||||
// rack2d(pitch|mod, teeth, height, <pressure_angle>, <backlash>);
|
||||
// rack2d(pitch|mod, teeth, height, [pressure_angle], [backlash]);
|
||||
// Topics: Gears
|
||||
// See Also: spur_gear2d()
|
||||
// Description:
|
||||
|
@ -647,11 +647,11 @@ module rack2d(
|
|||
|
||||
// Function&Module: spur_gear()
|
||||
// Usage: As a Module
|
||||
// spur_gear(pitch, teeth, thickness, <shaft_diam=>, <hide>, <pressure_angle>, <clearance>, <backlash>, <helical>, <slices>, <interior>);
|
||||
// spur_gear(mod=, teeth=, thickness=, <shaft_diam=>, ...);
|
||||
// spur_gear(pitch, teeth, thickness, [shaft_diam=], [hide], [pressure_angle], [clearance], [backlash], [helical], [slices], [interior]);
|
||||
// spur_gear(mod=, teeth=, thickness=, [shaft_diam=], ...);
|
||||
// Usage: As a Function
|
||||
// vnf = spur_gear(pitch, teeth, thickness, <shaft_diam>, ...);
|
||||
// vnf = spur_gear(mod=, teeth=, thickness=, <shaft_diam>, ...);
|
||||
// vnf = spur_gear(pitch, teeth, thickness, [shaft_diam], ...);
|
||||
// vnf = spur_gear(mod=, teeth=, thickness=, [shaft_diam], ...);
|
||||
// Topics: Gears
|
||||
// See Also: rack()
|
||||
// Description:
|
||||
|
@ -813,9 +813,9 @@ module spur_gear(
|
|||
|
||||
// Function&Module: bevel_gear()
|
||||
// Usage: As a Module
|
||||
// bevel_gear(pitch|mod, teeth, face_width, pitch_angle, <shaft_diam>, <hide>, <pressure_angle>, <clearance>, <backlash>, <cutter_radius>, <spiral_angle>, <slices>, <interior>);
|
||||
// bevel_gear(pitch|mod, teeth, face_width, pitch_angle, [shaft_diam], [hide], [pressure_angle], [clearance], [backlash], [cutter_radius], [spiral_angle], [slices], [interior]);
|
||||
// Usage: As a Function
|
||||
// vnf = bevel_gear(pitch|mod, teeth, face_width, pitch_angle, <hide>, <pressure_angle>, <clearance>, <backlash>, <cutter_radius>, <spiral_angle>, <slices>, <interior>);
|
||||
// vnf = bevel_gear(pitch|mod, teeth, face_width, pitch_angle, [hide], [pressure_angle], [clearance], [backlash], [cutter_radius], [spiral_angle], [slices], [interior]);
|
||||
// Topics: Gears
|
||||
// See Also: bevel_pitch_angle()
|
||||
// Description:
|
||||
|
@ -1066,11 +1066,11 @@ module bevel_gear(
|
|||
|
||||
// Function&Module: rack()
|
||||
// Usage: As a Module
|
||||
// rack(pitch, teeth, thickness, height, <pressure_angle=>, <backlash=>);
|
||||
// rack(mod=, teeth=, thickness=, height=, <pressure_angle=>, <backlash>=);
|
||||
// rack(pitch, teeth, thickness, height, [pressure_angle=], [backlash=]);
|
||||
// rack(mod=, teeth=, thickness=, height=, [pressure_angle=], [backlash]=);
|
||||
// Usage: As a Function
|
||||
// vnf = rack(pitch, teeth, thickness, height, <pressure_angle=>, <backlash=>);
|
||||
// vnf = rack(mod=, teeth=, thickness=, height=, <pressure_angle=>, <backlash=>);
|
||||
// vnf = rack(pitch, teeth, thickness, height, [pressure_angle=], [backlash=]);
|
||||
// vnf = rack(mod=, teeth=, thickness=, height=, [pressure_angle=], [backlash=]);
|
||||
// Topics: Gears
|
||||
// See Also: spur_gear()
|
||||
// Description:
|
||||
|
@ -1213,9 +1213,9 @@ function rack(
|
|||
|
||||
// Function&Module: worm()
|
||||
// Usage: As a Module
|
||||
// worm(pitch|mod, d, l, <starts>, <left_handed>, <pressure_angle>, <backlash>, <clearance>);
|
||||
// worm(pitch|mod, d, l, [starts], [left_handed], [pressure_angle], [backlash], [clearance]);
|
||||
// Usage: As a Function
|
||||
// vnf = worm(pitch|mod, d, l, <starts>, <left_handed>, <pressure_angle>, <backlash>, <clearance>);
|
||||
// vnf = worm(pitch|mod, d, l, [starts], [left_handed], [pressure_angle], [backlash], [clearance]);
|
||||
// Topics: Gears
|
||||
// See Also: worm_gear()
|
||||
// Description:
|
||||
|
@ -1330,9 +1330,9 @@ module worm(
|
|||
|
||||
// Function&Module: worm_gear()
|
||||
// Usage: As a Module
|
||||
// worm_gear(pitch|mod, teeth, worm_diam, <worm_starts>, <crowning>, <left_handed>, <pressure_angle>, <backlash>, <slices>, <clearance>, <shaft_diam>);
|
||||
// worm_gear(pitch|mod, teeth, worm_diam, [worm_starts], [crowning], [left_handed], [pressure_angle], [backlash], [slices], [clearance], [shaft_diam]);
|
||||
// Usage: As a Function
|
||||
// vnf = worm_gear(pitch|mod, teeth, worm_diam, <worm_starts>, <crowning>, <left_handed>, <pressure_angle>, <backlash>, <slices>, <clearance>);
|
||||
// vnf = worm_gear(pitch|mod, teeth, worm_diam, [worm_starts], [crowning], [left_handed], [pressure_angle], [backlash], [slices], [clearance]);
|
||||
// Topics: Gears
|
||||
// See Also: worm()
|
||||
// Description:
|
||||
|
|
|
@ -1021,7 +1021,7 @@ function _covariance_evec_eval(points) =
|
|||
|
||||
// Function: plane_from_points()
|
||||
// Usage:
|
||||
// plane = plane_from_points(points, <fast>, <eps>);
|
||||
// plane = plane_from_points(points, [fast], [eps]);
|
||||
// Topics: Geometry, Planes, Points
|
||||
// Description:
|
||||
// Given a list of 3 or more coplanar 3D points, returns the coefficients of the normalized cartesian equation of a plane,
|
||||
|
@ -1350,7 +1350,7 @@ function plane_intersection(plane1,plane2,plane3) =
|
|||
|
||||
// Function: coplanar()
|
||||
// Usage:
|
||||
// test = coplanar(points,<eps>);
|
||||
// test = coplanar(points,[eps]);
|
||||
// Topics: Geometry, Coplanarity
|
||||
// Description:
|
||||
// Returns true if the given 3D points are non-collinear and are on a plane.
|
||||
|
@ -1378,7 +1378,7 @@ function _pointlist_greatest_distance(points,plane) =
|
|||
|
||||
// Function: points_on_plane()
|
||||
// Usage:
|
||||
// test = points_on_plane(points, plane, <eps>);
|
||||
// test = points_on_plane(points, plane, [eps]);
|
||||
// Topics: Geometry, Planes, Points
|
||||
// Description:
|
||||
// Returns true if the given 3D points are on the given plane.
|
||||
|
@ -1414,10 +1414,10 @@ function in_front_of_plane(plane, point) =
|
|||
|
||||
// Function&Module: circle_2tangents()
|
||||
// Usage: As Function
|
||||
// circ = circle_2tangents(pt1, pt2, pt3, r|d, <tangents>);
|
||||
// circ = circle_2tangents(pt1, pt2, pt3, r|d, [tangents]);
|
||||
// Topics: Geometry, Circles, Tangents
|
||||
// Usage: As Module
|
||||
// circle_2tangents(pt1, pt2, pt3, r|d, <h>, <center>);
|
||||
// circle_2tangents(pt1, pt2, pt3, r|d, [h], [center]);
|
||||
// Description:
|
||||
// Given a pair of rays with a common origin, and a known circle radius/diameter, finds
|
||||
// the centerpoint for the circle of that size that touches both rays tangentally.
|
||||
|
@ -1530,8 +1530,8 @@ module circle_2tangents(pt1, pt2, pt3, r, d, h, center=false) {
|
|||
// circ = circle_3points([pt1, pt2, pt3]);
|
||||
// Topics: Geometry, Circles
|
||||
// Usage: As Module
|
||||
// circle_3points(pt1, pt2, pt3, <h>, <center>);
|
||||
// circle_3points([pt1, pt2, pt3], <h>, <center>);
|
||||
// circle_3points(pt1, pt2, pt3, [h], [center]);
|
||||
// circle_3points([pt1, pt2, pt3], [h], [center]);
|
||||
// Description:
|
||||
// Returns the [CENTERPOINT, RADIUS, NORMAL] of the circle that passes through three non-collinear
|
||||
// points where NORMAL is the normal vector of the plane that the circle is on (UP or DOWN if the points are 2D).
|
||||
|
@ -1724,7 +1724,7 @@ function circle_circle_tangents(c1,r1,c2,r2,d1,d2) =
|
|||
|
||||
// Function: circle_line_intersection()
|
||||
// Usage:
|
||||
// isect = circle_line_intersection(c,<r|d>,<line>,<bounded>,<eps>);
|
||||
// isect = circle_line_intersection(c,<r|d>,[line],[bounded],[eps]);
|
||||
// Topics: Geometry, Circles, Lines, Intersection
|
||||
// Description:
|
||||
// Find intersection points between a 2d circle and a line, ray or segment specified by two points.
|
||||
|
@ -1968,7 +1968,7 @@ function reindex_polygon(reference, poly, return_error=false) =
|
|||
|
||||
// Function: align_polygon()
|
||||
// Usage:
|
||||
// newpoly = align_polygon(reference, poly, angles, <cp>);
|
||||
// newpoly = align_polygon(reference, poly, angles, [cp]);
|
||||
// Topics: Geometry, Polygons
|
||||
// Description:
|
||||
// Tries the list or range of angles to find a rotation of the specified 2D polygon that best aligns
|
||||
|
@ -2042,7 +2042,7 @@ function centroid(poly, eps=EPSILON) =
|
|||
|
||||
// Function: point_in_polygon()
|
||||
// Usage:
|
||||
// test = point_in_polygon(point, poly, <eps>)
|
||||
// test = point_in_polygon(point, poly, [eps])
|
||||
// Topics: Geometry, Polygons
|
||||
// Description:
|
||||
// This function tests whether the given 2D point is inside, outside or on the boundary of
|
||||
|
@ -2371,7 +2371,7 @@ function is_convex_polygon(poly,eps=EPSILON) =
|
|||
|
||||
// Function: convex_distance()
|
||||
// Usage:
|
||||
// dist = convex_distance(pts1, pts2,<eps=>);
|
||||
// dist = convex_distance(pts1, pts2,[eps=]);
|
||||
// Topics: Geometry, Convexity, Distance
|
||||
// See also:
|
||||
// convex_collision(), hull()
|
||||
|
@ -2430,7 +2430,7 @@ function _GJK_distance(points1, points2, eps=EPSILON, lbd, d, simplex=[]) =
|
|||
|
||||
// Function: convex_collision()
|
||||
// Usage:
|
||||
// test = convex_collision(pts1, pts2,<eps=>);
|
||||
// test = convex_collision(pts1, pts2, [eps=]);
|
||||
// Topics: Geometry, Convexity, Collision, Intersection
|
||||
// See also:
|
||||
// convex_distance(), hull()
|
||||
|
|
40
math.scad
40
math.scad
|
@ -62,7 +62,7 @@ function log2(x) =
|
|||
|
||||
// Function: hypot()
|
||||
// Usage:
|
||||
// l = hypot(x,y,<z>);
|
||||
// l = hypot(x,y,[z]);
|
||||
// Description:
|
||||
// Calculate hypotenuse length of a 2D or 3D triangle.
|
||||
// Arguments:
|
||||
|
@ -79,7 +79,7 @@ function hypot(x,y,z=0) =
|
|||
|
||||
// Function: factorial()
|
||||
// Usage:
|
||||
// x = factorial(n,<d>);
|
||||
// x = factorial(n,[d]);
|
||||
// Description:
|
||||
// Returns the factorial of the given integer value, or n!/d! if d is given.
|
||||
// Arguments:
|
||||
|
@ -177,7 +177,7 @@ function lerp(a,b,u) =
|
|||
// Function: lerpn()
|
||||
// Usage:
|
||||
// x = lerpn(a, b, n);
|
||||
// x = lerpn(a, b, n, <endpoint>);
|
||||
// x = lerpn(a, b, n, [endpoint]);
|
||||
// Description:
|
||||
// Returns exactly `n` values, linearly interpolated between `a` and `b`.
|
||||
// If `endpoint` is true, then the last value will exactly equal `b`.
|
||||
|
@ -463,7 +463,7 @@ function modang(x) =
|
|||
|
||||
// Function: rand_int()
|
||||
// Usage:
|
||||
// rand_int(minval,maxval,N,<seed>);
|
||||
// rand_int(minval,maxval,N,[seed]);
|
||||
// Description:
|
||||
// Return a list of random integers in the range of minval to maxval, inclusive.
|
||||
// Arguments:
|
||||
|
@ -483,7 +483,7 @@ function rand_int(minval, maxval, N, seed=undef) =
|
|||
|
||||
// Function: gaussian_rands()
|
||||
// Usage:
|
||||
// gaussian_rands(mean, stddev, <N>, <seed>)
|
||||
// gaussian_rands(mean, stddev, [N], [seed])
|
||||
// Description:
|
||||
// Returns a random number with a gaussian/normal distribution.
|
||||
// Arguments:
|
||||
|
@ -499,7 +499,7 @@ function gaussian_rands(mean, stddev, N=1, seed=undef) =
|
|||
|
||||
// Function: log_rands()
|
||||
// Usage:
|
||||
// log_rands(minval, maxval, factor, <N>, <seed>);
|
||||
// log_rands(minval, maxval, factor, [N], [seed]);
|
||||
// Description:
|
||||
// Returns a single random number, with a logarithmic distribution.
|
||||
// Arguments:
|
||||
|
@ -568,7 +568,7 @@ function lcm(a,b=[]) =
|
|||
|
||||
// Function: sum()
|
||||
// Usage:
|
||||
// x = sum(v, <dflt>);
|
||||
// x = sum(v, [dflt]);
|
||||
// Description:
|
||||
// Returns the sum of all entries in the given consistent list.
|
||||
// If passed an array of vectors, returns the sum the vectors.
|
||||
|
@ -920,7 +920,7 @@ function _swap_matrix(n,i,j) =
|
|||
|
||||
// Function: back_substitute()
|
||||
// Usage:
|
||||
// x = back_substitute(R, b, <transpose>);
|
||||
// x = back_substitute(R, b, [transpose]);
|
||||
// Description:
|
||||
// Solves the problem Rx=b where R is an upper triangular square matrix. The lower triangular entries of R are
|
||||
// ignored. If transpose==true then instead solve transpose(R)*x=b.
|
||||
|
@ -1012,7 +1012,7 @@ function determinant(M) =
|
|||
|
||||
// Function: is_matrix()
|
||||
// Usage:
|
||||
// is_matrix(A,<m>,<n>,<square>)
|
||||
// is_matrix(A,[m],[n],[square])
|
||||
// Description:
|
||||
// Returns true if A is a numeric matrix of height m and width n. If m or n
|
||||
// are omitted or set to undef then true is returned for any positive dimension.
|
||||
|
@ -1055,7 +1055,7 @@ function matrix_trace(M) =
|
|||
|
||||
// Function: all_zero()
|
||||
// Usage:
|
||||
// x = all_zero(x, <eps>);
|
||||
// x = all_zero(x, [eps]);
|
||||
// Description:
|
||||
// Returns true if the finite number passed to it is approximately zero, to within `eps`.
|
||||
// If passed a list, recursively checks if all items in the list are approximately zero.
|
||||
|
@ -1076,7 +1076,7 @@ function all_zero(x, eps=EPSILON) =
|
|||
|
||||
// Function: all_nonzero()
|
||||
// Usage:
|
||||
// x = all_nonzero(x, <eps>);
|
||||
// x = all_nonzero(x, [eps]);
|
||||
// Description:
|
||||
// Returns true if the finite number passed to it is not almost zero, to within `eps`.
|
||||
// If passed a list, recursively checks if all items in the list are not almost zero.
|
||||
|
@ -1194,7 +1194,7 @@ function all_nonnegative(x) =
|
|||
|
||||
// Function all_equal()
|
||||
// Usage:
|
||||
// b = all_equal(vec,<eps>);
|
||||
// b = all_equal(vec,[eps]);
|
||||
// Description:
|
||||
// Returns true if all of the entries in vec are equal to each other, or approximately equal to each other if eps is set.
|
||||
// Arguments:
|
||||
|
@ -1206,7 +1206,7 @@ function all_equal(vec,eps=0) =
|
|||
|
||||
// Function: approx()
|
||||
// Usage:
|
||||
// b = approx(a,b,<eps>)
|
||||
// b = approx(a,b,[eps])
|
||||
// Description:
|
||||
// Compares two numbers or vectors, and returns true if they are closer than `eps` to each other.
|
||||
// Arguments:
|
||||
|
@ -1345,8 +1345,8 @@ function _all_bool(l, i=0, out=true) =
|
|||
|
||||
// Function: count_true()
|
||||
// Usage:
|
||||
// n = count_true(l,<nmax=>);
|
||||
// n = count_true(l,func,<nmax=>); // Requires OpenSCAD 2021.01 or later.
|
||||
// n = count_true(l,[nmax=]);
|
||||
// n = count_true(l,func,[nmax=]); // Requires OpenSCAD 2021.01 or later.
|
||||
// Requirements:
|
||||
// Requires OpenSCAD 2021.01 or later to use the `func=` argument.
|
||||
// Description:
|
||||
|
@ -1460,7 +1460,7 @@ function _deriv_nonuniform(data, h, closed) =
|
|||
|
||||
// Function: deriv2()
|
||||
// Usage:
|
||||
// x = deriv2(data, <h>, <closed>)
|
||||
// x = deriv2(data, [h], [closed])
|
||||
// Description:
|
||||
// Computes a numerical estimate of the second derivative of the data, which may be scalar or vector valued.
|
||||
// The `h` parameter gives the step size of your sampling so the derivative can be scaled correctly.
|
||||
|
@ -1504,7 +1504,7 @@ function deriv2(data, h=1, closed=false) =
|
|||
|
||||
// Function: deriv3()
|
||||
// Usage:
|
||||
// x = deriv3(data, <h>, <closed>)
|
||||
// x = deriv3(data, [h], [closed])
|
||||
// Description:
|
||||
// Computes a numerical third derivative estimate of the data, which may be scalar or vector valued.
|
||||
// The `h` parameter gives the step size of your sampling so the derivative can be scaled correctly.
|
||||
|
@ -1657,7 +1657,7 @@ function c_norm(z) = norm_fro(z);
|
|||
|
||||
// Function: quadratic_roots()
|
||||
// Usage:
|
||||
// roots = quadratic_roots(a,b,c,<real>)
|
||||
// roots = quadratic_roots(a,b,c,[real])
|
||||
// Description:
|
||||
// Computes roots of the quadratic equation a*x^2+b*x+c==0, where the
|
||||
// coefficients are real numbers. If real is true then returns only the
|
||||
|
@ -1779,7 +1779,7 @@ function poly_add(p,q) =
|
|||
|
||||
// Function: poly_roots()
|
||||
// Usage:
|
||||
// poly_roots(p,<tol>)
|
||||
// poly_roots(p,[tol])
|
||||
// Description:
|
||||
// Returns all complex roots of the specified real polynomial p.
|
||||
// The polynomial is specified as p=[a_n, a_{n-1},...,a_1,a_0]
|
||||
|
@ -1849,7 +1849,7 @@ function _poly_roots(p, pderiv, s, z, tol, i=0) =
|
|||
|
||||
// Function: real_roots()
|
||||
// Usage:
|
||||
// real_roots(p, <eps>, <tol>)
|
||||
// real_roots(p, [eps], [tol])
|
||||
// Description:
|
||||
// Returns the real roots of the specified real polynomial p.
|
||||
// The polynomial is specified as p=[a_n, a_{n-1},...,a_1,a_0]
|
||||
|
|
|
@ -118,7 +118,7 @@ _hose_waist = [1.7698, 1.8251, 3.95998];
|
|||
|
||||
// Module: modular_hose()
|
||||
// Usage:
|
||||
// modular_hose(size, type, <clearance>, <waist_len>, <anchor>, <spin>, <orient>) <attachments>
|
||||
// modular_hose(size, type, [clearance], [waist_len], [anchor], [spin], [orient]) [attachments]
|
||||
// Description:
|
||||
// Construct moduler hose segments or modular hose ends for connection to standard
|
||||
// modular hose systems. The 1/4", 1/2" and 3/4" sizes are supported and you can
|
||||
|
@ -185,7 +185,7 @@ module modular_hose(size, type, clearance=0, waist_len, anchor=BOTTOM, spin=0,or
|
|||
|
||||
// Function: modular_hose_radius()
|
||||
// Usage:
|
||||
// r = modular_hose_radius(size, <outer>);
|
||||
// r = modular_hose_radius(size, [outer]);
|
||||
// Description:
|
||||
// Returns the inner (or outer) diameter of the waist section
|
||||
// of the modular hose to enable hollowing out connecting channels.
|
||||
|
|
|
@ -96,9 +96,9 @@ module bounding_box(excess=0, planar=false) {
|
|||
// Function&Module: half_of()
|
||||
//
|
||||
// Usage: as module
|
||||
// half_of(v, <cp>, <s>, <planar>) ...
|
||||
// half_of(v, [cp], [s], [planar]) ...
|
||||
// Usage: as function
|
||||
// result = half_of(p,v,<cp>);
|
||||
// result = half_of(p,v,[cp]);
|
||||
//
|
||||
// Description:
|
||||
// Slices an object at a cut plane, and masks away everything that is on one side. The v parameter is either a plane specification or
|
||||
|
@ -200,10 +200,10 @@ function half_of(p, v=UP, cp) =
|
|||
// Function&Module: left_half()
|
||||
//
|
||||
// Usage: as module
|
||||
// left_half(<s>, <x>) ...
|
||||
// left_half(planar=true, <s>, <x>) ...
|
||||
// left_half([s], [x]) ...
|
||||
// left_half(planar=true, [s], [x]) ...
|
||||
// Usage: as function
|
||||
// result = left_half(p, <x>);
|
||||
// result = left_half(p, [x]);
|
||||
//
|
||||
// Description:
|
||||
// Slices an object at a vertical Y-Z cut plane, and masks away everything that is right of it.
|
||||
|
@ -243,7 +243,7 @@ function left_half(p,x=0) = half_of(p, LEFT, [x,0,0]);
|
|||
// right_half([s], [x]) ...
|
||||
// right_half(planar=true, [s], [x]) ...
|
||||
// Usage: as function
|
||||
// result = right_half(p, <x>);
|
||||
// result = right_half(p, [x]);
|
||||
//
|
||||
// Description:
|
||||
// Slices an object at a vertical Y-Z cut plane, and masks away everything that is left of it.
|
||||
|
@ -280,10 +280,10 @@ function right_half(p,x=0) = half_of(p, RIGHT, [x,0,0]);
|
|||
// Function&Module: front_half()
|
||||
//
|
||||
// Usage:
|
||||
// front_half(<s>, <y>) ...
|
||||
// front_half(planar=true, <s>, <y>) ...
|
||||
// front_half([s], [y]) ...
|
||||
// front_half(planar=true, [s], [y]) ...
|
||||
// Usage: as function
|
||||
// result = front_half(p, <y>);
|
||||
// result = front_half(p, [y]);
|
||||
//
|
||||
// Description:
|
||||
// Slices an object at a vertical X-Z cut plane, and masks away everything that is behind it.
|
||||
|
@ -320,10 +320,10 @@ function front_half(p,y=0) = half_of(p, FRONT, [0,y,0]);
|
|||
// Function&Module: back_half()
|
||||
//
|
||||
// Usage:
|
||||
// back_half(<s>, <y>) ...
|
||||
// back_half(planar=true, <s>, <y>) ...
|
||||
// back_half([s], [y]) ...
|
||||
// back_half(planar=true, [s], [y]) ...
|
||||
// Usage: as function
|
||||
// result = back_half(p, <y>);
|
||||
// result = back_half(p, [y]);
|
||||
//
|
||||
// Description:
|
||||
// Slices an object at a vertical X-Z cut plane, and masks away everything that is in front of it.
|
||||
|
@ -360,9 +360,9 @@ function back_half(p,y=0) = half_of(p, BACK, [0,y,0]);
|
|||
// Function&Module: bottom_half()
|
||||
//
|
||||
// Usage:
|
||||
// bottom_half(<s>, <z>) ...
|
||||
// bottom_half([s], [z]) ...
|
||||
// Usage: as function
|
||||
// result = bottom_half(p, <z>);
|
||||
// result = bottom_half(p, [z]);
|
||||
//
|
||||
// Description:
|
||||
// Slices an object at a horizontal X-Y cut plane, and masks away everything that is above it.
|
||||
|
@ -392,8 +392,8 @@ function bottom_half(p,z=0) = half_of(p,BOTTOM,[0,0,z]);
|
|||
// Function&Module: top_half()
|
||||
//
|
||||
// Usage:
|
||||
// top_half(<s>, <z>) ...
|
||||
// result = top_half(p, <z>);
|
||||
// top_half([s], [z]) ...
|
||||
// result = top_half(p, [z]);
|
||||
//
|
||||
// Description:
|
||||
// Slices an object at a horizontal X-Y cut plane, and masks away everything that is below it.
|
||||
|
@ -475,7 +475,7 @@ module chain_hull()
|
|||
|
||||
// Module: path_extrude2d()
|
||||
// Usage:
|
||||
// path_extrude2d(path, <caps>) {...}
|
||||
// path_extrude2d(path, [caps]) {...}
|
||||
// Description:
|
||||
// Extrudes 2D children along the given 2D path, with optional rounded endcaps.
|
||||
// Arguments:
|
||||
|
|
20
paths.scad
20
paths.scad
|
@ -319,7 +319,7 @@ function path_closest_point(path, pt) =
|
|||
|
||||
// Function: path_tangents()
|
||||
// Usage:
|
||||
// tangs = path_tangents(path, <closed>, <uniform>);
|
||||
// tangs = path_tangents(path, [closed], [uniform]);
|
||||
// Description:
|
||||
// Compute the tangent vector to the input path. The derivative approximation is described in deriv().
|
||||
// The returns vectors will be normalized to length 1. If any derivatives are zero then
|
||||
|
@ -352,7 +352,7 @@ function path_tangents(path, closed=false, uniform=true) =
|
|||
|
||||
// Function: path_normals()
|
||||
// Usage:
|
||||
// norms = path_normals(path, <tangents>, <closed>);
|
||||
// norms = path_normals(path, [tangents], [closed]);
|
||||
// Description:
|
||||
// Compute the normal vector to the input path. This vector is perpendicular to the
|
||||
// path tangent and lies in the plane of the curve. For 3d paths we define the plane of the curve
|
||||
|
@ -386,7 +386,7 @@ function path_normals(path, tangents, closed=false) =
|
|||
|
||||
// Function: path_curvature()
|
||||
// Usage:
|
||||
// curvs = path_curvature(path, <closed>);
|
||||
// curvs = path_curvature(path, [closed]);
|
||||
// Description:
|
||||
// Numerically estimate the curvature of the path (in any dimension).
|
||||
function path_curvature(path, closed=false) =
|
||||
|
@ -404,7 +404,7 @@ function path_curvature(path, closed=false) =
|
|||
|
||||
// Function: path_torsion()
|
||||
// Usage:
|
||||
// tortions = path_torsion(path, <closed>);
|
||||
// tortions = path_torsion(path, [closed]);
|
||||
// Description:
|
||||
// Numerically estimate the torsion of a 3d path.
|
||||
function path_torsion(path, closed=false) =
|
||||
|
@ -575,7 +575,7 @@ function _corner_roundover_path(p1, p2, p3, r, d) =
|
|||
// Topics: Paths
|
||||
// See Also: jittered_poly(), subdivide_long_segments()
|
||||
// Usage:
|
||||
// jpath = path_add_jitter(path, <dist>, <closed=>);
|
||||
// jpath = path_add_jitter(path, [dist], [closed=]);
|
||||
// Description:
|
||||
// Adds tiny jitter offsets to collinear points in the given path so that they
|
||||
// are no longer collinear. This is useful for preserving subdivision on long
|
||||
|
@ -971,7 +971,7 @@ module modulated_circle(r, sines=[[1,1]], d)
|
|||
// Topics: Extrusions
|
||||
// See Also: path_add_jitter(), subdivide_long_segments()
|
||||
// Usage:
|
||||
// jittered_poly(path, <dist>);
|
||||
// jittered_poly(path, [dist]);
|
||||
// Description:
|
||||
// Creates a 2D polygon shape from the given path in such a way that any extra
|
||||
// collinear points are not stripped out in the way that `polygon()` normally does.
|
||||
|
@ -1285,7 +1285,7 @@ module path_spread(path, n, spacing, sp=undef, rotate_children=true, closed=fals
|
|||
// Function: path_cut_points()
|
||||
//
|
||||
// Usage:
|
||||
// cuts = path_cut_points(path, dists, <closed=>, <direction=>);
|
||||
// cuts = path_cut_points(path, dists, [closed=], [direction=]);
|
||||
//
|
||||
// Description:
|
||||
// Cuts a path at a list of distances from the first point in the path. Returns a list of the cut
|
||||
|
@ -1402,7 +1402,7 @@ function _path_cuts_dir(path, cuts, closed=false, eps=1e-2) =
|
|||
// Topics: Paths
|
||||
// See Also: path_cut_points()
|
||||
// Usage:
|
||||
// path_list = path_cut(path, cutdist, <closed=>);
|
||||
// path_list = path_cut(path, cutdist, [closed=]);
|
||||
// Description:
|
||||
// Given a list of distances in `cutdist`, cut the path into
|
||||
// subpaths at those lengths, returning a list of paths.
|
||||
|
@ -1561,7 +1561,7 @@ function subdivide_path(path, N, refine, closed=true, exact=true, method="length
|
|||
|
||||
// Function: path_length_fractions()
|
||||
// Usage:
|
||||
// fracs = path_length_fractions(path, <closed>);
|
||||
// fracs = path_length_fractions(path, [closed]);
|
||||
// Description:
|
||||
// Returns the distance fraction of each point in the path along the path, so the first
|
||||
// point is zero and the final point is 1. If the path is closed the length of the output
|
||||
|
@ -1583,7 +1583,7 @@ function path_length_fractions(path, closed=false) =
|
|||
|
||||
// Function: resample_path()
|
||||
// Usage:
|
||||
// newpath = resample_path(path, N|spacing, <closed>);
|
||||
// newpath = resample_path(path, N|spacing, [closed]);
|
||||
// Description:
|
||||
// Compute a uniform resampling of the input path. If you specify `N` then the output path will have N
|
||||
// points spaced uniformly (by linear interpolation along the input path segments). The only points of the
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
// Function&Module: square()
|
||||
// Topics: Shapes (2D), Path Generators (2D)
|
||||
// Usage: As a Built-in Module
|
||||
// square(size, <center>);
|
||||
// square(size, [center]);
|
||||
// Usage: As a Function
|
||||
// path = square(size, <center>);
|
||||
// path = square(size, [center]);
|
||||
// See Also: rect()
|
||||
// Description:
|
||||
// When called as the builtin module, creates a 2D square or rectangle of the given size.
|
||||
|
@ -84,11 +84,11 @@ function circle(r, d, anchor=CENTER, spin=0) =
|
|||
// Function&Module: cube()
|
||||
// Topics: Shapes (3D), Attachable, VNF Generators
|
||||
// Usage: As Module
|
||||
// cube(size, <center>, ...);
|
||||
// cube(size, [center], ...);
|
||||
// Usage: With Attachments
|
||||
// cube(size, <center>, ...) { attachments }
|
||||
// cube(size, [center], ...) { attachments }
|
||||
// Usage: As Function
|
||||
// vnf = cube(size, <center>, ...);
|
||||
// vnf = cube(size, [center], ...);
|
||||
// See Also: cuboid(), prismoid()
|
||||
// Description:
|
||||
// Creates a 3D cubic object with support for anchoring and attachments.
|
||||
|
@ -155,13 +155,13 @@ function cube(size=1, center, anchor, spin=0, orient=UP) =
|
|||
// Function&Module: cylinder()
|
||||
// Topics: Shapes (3D), Attachable, VNF Generators
|
||||
// Usage: As Module
|
||||
// cylinder(h, r=/d=, <center=>, ...);
|
||||
// cylinder(h, r1/d1=, r2/d2=, <center=>, ...);
|
||||
// cylinder(h, r=/d=, [center=], ...);
|
||||
// cylinder(h, r1/d1=, r2/d2=, [center=], ...);
|
||||
// Usage: With Attachments
|
||||
// cylinder(h, r=/d=, <center=>) {attachments}
|
||||
// cylinder(h, r=/d=, [center=]) {attachments}
|
||||
// Usage: As Function
|
||||
// vnf = cylinder(h, r=/d=, <center=>, ...);
|
||||
// vnf = cylinder(h, r1/d1=, r2/d2=, <center=>, ...);
|
||||
// vnf = cylinder(h, r=/d=, [center=], ...);
|
||||
// vnf = cylinder(h, r1/d1=, r2/d2=, [center=], ...);
|
||||
// See Also: cyl()
|
||||
// Description:
|
||||
// Creates a 3D cylinder or conic object with support for anchoring and attachments.
|
||||
|
@ -252,11 +252,11 @@ function cylinder(h, r1, r2, center, l, r, d, d1, d2, anchor, spin=0, orient=UP)
|
|||
// Function&Module: sphere()
|
||||
// Topics: Shapes (3D), Attachable, VNF Generators
|
||||
// Usage: As Module
|
||||
// sphere(r|d=, <circum=>, <style=>, ...);
|
||||
// sphere(r|d=, [circum=], [style=], ...);
|
||||
// Usage: With Attachments
|
||||
// sphere(r|d=, ...) { attachments }
|
||||
// Usage: As Function
|
||||
// vnf = sphere(r|d=, <circum=>, <style=>, ...);
|
||||
// vnf = sphere(r|d=, [circum=], [style=], ...);
|
||||
// See Also: spheroid()
|
||||
// Description:
|
||||
// Creates a sphere object, with support for anchoring and attachments.
|
||||
|
|
|
@ -123,7 +123,7 @@ function point_in_region(point, region, eps=EPSILON, _i=0, _cnt=0) =
|
|||
|
||||
// Function: polygons_equal()
|
||||
// Usage:
|
||||
// b = polygons_equal(poly1, poly2, <eps>)
|
||||
// b = polygons_equal(poly1, poly2, [eps])
|
||||
// Description:
|
||||
// Returns true if the components of region1 and region2 are the same polygons
|
||||
// within given epsilon tolerance.
|
||||
|
@ -172,7 +172,7 @@ function __poly_in_polygons(poly, polys, i) =
|
|||
|
||||
// Function: regions_equal()
|
||||
// Usage:
|
||||
// b = regions_equal(region1, region2, <eps>)
|
||||
// b = regions_equal(region1, region2, [eps])
|
||||
// Description:
|
||||
// Returns true if the components of region1 and region2 are the same polygons
|
||||
// within given epsilon tolerance.
|
||||
|
|
|
@ -15,7 +15,7 @@ include <structs.scad>
|
|||
// Function: round_corners()
|
||||
//
|
||||
// Usage:
|
||||
// rounded_path = round_corners(path, <method>, <radius=>, <cut=>, <joint=>, <closed=>, <verbose=>);
|
||||
// rounded_path = round_corners(path, [method], [radius=], [cut=], [joint=], [closed=], [verbose=]);
|
||||
//
|
||||
// Description:
|
||||
// Takes a 2D or 3D path as input and rounds each corner
|
||||
|
@ -434,7 +434,7 @@ function _rounding_offsets(edgespec,z_dir=1) =
|
|||
|
||||
// Function: smooth_path()
|
||||
// Usage:
|
||||
// smoothed = smooth_path(path, <tangents>, <size=|relsize=>, <splinesteps=>, <closed=>, <uniform=>);
|
||||
// smoothed = smooth_path(path, [tangents], <size=|relsize=>, [splinesteps=], [closed=], [uniform=]);
|
||||
// Description:
|
||||
// Smooths the input path using a cubic spline. Every segment of the path will be replaced by a cubic curve
|
||||
// with `splinesteps` points. The cubic interpolation will pass through every input point on the path
|
||||
|
@ -517,7 +517,7 @@ function _scalar_to_vector(value,length,varname) =
|
|||
|
||||
// Function: path_join()
|
||||
// Usage:
|
||||
// joined_path = path_join(paths, <joint>, <k=>, <relocate=>, <closed=>);
|
||||
// joined_path = path_join(paths, [joint], [k=], [relocate=], [closed=]);
|
||||
// Description:
|
||||
// Connect a sequence of paths together into a single path with optional rounding
|
||||
// applied at the joints. By default the first path is taken as specified and subsequent paths are
|
||||
|
@ -679,9 +679,9 @@ function _path_join(paths,joint,k=0.5,i=0,result=[],relocate=true,closed=false)
|
|||
|
||||
// Function&Module: offset_sweep()
|
||||
// Usage: most common module arguments. See Arguments list below for more.
|
||||
// offset_sweep(path, <height|h|l>, <bottom>, <top>, <offset=>, <convexity=>,...) <attachments>
|
||||
// offset_sweep(path, <height|h|l>, [bottom], [top], [offset=], [convexity=],...) [attachments]
|
||||
// Usage: most common function arguments. See Arguments list below for more.
|
||||
// vnf = offset_sweep(path, <height|h|l>, <bottom>, <top>, <offset=>, ...)
|
||||
// vnf = offset_sweep(path, <height|h|l>, [bottom], [top], [offset=], ...)
|
||||
// Description:
|
||||
// Takes a 2d path as input and extrudes it upwards and/or downward. Each layer in the extrusion is produced using `offset()` to expand or shrink the previous layer. When invoked as a function returns a VNF; when invoked as a module produces geometry.
|
||||
// Using the `top` and/or `bottom` arguments you can specify a sequence of offsets values, or you can use several built-in offset profiles that
|
||||
|
@ -1308,10 +1308,10 @@ function _remove_undefined_vals(list) =
|
|||
|
||||
// Function&Module: offset_stroke()
|
||||
// Usage: as module
|
||||
// offset_stroke(path, <width>, <rounded=>, <chamfer=>, <start=>, <end=>, <check_valid=>, <quality=>, <maxstep=>, <closed=>);
|
||||
// offset_stroke(path, [width], [rounded=], [chamfer=], [start=], [end=], [check_valid=], [quality=], [maxstep=], [closed=]);
|
||||
// Usage: as function
|
||||
// path = offset_stroke(path, <width>, closed=false, <rounded=>, <chamfer=>, <start=>, <end=>, <check_valid=>, <quality=>, <maxstep=>);
|
||||
// region = offset_stroke(path, <width>, closed=true, <rounded=>, <chamfer=>, <start=>, <end=>, <check_valid=>, <quality=>, <maxstep=>);
|
||||
// path = offset_stroke(path, [width], closed=false, [rounded=], [chamfer=], [start=], [end=], [check_valid=], [quality=], [maxstep=]);
|
||||
// region = offset_stroke(path, [width], closed=true, [rounded=], [chamfer=], [start=], [end=], [check_valid=], [quality=], [maxstep=]);
|
||||
// Description:
|
||||
// Uses `offset()` to compute a stroke for the input path. Unlike `stroke`, the result does not need to be
|
||||
// centered on the input path. The corners can be rounded, pointed, or chamfered, and you can make the ends
|
||||
|
@ -1692,9 +1692,9 @@ function _rp_compute_patches(top, bot, rtop, rsides, ktop, ksides, concave) =
|
|||
|
||||
// Function&Module: rounded_prism()
|
||||
// Usage: as a module
|
||||
// rounded_prism(bottom, <top>, <height=|h=|length=|l=>, <joint_top=>, <joint_bot=>, <joint_sides=>, <k=>, <k_top=>, <k_bot=>, <k_sides=>, <splinesteps=>, <debug=>, <convexity=>,...) <attachments>;
|
||||
// rounded_prism(bottom, [top], <height=|h=|length=|l=>, [joint_top=], [joint_bot=], [joint_sides=], [k=], [k_top=], [k_bot=], [k_sides=], [splinesteps=], [debug=], [convexity=],...) [attachments];
|
||||
// Usage: as a function
|
||||
// vnf = rounded_prism(bottom, <top>, <height=|h=|length=|l=>, <joint_top=>, <joint_bot=>, <joint_sides=>, <k=>, <k_top=>, <k_bot=>, <k_sides=>, <splinesteps=>, <debug=>);
|
||||
// vnf = rounded_prism(bottom, [top], <height=|h=|length=|l=>, [joint_top=], [joint_bot=], [joint_sides=], [k=], [k_top=], [k_bot=], [k_sides=], [splinesteps=], [debug=]);
|
||||
// Description:
|
||||
// Construct a generalized prism with continuous curvature rounding. You supply the polygons for the top and bottom of the prism. The only
|
||||
// limitation is that joining the edges must produce a valid polyhedron with coplanar side faces. You specify the rounding by giving
|
||||
|
|
118
shapes.scad
118
shapes.scad
|
@ -11,15 +11,15 @@
|
|||
// Module: cuboid()
|
||||
//
|
||||
// Usage: Standard Cubes
|
||||
// cuboid(size, <anchor=>, <spin=>, <orient=>);
|
||||
// cuboid(size, [anchor=], [spin=], [orient=]);
|
||||
// cuboid(size, p1=, ...);
|
||||
// cuboid(p1=, p2=, ...);
|
||||
// Usage: Chamfered Cubes
|
||||
// cuboid(size, <chamfer=>, <edges=>, <except_edges=>, <trimcorners=>, ...);
|
||||
// cuboid(size, [chamfer=], [edges=], [except_edges=], [trimcorners=], ...);
|
||||
// Usage: Rounded Cubes
|
||||
// cuboid(size, <rounding=>, <edges=>, <except_edges=>, <trimcorners=>, ...);
|
||||
// cuboid(size, [rounding=], [edges=], [except_edges=], [trimcorners=], ...);
|
||||
// Usage: Attaching children
|
||||
// cuboid(size, <anchor=>, ...) <attachments>;
|
||||
// cuboid(size, [anchor=], ...) [attachments];
|
||||
//
|
||||
// Description:
|
||||
// Creates a cube or cuboid object, with optional chamfering or rounding.
|
||||
|
@ -371,18 +371,18 @@ function cuboid(
|
|||
// Function&Module: prismoid()
|
||||
//
|
||||
// Usage: Typical Prismoids
|
||||
// prismoid(size1, size2, h|l, <shift>, ...);
|
||||
// prismoid(size1, size2, h|l, [shift], ...);
|
||||
// Usage: Attaching Children
|
||||
// prismoid(size1, size2, h|l, <shift>, ...) <attachments>;
|
||||
// prismoid(size1, size2, h|l, [shift], ...) [attachments];
|
||||
// Usage: Chamfered Prismoids
|
||||
// prismoid(size1, size2, h|l, <chamfer=>, ...);
|
||||
// prismoid(size1, size2, h|l, <chamfer1=>, <chamfer2=>, ...);
|
||||
// prismoid(size1, size2, h|l, [chamfer=], ...);
|
||||
// prismoid(size1, size2, h|l, [chamfer1=], [chamfer2=], ...);
|
||||
// Usage: Rounded Prismoids
|
||||
// prismoid(size1, size2, h|l, <rounding=>, ...);
|
||||
// prismoid(size1, size2, h|l, <rounding1=>, <rounding2=>, ...);
|
||||
// prismoid(size1, size2, h|l, [rounding=], ...);
|
||||
// prismoid(size1, size2, h|l, [rounding1=], [rounding2=], ...);
|
||||
// Usage: As Function
|
||||
// vnf = prismoid(size1, size2, h|l, <shift>, <rounding>, <chamfer>);
|
||||
// vnf = prismoid(size1, size2, h|l, <shift>, <rounding1>, <rounding2>, <chamfer1>, <chamfer2>);
|
||||
// vnf = prismoid(size1, size2, h|l, [shift], [rounding], [chamfer]);
|
||||
// vnf = prismoid(size1, size2, h|l, [shift], [rounding1], [rounding2], [chamfer1], [chamfer2]);
|
||||
//
|
||||
// Description:
|
||||
// Creates a rectangular prismoid shape with optional roundovers and chamfering.
|
||||
|
@ -572,9 +572,9 @@ function prismoid(
|
|||
|
||||
// Module: rect_tube()
|
||||
// Usage: Typical Rectangular Tubes
|
||||
// rect_tube(h, size, isize, <center>, <shift>);
|
||||
// rect_tube(h, size, wall=, <center=>);
|
||||
// rect_tube(h, isize=, wall=, <center=>);
|
||||
// rect_tube(h, size, isize, [center], [shift]);
|
||||
// rect_tube(h, size, wall=, [center=]);
|
||||
// rect_tube(h, isize=, wall=, [center=]);
|
||||
// Usage: Tapering Rectangular Tubes
|
||||
// rect_tube(h, size1=, size2=, wall=, ...);
|
||||
// rect_tube(h, isize1=, isize2=, wall=, ...);
|
||||
|
@ -592,7 +592,7 @@ function prismoid(
|
|||
// rect_tube(h, size, isize, irounding1=, irounding2= ...);
|
||||
// rect_tube(h, size, isize, rounding=, irounding=, ...);
|
||||
// Usage: Attaching Children
|
||||
// rect_tube(h, size, isize, ...) <attachments>;
|
||||
// rect_tube(h, size, isize, ...) [attachments];
|
||||
//
|
||||
// Description:
|
||||
// Creates a rectangular or prismoid tube with optional roundovers and/or chamfers.
|
||||
|
@ -766,7 +766,7 @@ function rect_tube(
|
|||
// Module: right_triangle()
|
||||
//
|
||||
// Usage:
|
||||
// right_triangle(size, <center>);
|
||||
// right_triangle(size, [center]);
|
||||
//
|
||||
// Description:
|
||||
// Creates a 3D right triangular prism with the hypotenuse in the X+Y+ quadrant.
|
||||
|
@ -816,16 +816,16 @@ function right_triangle(size=[1,1,1], center, anchor, spin=0, orient=UP) =
|
|||
// the cylinder's length.
|
||||
//
|
||||
// Usage: Normal Cylinders
|
||||
// cyl(l|h, r, <center>, <circum=>, <realign=>);
|
||||
// cyl(l|h, r, [center], [circum=], [realign=]);
|
||||
// cyl(l|h, d=, ...);
|
||||
// cyl(l|h, r1=, r2=, ...);
|
||||
// cyl(l|h, d1=, d2=, ...);
|
||||
//
|
||||
// Usage: Chamferred Cylinders
|
||||
// cyl(l|h, r|d, chamfer=, <chamfang=>, <from_end=>, ...);
|
||||
// cyl(l|h, r|d, chamfer1=, <chamfang1=>, <from_end=>, ...);
|
||||
// cyl(l|h, r|d, chamfer2=, <chamfang2=>, <from_end=>, ...);
|
||||
// cyl(l|h, r|d, chamfer1=, chamfer2=, <chamfang1=>, <chamfang2=>, <from_end=>, ...);
|
||||
// cyl(l|h, r|d, chamfer=, [chamfang=], [from_end=], ...);
|
||||
// cyl(l|h, r|d, chamfer1=, [chamfang1=], [from_end=], ...);
|
||||
// cyl(l|h, r|d, chamfer2=, [chamfang2=], [from_end=], ...);
|
||||
// cyl(l|h, r|d, chamfer1=, chamfer2=, [chamfang1=], [chamfang2=], [from_end=], ...);
|
||||
//
|
||||
// Usage: Rounded End Cylinders
|
||||
// cyl(l|h, r|d, rounding=, ...);
|
||||
|
@ -1016,11 +1016,11 @@ module cyl(
|
|||
// Creates a cylinder oriented along the X axis.
|
||||
//
|
||||
// Usage: Typical
|
||||
// xcyl(l|h, r, <anchor=>);
|
||||
// xcyl(l|h, d=, <anchor=>);
|
||||
// xcyl(l|h, r1=|d1=, r2=|d2=, <anchor=>);
|
||||
// xcyl(l|h, r, [anchor=]);
|
||||
// xcyl(l|h, d=, [anchor=]);
|
||||
// xcyl(l|h, r1=|d1=, r2=|d2=, [anchor=]);
|
||||
// Usage: Attaching Children
|
||||
// xcyl(l|h, r, <anchor=>) <attachments>;
|
||||
// xcyl(l|h, r, [anchor=]) [attachments];
|
||||
//
|
||||
// Arguments:
|
||||
// l / h = Length of cylinder along oriented axis. Default: 1
|
||||
|
@ -1063,11 +1063,11 @@ module xcyl(h, r, d, r1, r2, d1, d2, l, anchor=CENTER)
|
|||
// Creates a cylinder oriented along the Y axis.
|
||||
//
|
||||
// Usage: Typical
|
||||
// ycyl(l|h, r, <anchor=>);
|
||||
// ycyl(l|h, d=, <anchor=>);
|
||||
// ycyl(l|h, r1=|d1=, r2=|d2=, <anchor=>);
|
||||
// ycyl(l|h, r, [anchor=]);
|
||||
// ycyl(l|h, d=, [anchor=]);
|
||||
// ycyl(l|h, r1=|d1=, r2=|d2=, [anchor=]);
|
||||
// Usage: Attaching Children
|
||||
// ycyl(l|h, r, <anchor=>) <attachments>;
|
||||
// ycyl(l|h, r, [anchor=]) [attachments];
|
||||
//
|
||||
// Arguments:
|
||||
// l / h = Length of cylinder along oriented axis. (Default: `1.0`)
|
||||
|
@ -1110,11 +1110,11 @@ module ycyl(h, r, d, r1, r2, d1, d2, l, anchor=CENTER)
|
|||
// Creates a cylinder oriented along the Z axis.
|
||||
//
|
||||
// Usage: Typical
|
||||
// zcyl(l|h, r, <anchor=>);
|
||||
// zcyl(l|h, d=, <anchor=>);
|
||||
// zcyl(l|h, r1=|d1=, r2=|d2=, <anchor=>);
|
||||
// zcyl(l|h, r, [anchor=]);
|
||||
// zcyl(l|h, d=, [anchor=]);
|
||||
// zcyl(l|h, r1=|d1=, r2=|d2=, [anchor=]);
|
||||
// Usage: Attaching Children
|
||||
// zcyl(l|h, r, <anchor=>) <attachments>;
|
||||
// zcyl(l|h, r, [anchor=]) [attachments];
|
||||
//
|
||||
// Arguments:
|
||||
// l / h = Length of cylinder along oriented axis. (Default: 1.0)
|
||||
|
@ -1151,15 +1151,15 @@ module zcyl(h, r, d, r1, r2, d1, d2, l, anchor=CENTER)
|
|||
// Makes a hollow tube with the given outer size and wall thickness.
|
||||
//
|
||||
// Usage: Typical
|
||||
// tube(h|l, or, ir, <center>, <realign=>);
|
||||
// tube(h|l, or, ir, [center], [realign=]);
|
||||
// tube(h|l, or=|od=, ir=|id=, ...);
|
||||
// tube(h|l, ir|id, wall, ...);
|
||||
// tube(h|l, or|od, wall, ...);
|
||||
// tube(h|l, ir1|id1, ir2|id2, wall, ...);
|
||||
// tube(h|l, or1|od1, or2|od2, wall, ...);
|
||||
// tube(h|l, ir1|id1, ir2|id2, or1|od1, or2|od2, <realign>);
|
||||
// tube(h|l, ir1|id1, ir2|id2, or1|od1, or2|od2, [realign]);
|
||||
// Usage: Attaching Children
|
||||
// tube(h|l, or, ir, <center>) <attachments>;
|
||||
// tube(h|l, or, ir, [center]) [attachments];
|
||||
//
|
||||
// Arguments:
|
||||
// h / l = height of tube. Default: 1
|
||||
|
@ -1232,14 +1232,14 @@ module tube(
|
|||
// Module: torus()
|
||||
//
|
||||
// Usage: Typical
|
||||
// torus(r_maj|d_maj, r_min|d_min, <center>, ...);
|
||||
// torus(r_maj|d_maj, r_min|d_min, [center], ...);
|
||||
// torus(or|od, ir|id, ...);
|
||||
// torus(r_maj|d_maj, or|od, ...);
|
||||
// torus(r_maj|d_maj, ir|id, ...);
|
||||
// torus(r_min|d_min, or|od, ...);
|
||||
// torus(r_min|d_min, ir|id, ...);
|
||||
// Usage: Attaching Children
|
||||
// torus(or|od, ir|id, ...) <attachments>;;
|
||||
// torus(or|od, ir|id, ...) [attachments];
|
||||
//
|
||||
// Description:
|
||||
// Creates a torus shape.
|
||||
|
@ -1333,11 +1333,11 @@ module torus(
|
|||
|
||||
// Function&Module: spheroid()
|
||||
// Usage: Typical
|
||||
// spheroid(r|d, <circum>, <style>);
|
||||
// spheroid(r|d, [circum], [style]);
|
||||
// Usage: Attaching Children
|
||||
// spheroid(r|d, <circum>, <style>) <attachments>;
|
||||
// spheroid(r|d, [circum], [style]) [attachments];
|
||||
// Usage: As Function
|
||||
// vnf = spheroid(r|d, <circum>, <style>);
|
||||
// vnf = spheroid(r|d, [circum], [style]);
|
||||
// Description:
|
||||
// Creates a spheroid object, with support for anchoring and attachments.
|
||||
// This is a drop-in replacement for the built-in `sphere()` module.
|
||||
|
@ -1559,13 +1559,13 @@ function spheroid(r, style="aligned", d, circum=false, anchor=CENTER, spin=0, or
|
|||
// Makes a teardrop shape in the XZ plane. Useful for 3D printable holes.
|
||||
//
|
||||
// Usage: Typical
|
||||
// teardrop(h|l, r, <ang>, <cap_h>, ...);
|
||||
// teardrop(h|l, d=, <ang=>, <cap_h=>, ...);
|
||||
// teardrop(h|l, r, [ang], [cap_h], ...);
|
||||
// teardrop(h|l, d=, [ang=], [cap_h=], ...);
|
||||
// Usage: Psuedo-Conical
|
||||
// teardrop(h|l, r1=, r2=, <ang=>, <cap_h1=>, <cap_h2=>, ...);
|
||||
// teardrop(h|l, d1=, d2=, <ang=>, <cap_h1=>, <cap_h2=>, ...);
|
||||
// teardrop(h|l, r1=, r2=, [ang=], [cap_h1=], [cap_h2=], ...);
|
||||
// teardrop(h|l, d1=, d2=, [ang=], [cap_h1=], [cap_h2=], ...);
|
||||
// Usage: Attaching Children
|
||||
// teardrop(h|l, r, ...) <attachments>;
|
||||
// teardrop(h|l, r, ...) [attachments];
|
||||
//
|
||||
// Arguments:
|
||||
// h / l = Thickness of teardrop. Default: 1
|
||||
|
@ -1652,12 +1652,12 @@ module teardrop(h, r, ang=45, cap_h, r1, r2, d, d1, d2, cap_h1, cap_h2, l, ancho
|
|||
// Creates a sphere with a conical hat, to make a 3D teardrop.
|
||||
//
|
||||
// Usage:
|
||||
// onion(r|d, <ang>, <cap_h>);
|
||||
// onion(r|d, [ang], [cap_h]);
|
||||
// Usage: Typical
|
||||
// onion(r, <ang>, <cap_h>, ...);
|
||||
// onion(d=, <ang=>, <cap_h=>, ...);
|
||||
// onion(r, [ang], [cap_h], ...);
|
||||
// onion(d=, [ang=], [cap_h=], ...);
|
||||
// Usage: Attaching Children
|
||||
// onion(r, ...) <attachments>;
|
||||
// onion(r, ...) [attachments];
|
||||
//
|
||||
// Arguments:
|
||||
// r = radius of spherical portion of the bottom. Default: 1
|
||||
|
@ -1726,11 +1726,11 @@ module noop(spin=0, orient=UP) attachable(CENTER,spin,orient, d=0.01) {nil(); ch
|
|||
// Creates a pie slice shape.
|
||||
//
|
||||
// Usage: Typical
|
||||
// pie_slice(l|h, r, ang, <center>);
|
||||
// pie_slice(l|h, r, ang, [center]);
|
||||
// pie_slice(l|h, d=, ang=, ...);
|
||||
// pie_slice(l|h, r1=|d1=, r2=|d2=, ang=, ...);
|
||||
// Usage: Attaching Children
|
||||
// pie_slice(l|h, r, ang, ...) <attachments>;
|
||||
// pie_slice(l|h, r, ang, ...) [attachments];
|
||||
//
|
||||
// Arguments:
|
||||
// h / l = height of pie slice.
|
||||
|
@ -1782,10 +1782,10 @@ module pie_slice(
|
|||
// Center this part along the concave edge to be chamfered and union it in.
|
||||
//
|
||||
// Usage: Typical
|
||||
// interior_fillet(l, r, <ang>, <overlap>, ...);
|
||||
// interior_fillet(l, d=, <ang=>, <overlap=>, ...);
|
||||
// interior_fillet(l, r, [ang], [overlap], ...);
|
||||
// interior_fillet(l, d=, [ang=], [overlap=], ...);
|
||||
// Usage: Attaching Children
|
||||
// interior_fillet(l, r, <ang>, <overlap>, ...) <attachments>;
|
||||
// interior_fillet(l, r, [ang], [overlap], ...) [attachments];
|
||||
//
|
||||
// Arguments:
|
||||
// l = Length of edge to fillet.
|
||||
|
@ -1843,11 +1843,11 @@ module interior_fillet(l=1.0, r, ang=90, overlap=0.01, d, anchor=FRONT+LEFT, spi
|
|||
|
||||
// Function&Module: heightfield()
|
||||
// Usage: As Module
|
||||
// heightfield(data, <size>, <bottom>, <maxz>, <xrange>, <yrange>, <style>, <convexity>, ...);
|
||||
// heightfield(data, [size], [bottom], [maxz], [xrange], [yrange], [style], [convexity], ...);
|
||||
// Usage: Attaching Children
|
||||
// heightfield(data, <size>, ...) <attachments>;
|
||||
// heightfield(data, [size], ...) [attachments];
|
||||
// Usage: As Function
|
||||
// vnf = heightfield(data, <size>, <bottom>, <maxz>, <xrange>, <yrange>, <style>, ...);
|
||||
// vnf = heightfield(data, [size], [bottom], [maxz], [xrange], [yrange], [style], ...);
|
||||
// Description:
|
||||
// Given a regular rectangular 2D grid of scalar values, or a function literal, generates a 3D
|
||||
// surface where the height at any given point is the scalar value for that position.
|
||||
|
|
114
shapes2d.scad
114
shapes2d.scad
|
@ -9,8 +9,8 @@
|
|||
|
||||
// Module: stroke()
|
||||
// Usage:
|
||||
// stroke(path, <width>, <closed>, <endcaps>, <endcap_width>, <endcap_length>, <endcap_extent>, <trim>);
|
||||
// stroke(path, <width>, <closed>, <endcap1>, <endcap2>, <endcap_width1>, <endcap_width2>, <endcap_length1>, <endcap_length2>, <endcap_extent1>, <endcap_extent2>, <trim1>, <trim2>);
|
||||
// stroke(path, [width], [closed], [endcaps], [endcap_width], [endcap_length], [endcap_extent], [trim]);
|
||||
// stroke(path, [width], [closed], [endcap1], [endcap2], [endcap_width1], [endcap_width2], [endcap_length1], [endcap_length2], [endcap_extent1], [endcap_extent2], [trim1], [trim2]);
|
||||
// Topics: Paths (2D), Paths (3D), Drawing Tools
|
||||
// Description:
|
||||
// Draws a 2D or 3D path with a given line width. Endcaps can be specified for each end individually.
|
||||
|
@ -427,9 +427,9 @@ module stroke(
|
|||
|
||||
// Function&Module: dashed_stroke()
|
||||
// Usage: As a Module
|
||||
// dashed_stroke(path, dashpat, <closed=>);
|
||||
// dashed_stroke(path, dashpat, [closed=]);
|
||||
// Usage: As a Function
|
||||
// dashes = dashed_stroke(path, dashpat, width=, <closed=>);
|
||||
// dashes = dashed_stroke(path, dashpat, width=, [closed=]);
|
||||
// Topics: Paths, Drawing Tools
|
||||
// See Also: stroke(), path_cut()
|
||||
// Description:
|
||||
|
@ -489,7 +489,7 @@ module dashed_stroke(path, dashpat=[3,3], width=1, closed=false) {
|
|||
// Usage: 2D circle segment by `width` and `thickness`, starting and ending on the X axis.
|
||||
// arc(N, width=, thickness=)
|
||||
// Usage: Shortest 2D or 3D arc around centerpoint `cp`, starting at P0 and ending on the vector pointing from `cp` to `P1`.
|
||||
// arc(N, cp=, points=[P0,P1], <long=>, <cw=>, <ccw=>)
|
||||
// arc(N, cp=, points=[P0,P1], [long=], [cw=], [ccw=])
|
||||
// Usage: 2D or 3D arc, starting at `P0`, passing through `P1` and ending at `P2`.
|
||||
// arc(N, points=[P0,P1,P2])
|
||||
// Topics: Paths (2D), Paths (3D), Shapes (2D), Path Generators
|
||||
|
@ -628,7 +628,7 @@ function _normal_segment(p1,p2) =
|
|||
|
||||
// Function: turtle()
|
||||
// Usage:
|
||||
// turtle(commands, <state>, <full_state=>, <repeat=>)
|
||||
// turtle(commands, [state], [full_state=], [repeat=])
|
||||
// Topics: Shapes (2D), Path Generators (2D), Mini-Language
|
||||
// See Also: turtle3d()
|
||||
// Description:
|
||||
|
@ -890,11 +890,11 @@ function _turtle_command(command, parm, parm2, state, index) =
|
|||
|
||||
// Function&Module: rect()
|
||||
// Usage: As Module
|
||||
// rect(size, <center>, <rounding>, <chamfer>, ...);
|
||||
// rect(size, [center], [rounding], [chamfer], ...);
|
||||
// Usage: With Attachments
|
||||
// rect(size, <center>, ...) { attachables }
|
||||
// rect(size, [center], ...) { attachables }
|
||||
// Usage: As Function
|
||||
// path = rect(size, <center>, <rounding>, <chamfer>, ...);
|
||||
// path = rect(size, [center], [rounding], [chamfer], ...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: square()
|
||||
// Description:
|
||||
|
@ -994,7 +994,7 @@ function rect(size=1, center, rounding=0, chamfer=0, anchor, spin=0) =
|
|||
|
||||
// Function&Module: oval()
|
||||
// Usage:
|
||||
// oval(r|d=, <realign=>, <circum=>)
|
||||
// oval(r|d=, [realign=], [circum=])
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle()
|
||||
// Description:
|
||||
|
@ -1060,9 +1060,9 @@ function oval(r, d, realign=false, circum=false, anchor=CENTER, spin=0) =
|
|||
|
||||
// Function&Module: regular_ngon()
|
||||
// Usage:
|
||||
// regular_ngon(n, r/d=/or=/od=, <realign=>);
|
||||
// regular_ngon(n, ir=/id=, <realign=>);
|
||||
// regular_ngon(n, side=, <realign=>);
|
||||
// regular_ngon(n, r/d=/or=/od=, [realign=]);
|
||||
// regular_ngon(n, ir=/id=, [realign=]);
|
||||
// regular_ngon(n, side=, [realign=]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), pentagon(), hexagon(), octagon(), oval(), star()
|
||||
// Description:
|
||||
|
@ -1196,9 +1196,9 @@ module regular_ngon(n=6, r, d, or, od, ir, id, side, rounding=0, realign=false,
|
|||
|
||||
// Function&Module: pentagon()
|
||||
// Usage:
|
||||
// pentagon(or|od=, <realign=>);
|
||||
// pentagon(ir=|id=, <realign=>);
|
||||
// pentagon(side=, <realign=>);
|
||||
// pentagon(or|od=, [realign=]);
|
||||
// pentagon(ir=|id=, [realign=]);
|
||||
// pentagon(side=, [realign=]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), regular_ngon(), hexagon(), octagon(), oval(), star()
|
||||
// Description:
|
||||
|
@ -1252,7 +1252,7 @@ module pentagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip
|
|||
|
||||
// Function&Module: hexagon()
|
||||
// Usage: As Module
|
||||
// hexagon(r/or, <realign=>, <align_tip=|align_side=>, <rounding=>, ...);
|
||||
// hexagon(r/or, [realign=], <align_tip=|align_side=>, [rounding=], ...);
|
||||
// hexagon(d=/od=, ...);
|
||||
// hexagon(ir=/id=, ...);
|
||||
// hexagon(side=, ...);
|
||||
|
@ -1316,7 +1316,7 @@ module hexagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip,
|
|||
|
||||
// Function&Module: octagon()
|
||||
// Usage: As Module
|
||||
// octagon(r/or, <realign=>, <align_tip=|align_side=>, <rounding=>, ...);
|
||||
// octagon(r/or, [realign=], <align_tip=|align_side=>, [rounding=], ...);
|
||||
// octagon(d=/od=, ...);
|
||||
// octagon(ir=/id=, ...);
|
||||
// octagon(side=, ...);
|
||||
|
@ -1383,7 +1383,7 @@ module octagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip,
|
|||
|
||||
// Function&Module: trapezoid()
|
||||
// Usage: As Module
|
||||
// trapezoid(h, w1, w2, <shift=>, <rounding=>, <chamfer=>, ...);
|
||||
// trapezoid(h, w1, w2, [shift=], [rounding=], [chamfer=], ...);
|
||||
// trapezoid(h, w1, angle=, ...);
|
||||
// trapezoid(h, w2, angle=, ...);
|
||||
// trapezoid(w1, w2, angle=, ...);
|
||||
|
@ -1492,11 +1492,11 @@ module trapezoid(h, w1, w2, angle, shift=0, chamfer=0, rounding=0, anchor=CENTER
|
|||
// Makes a 2D teardrop shape. Useful for extruding into 3D printable holes.
|
||||
//
|
||||
// Usage: As Module
|
||||
// teardrop2d(r/d=, <ang>, <cap_h>);
|
||||
// teardrop2d(r/d=, [ang], [cap_h]);
|
||||
// Usage: With Attachments
|
||||
// teardrop2d(r/d=, <ang>, <cap_h>, ...) { attachments }
|
||||
// teardrop2d(r/d=, [ang], [cap_h], ...) { attachments }
|
||||
// Usage: As Function
|
||||
// path = teardrop2d(r/d=, <ang>, <cap_h>);
|
||||
// path = teardrop2d(r/d=, [ang], [cap_h]);
|
||||
//
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
//
|
||||
|
@ -1556,11 +1556,11 @@ function teardrop2d(r, ang=45, cap_h, d, anchor=CENTER, spin=0) =
|
|||
|
||||
// Function&Module: glued_circles()
|
||||
// Usage: As Module
|
||||
// glued_circles(r/d=, <spread=>, <tangent=>, ...);
|
||||
// glued_circles(r/d=, [spread=], [tangent=], ...);
|
||||
// Usage: With Attachments
|
||||
// glued_circles(r/d=, <spread=>, <tangent=>, ...) { attachments }
|
||||
// glued_circles(r/d=, [spread=], [tangent=], ...) { attachments }
|
||||
// Usage: As Function
|
||||
// path = glued_circles(r/d=, <spread=>, <tangent=>, ...);
|
||||
// path = glued_circles(r/d=, [spread=], [tangent=], ...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), oval()
|
||||
// Description:
|
||||
|
@ -1619,12 +1619,12 @@ module glued_circles(r, spread=10, tangent=30, d, anchor=CENTER, spin=0) {
|
|||
|
||||
// Function&Module: star()
|
||||
// Usage: As Module
|
||||
// star(n, r/or, ir, <realign=>, <align_tip=>, <align_pit=>, ...);
|
||||
// star(n, r/or, ir, [realign=], [align_tip=], [align_pit=], ...);
|
||||
// star(n, r/or, step=, ...);
|
||||
// Usage: With Attachments
|
||||
// star(n, r/or, ir, ...) { attachments }
|
||||
// Usage: As Function
|
||||
// path = star(n, r/or, ir, <realign=>, <align_tip=>, <align_pit=>, ...);
|
||||
// path = star(n, r/or, ir, [realign=], [align_tip=], [align_pit=], ...);
|
||||
// path = star(n, r/or, step=, ...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), oval()
|
||||
|
@ -1748,11 +1748,11 @@ function _superformula(theta,m1,m2,n1,n2=1,n3=1,a=1,b=1) =
|
|||
|
||||
// Function&Module: supershape()
|
||||
// Usage: As Module
|
||||
// supershape(step, <m1=>, <m2=>, <n1=>, <n2=>, <n3=>, <a=>, <b=>, <r=/d=>);
|
||||
// supershape(step, [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], <r=/d=>);
|
||||
// Usage: With Attachments
|
||||
// supershape(step, <m1=>, <m2=>, <n1=>, <n2=>, <n3=>, <a=>, <b=>, <r=/d=>) { attachments }
|
||||
// supershape(step, [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], <r=/d=>) { attachments }
|
||||
// Usage: As Function
|
||||
// path = supershape(step, <m1=>, <m2=>, <n1=>, <n2=>, <n3=>, <a=>, <b=>, <r=/d=>);
|
||||
// path = supershape(step, [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], <r=/d=>);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), oval()
|
||||
// Description:
|
||||
|
@ -1890,11 +1890,11 @@ function reuleaux_polygon(N=3, r, d, anchor=CENTER, spin=0) =
|
|||
|
||||
// Function&Module: mask2d_roundover()
|
||||
// Usage: As Module
|
||||
// mask2d_roundover(r|d, <inset>, <excess>);
|
||||
// mask2d_roundover(r|d, [inset], [excess]);
|
||||
// Usage: With Attachments
|
||||
// mask2d_roundover(r|d, <inset>, <excess>) { attachments }
|
||||
// mask2d_roundover(r|d, [inset], [excess]) { attachments }
|
||||
// Usage: As Module
|
||||
// path = mask2d_roundover(r|d, <inset>, <excess>);
|
||||
// path = mask2d_roundover(r|d, [inset], [excess]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D)
|
||||
// See Also: corner_profile(), edge_profile(), face_profile()
|
||||
// Description:
|
||||
|
@ -1947,11 +1947,11 @@ function mask2d_roundover(r, inset=0, excess=0.01, d, anchor=CENTER,spin=0) =
|
|||
|
||||
// Function&Module: mask2d_cove()
|
||||
// Usage: As Module
|
||||
// mask2d_cove(r|d, <inset>, <excess>);
|
||||
// mask2d_cove(r|d, [inset], [excess]);
|
||||
// Usage: With Attachments
|
||||
// mask2d_cove(r|d, <inset>, <excess>) { attachments }
|
||||
// mask2d_cove(r|d, [inset], [excess]) { attachments }
|
||||
// Usage: As Function
|
||||
// path = mask2d_cove(r|d, <inset>, <excess>);
|
||||
// path = mask2d_cove(r|d, [inset], [excess]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D)
|
||||
// See Also: corner_profile(), edge_profile(), face_profile()
|
||||
// Description:
|
||||
|
@ -2004,15 +2004,15 @@ function mask2d_cove(r, inset=0, excess=0.01, d, anchor=CENTER,spin=0) =
|
|||
|
||||
// Function&Module: mask2d_chamfer()
|
||||
// Usage: As Module
|
||||
// mask2d_chamfer(edge, <angle>, <inset>, <excess>);
|
||||
// mask2d_chamfer(y, <angle>, <inset>, <excess>);
|
||||
// mask2d_chamfer(x, <angle>, <inset>, <excess>);
|
||||
// mask2d_chamfer(edge, [angle], [inset], [excess]);
|
||||
// mask2d_chamfer(y, [angle], [inset], [excess]);
|
||||
// mask2d_chamfer(x, [angle], [inset], [excess]);
|
||||
// Usage: With Attachments
|
||||
// mask2d_chamfer(edge, <angle>, <inset>, <excess>) { attachments }
|
||||
// mask2d_chamfer(edge, [angle], [inset], [excess]) { attachments }
|
||||
// Usage: As Function
|
||||
// path = mask2d_chamfer(edge, <angle>, <inset>, <excess>);
|
||||
// path = mask2d_chamfer(y, <angle>, <inset>, <excess>);
|
||||
// path = mask2d_chamfer(x, <angle>, <inset>, <excess>);
|
||||
// path = mask2d_chamfer(edge, [angle], [inset], [excess]);
|
||||
// path = mask2d_chamfer(y, [angle], [inset], [excess]);
|
||||
// path = mask2d_chamfer(x, [angle], [inset], [excess]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D)
|
||||
// See Also: corner_profile(), edge_profile(), face_profile()
|
||||
// Description:
|
||||
|
@ -2075,11 +2075,11 @@ function mask2d_chamfer(edge, angle=45, inset=0, excess=0.01, x, y, anchor=CENTE
|
|||
|
||||
// Function&Module: mask2d_rabbet()
|
||||
// Usage: As Module
|
||||
// mask2d_rabbet(size, <excess>);
|
||||
// mask2d_rabbet(size, [excess]);
|
||||
// Usage: With Attachments
|
||||
// mask2d_rabbet(size, <excess>) { attachments }
|
||||
// mask2d_rabbet(size, [excess]) { attachments }
|
||||
// Usage: As Function
|
||||
// path = mask2d_rabbet(size, <excess>);
|
||||
// path = mask2d_rabbet(size, [excess]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D)
|
||||
// See Also: corner_profile(), edge_profile(), face_profile()
|
||||
// Description:
|
||||
|
@ -2126,13 +2126,13 @@ function mask2d_rabbet(size, excess=0.01, anchor=CENTER,spin=0) =
|
|||
|
||||
// Function&Module: mask2d_dovetail()
|
||||
// Usage: As Module
|
||||
// mask2d_dovetail(edge, <angle>, <inset>, <shelf>, <excess>, ...);
|
||||
// mask2d_dovetail(x=, <angle=>, <inset=>, <shelf=>, <excess=>, ...);
|
||||
// mask2d_dovetail(y=, <angle=>, <inset=>, <shelf=>, <excess=>, ...);
|
||||
// mask2d_dovetail(edge, [angle], [inset], [shelf], [excess], ...);
|
||||
// mask2d_dovetail(x=, [angle=], [inset=], [shelf=], [excess=], ...);
|
||||
// mask2d_dovetail(y=, [angle=], [inset=], [shelf=], [excess=], ...);
|
||||
// Usage: With Attachments
|
||||
// mask2d_dovetail(edge, <angle>, <inset>, <shelf>, ...) { attachments }
|
||||
// mask2d_dovetail(edge, [angle], [inset], [shelf], ...) { attachments }
|
||||
// Usage: As Function
|
||||
// path = mask2d_dovetail(edge, <angle>, <inset>, <shelf>, <excess>);
|
||||
// path = mask2d_dovetail(edge, [angle], [inset], [shelf], [excess]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D)
|
||||
// See Also: corner_profile(), edge_profile(), face_profile()
|
||||
// Description:
|
||||
|
@ -2197,11 +2197,11 @@ function mask2d_dovetail(edge, angle=30, inset=0, shelf=0, excess=0.01, x, y, an
|
|||
|
||||
// Function&Module: mask2d_teardrop()
|
||||
// Usage: As Module
|
||||
// mask2d_teardrop(r|d, <angle>, <excess>);
|
||||
// mask2d_teardrop(r|d, [angle], [excess]);
|
||||
// Usage: With Attachments
|
||||
// mask2d_teardrop(r|d, <angle>, <excess>) { attachments }
|
||||
// mask2d_teardrop(r|d, [angle], [excess]) { attachments }
|
||||
// Usage: As Function
|
||||
// path = mask2d_teardrop(r|d, <angle>, <excess>);
|
||||
// path = mask2d_teardrop(r|d, [angle], [excess]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D)
|
||||
// See Also: corner_profile(), edge_profile(), face_profile()
|
||||
// Description:
|
||||
|
@ -2253,11 +2253,11 @@ module mask2d_teardrop(r, angle=45, excess=0.01, d, anchor=CENTER, spin=0) {
|
|||
|
||||
// Function&Module: mask2d_ogee()
|
||||
// Usage: As Module
|
||||
// mask2d_ogee(pattern, <excess>, ...);
|
||||
// mask2d_ogee(pattern, [excess], ...);
|
||||
// Usage: With Attachments
|
||||
// mask2d_ogee(pattern, <excess>, ...) { attachments }
|
||||
// mask2d_ogee(pattern, [excess], ...) { attachments }
|
||||
// Usage: As Function
|
||||
// path = mask2d_ogee(pattern, <excess>, ...);
|
||||
// path = mask2d_ogee(pattern, [excess], ...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D)
|
||||
// See Also: corner_profile(), edge_profile(), face_profile()
|
||||
//
|
||||
|
|
22
skin.scad
22
skin.scad
|
@ -12,9 +12,9 @@
|
|||
|
||||
// Function&Module: skin()
|
||||
// Usage: As module:
|
||||
// skin(profiles, slices, <z=>, <refine=>, <method=>, <sampling=>, <caps=>, <closed=>, <style=>, <convexity=>, <anchor=>,<cp=>,<spin=>,<orient=>,<extent=>) <attachments>;
|
||||
// skin(profiles, slices, [z=], [refine=], [method=], [sampling=], [caps=], [closed=], [style=], [convexity=], [anchor=],[cp=],[spin=],[orient=],[extent=]) [attachments];
|
||||
// Usage: As function:
|
||||
// vnf = skin(profiles, slices, <z=>, <refine=>, <method=>, <sampling=>, <caps=>, <closed=>, <style=>);
|
||||
// vnf = skin(profiles, slices, [z=], [refine=], [method=], [sampling=], [caps=], [closed=], [style=]);
|
||||
// Description:
|
||||
// Given a list of two or more path `profiles` in 3d space, produces faces to skin a surface between
|
||||
// the profiles. Optionally the first and last profiles can have endcaps, or the first and last profiles
|
||||
|
@ -540,7 +540,7 @@ function _skin_core(profiles, caps) =
|
|||
// Function: subdivide_and_slice()
|
||||
// Topics: Paths, Path Subdivision
|
||||
// Usage:
|
||||
// newprof = subdivide_and_slice(profiles, slices, <numpoints>, <method>, <closed>);
|
||||
// newprof = subdivide_and_slice(profiles, slices, [numpoints], [method], [closed]);
|
||||
// Description:
|
||||
// Subdivides the input profiles to have length `numpoints` where `numpoints` must be at least as
|
||||
// big as the largest input profile. By default `numpoints` is set equal to the length of the
|
||||
|
@ -570,7 +570,7 @@ function subdivide_and_slice(profiles, slices, numpoints, method="length", close
|
|||
// Topics: Paths, Path Subdivision
|
||||
// See Also: subdivide_path(), subdivide_and_slice(), path_add_jitter(), jittered_poly()
|
||||
// Usage:
|
||||
// spath = subdivide_long_segments(path, maxlen, <closed=>);
|
||||
// spath = subdivide_long_segments(path, maxlen, [closed=]);
|
||||
// Description:
|
||||
// Evenly subdivides long `path` segments until they are all shorter than `maxlen`.
|
||||
// Arguments:
|
||||
|
@ -600,7 +600,7 @@ function subdivide_long_segments(path, maxlen, closed=false) =
|
|||
// Function: slice_profiles()
|
||||
// Topics: Paths, Path Subdivision
|
||||
// Usage:
|
||||
// profs = slice_profiles(profiles, slices, <closed>);
|
||||
// profs = slice_profiles(profiles, slices, [closed]);
|
||||
// Description:
|
||||
// Given an input list of profiles, linearly interpolate between each pair to produce a
|
||||
// more finely sampled list. The parameters `slices` specifies the number of slices to
|
||||
|
@ -905,9 +905,9 @@ function associate_vertices(polygons, split, curpoly=0) =
|
|||
|
||||
// Function&Module: sweep()
|
||||
// Usage: As Module
|
||||
// sweep(shape, transforms, <closed>, <caps>, <style>, <convexity=>, <anchor=>, <spin=>, <orient=>, <extent=>) <attachments>;
|
||||
// sweep(shape, transforms, [closed], [caps], [style], [convexity=], [anchor=], [spin=], [orient=], [extent=]) [attachments];
|
||||
// Usage: As Function
|
||||
// vnf = sweep(shape, transforms, <closed>, <caps>, <style>);
|
||||
// vnf = sweep(shape, transforms, [closed], [caps], [style]);
|
||||
// Description:
|
||||
// The input `shape` must be a non-self-intersecting 2D polygon or region, and `transforms`
|
||||
// is a list of 4x4 transformation matrices. The sweep algorithm applies each transformation in sequence
|
||||
|
@ -1000,9 +1000,9 @@ module sweep(shape, transforms, closed=false, caps, style="min_edge", convexity=
|
|||
|
||||
// Function&Module: path_sweep()
|
||||
// Usage: As module
|
||||
// path_sweep(shape, path, <method>, <normal=>, <closed=>, <twist=>, <twist_by_length=>, <symmetry=>, <last_normal=>, <tangent=>, <relaxed=>, <caps=>, <style=>, <convexity=>, <transforms=>, <anchor=>, <cp=>, <spin=>, <orient=>, <extent=>) <attachments>;
|
||||
// path_sweep(shape, path, [method], [normal=], [closed=], [twist=], [twist_by_length=], [symmetry=], [last_normal=], [tangent=], [relaxed=], [caps=], [style=], [convexity=], [transforms=], [anchor=], [cp=], [spin=], [orient=], [extent=]) [attachments];
|
||||
// Usage: As function
|
||||
// vnf = path_sweep(shape, path, <method>, <normal=>, <closed=>, <twist=>, <twist_by_length=>, <symmetry=>, <last_normal=>, <tangent=>, <relaxed=>, <caps=>, <style=>, <convexity=>, <transforms=>);
|
||||
// vnf = path_sweep(shape, path, [method], [normal=], [closed=], [twist=], [twist_by_length=], [symmetry=], [last_normal=], [tangent=], [relaxed=], [caps=], [style=], [convexity=], [transforms=]);
|
||||
// Description:
|
||||
// Takes as input a 2D polygon path, and a 2d or 3d path and constructs a polyhedron by sweeping the shape along the path.
|
||||
// When run as a module returns the polyhedron geometry. When run as a function returns a VNF by default or if you set `transforms=true`
|
||||
|
@ -1418,9 +1418,9 @@ function path_sweep(shape, path, method="incremental", normal, closed=false, twi
|
|||
|
||||
// Function&Module: path_sweep2d()
|
||||
// Usage: as module
|
||||
// path_sweep2d(shape, path, <closed>, <caps>, <quality>, <style>, <convexity=>, <anchor=>, <spin=>, <orient=>, <extent=>, <cp=>) <attachments>;
|
||||
// path_sweep2d(shape, path, [closed], [caps], [quality], [style], [convexity=], [anchor=], [spin=], [orient=], [extent=], [cp=]) [attachments];
|
||||
// Usage: as function
|
||||
// vnf = path_sweep2d(shape, path, <closed>, <caps>, <quality>, <style>);
|
||||
// vnf = path_sweep2d(shape, path, [closed], [caps], [quality], [style]);
|
||||
// Description:
|
||||
// Takes an input 2D polygon (the shape) and a 2d path and constructs a polyhedron by sweeping the shape along the path.
|
||||
// When run as a module returns the polyhedron geometry. When run as a function returns a VNF.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
// Module: thread_helix()
|
||||
// Usage:
|
||||
// thread_helix(d, pitch, thread_depth, <thread_angle>, <twist>, <profile=>, <left_handed=>, <higbee=>, <internal=>);
|
||||
// thread_helix(d, pitch, thread_depth, [thread_angle], [twist], [profile=], [left_handed=], [higbee=], [internal=]);
|
||||
// Description:
|
||||
// Creates a helical thread with optional end tapering.
|
||||
// Arguments:
|
||||
|
|
136
transforms.scad
136
transforms.scad
|
@ -15,14 +15,14 @@
|
|||
// Aliases: translate()
|
||||
//
|
||||
// Usage: As Module
|
||||
// move(<x=>, <y=>, <z=>) ...
|
||||
// move([x=], [y=], [z=]) ...
|
||||
// move(v) ...
|
||||
// Usage: Translate Points
|
||||
// pts = move(v, p);
|
||||
// pts = move(<x=>, <y=>, <z=>, p=);
|
||||
// pts = move([x=], [y=], [z=], p=);
|
||||
// Usage: Get Translation Matrix
|
||||
// mat = move(v);
|
||||
// mat = move(<x=>, <y=>, <z=>);
|
||||
// mat = move([x=], [y=], [z=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Translation
|
||||
// See Also: left(), right(), fwd(), back(), down(), up(), affine2d_translate(), affine3d_translate()
|
||||
|
@ -325,20 +325,20 @@ function up(z=0, p) = move([0,0,z],p=p);
|
|||
// Function&Module: rot()
|
||||
//
|
||||
// Usage: As a Module
|
||||
// rot(a, <cp>, <reverse>) {...}
|
||||
// rot([X,Y,Z], <cp>, <reverse>) {...}
|
||||
// rot(a, v, <cp>, <reverse>) {...}
|
||||
// rot(from, to, <a>, <reverse>) {...}
|
||||
// rot(a, [cp], [reverse]) {...}
|
||||
// rot([X,Y,Z], [cp], [reverse]) {...}
|
||||
// rot(a, v, [cp], [reverse]) {...}
|
||||
// rot(from, to, [a], [reverse]) {...}
|
||||
// Usage: As a Function to transform data in `p`
|
||||
// pts = rot(a, p=, <cp=>, <reverse=>);
|
||||
// pts = rot([X,Y,Z], p=, <cp=>, <reverse=>);
|
||||
// pts = rot(a, v, p=, <cp=>, <reverse=>);
|
||||
// pts = rot(<a>, from=, to=, p=, <reverse=>);
|
||||
// pts = rot(a, p=, [cp=], [reverse=]);
|
||||
// pts = rot([X,Y,Z], p=, [cp=], [reverse=]);
|
||||
// pts = rot(a, v, p=, [cp=], [reverse=]);
|
||||
// pts = rot([a], from=, to=, p=, [reverse=]);
|
||||
// Usage: As a Function to return a transform matrix
|
||||
// M = rot(a, <cp=>, <reverse=>, <planar=>);
|
||||
// M = rot([X,Y,Z], <cp=>, <reverse=>, <planar=>);
|
||||
// M = rot(a, v, <cp=>, <reverse=>, <planar=>);
|
||||
// M = rot(from=, to=, <a=>, <reverse=>, <planar=>);
|
||||
// M = rot(a, [cp=], [reverse=], [planar=]);
|
||||
// M = rot([X,Y,Z], [cp=], [reverse=], [planar=]);
|
||||
// M = rot(a, v, [cp=], [reverse=], [planar=]);
|
||||
// M = rot(from=, to=, [a=], [reverse=], [planar=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: xrot(), yrot(), zrot(), affine2d_zrot(), affine3d_xrot(), affine3d_yrot(), affine3d_zrot(), affine3d_rot_by_axis(), affine3d_rot_from_to()
|
||||
|
@ -452,11 +452,11 @@ function rot(a=0, v, cp, from, to, reverse=false, planar=false, p, _m) =
|
|||
// Function&Module: xrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xrot(a, <cp=>) ...
|
||||
// xrot(a, [cp=]) ...
|
||||
// Usage: As a function to rotate points
|
||||
// rotated = xrot(a, p, <cp=>);
|
||||
// rotated = xrot(a, p, [cp=]);
|
||||
// Usage: As a function to return rotation matrix
|
||||
// mat = xrot(a, <cp=>);
|
||||
// mat = xrot(a, [cp=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: rot(), yrot(), zrot(), affine2d_zrot(), affine3d_xrot(), affine3d_yrot(), affine3d_zrot()
|
||||
|
@ -498,11 +498,11 @@ function xrot(a=0, p, cp) = rot([a,0,0], cp=cp, p=p);
|
|||
// Function&Module: yrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// yrot(a, <cp=>) ...
|
||||
// yrot(a, [cp=]) ...
|
||||
// Usage: Rotate Points
|
||||
// rotated = yrot(a, p, <cp=>);
|
||||
// rotated = yrot(a, p, [cp=]);
|
||||
// Usage: Get Rotation Matrix
|
||||
// mat = yrot(a, <cp=>);
|
||||
// mat = yrot(a, [cp=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: rot(), xrot(), zrot(), affine2d_zrot(), affine3d_xrot(), affine3d_yrot(), affine3d_zrot()
|
||||
|
@ -544,11 +544,11 @@ function yrot(a=0, p, cp) = rot([0,a,0], cp=cp, p=p);
|
|||
// Function&Module: zrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// zrot(a, <cp=>) ...
|
||||
// zrot(a, [cp=]) ...
|
||||
// Usage: As Function to rotate points
|
||||
// rotated = zrot(a, p, <cp=>);
|
||||
// rotated = zrot(a, p, [cp=]);
|
||||
// Usage: As Function to return rotation matrix
|
||||
// mat = zrot(a, <cp=>);
|
||||
// mat = zrot(a, [cp=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: rot(), xrot(), yrot(), affine2d_zrot(), affine3d_xrot(), affine3d_yrot(), affine3d_zrot()
|
||||
|
@ -590,11 +590,11 @@ function zrot(a=0, p, cp) = rot(a, cp=cp, p=p);
|
|||
// Function&Module: xyrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xyrot(a, <cp=>) ...
|
||||
// xyrot(a, [cp=]) ...
|
||||
// Usage: As a Function to rotate points
|
||||
// rotated = xyrot(a, p, <cp=>);
|
||||
// rotated = xyrot(a, p, [cp=]);
|
||||
// Usage: As a Function to get rotation matrix
|
||||
// mat = xyrot(a, <cp=>);
|
||||
// mat = xyrot(a, [cp=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: rot(), xrot(), yrot(), zrot(), xzrot(), yzrot(), xyzrot(), affine3d_rot_by_axis()
|
||||
|
@ -634,11 +634,11 @@ function xyrot(a=0, p, cp) = rot(a=a, v=[1,1,0], cp=cp, p=p);
|
|||
// Function&Module: xzrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xzrot(a, <cp=>) ...
|
||||
// xzrot(a, [cp=]) ...
|
||||
// Usage: As Function to rotate points
|
||||
// rotated = xzrot(a, p, <cp=>);
|
||||
// rotated = xzrot(a, p, [cp=]);
|
||||
// Usage: As Function to return rotation matrix
|
||||
// mat = xzrot(a, <cp=>);
|
||||
// mat = xzrot(a, [cp=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: rot(), xrot(), yrot(), zrot(), xyrot(), yzrot(), xyzrot(), affine3d_rot_by_axis()
|
||||
|
@ -678,11 +678,11 @@ function xzrot(a=0, p, cp) = rot(a=a, v=[1,0,1], cp=cp, p=p);
|
|||
// Function&Module: yzrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// yzrot(a, <cp=>) ...
|
||||
// yzrot(a, [cp=]) ...
|
||||
// Usage: As Function to rotate points
|
||||
// rotated = yzrot(a, p, <cp=>);
|
||||
// rotated = yzrot(a, p, [cp=]);
|
||||
// Usage: As Function to return rotation matrix
|
||||
// mat = yzrot(a, <cp=>);
|
||||
// mat = yzrot(a, [cp=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: rot(), xrot(), yrot(), zrot(), xyrot(), xzrot(), xyzrot(), affine3d_rot_by_axis()
|
||||
|
@ -722,11 +722,11 @@ function yzrot(a=0, p, cp) = rot(a=a, v=[0,1,1], cp=cp, p=p);
|
|||
// Function&Module: xyzrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xyzrot(a, <cp=>) ...
|
||||
// xyzrot(a, [cp=]) ...
|
||||
// Usage: As Function to rotate points
|
||||
// rotated = xyzrot(a, p, <cp=>);
|
||||
// rotated = xyzrot(a, p, [cp=]);
|
||||
// Usage: As Function to return rotation matrix
|
||||
// mat = xyzrot(a, <cp=>);
|
||||
// mat = xyzrot(a, [cp=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Rotation
|
||||
// See Also: rot(), xrot(), yrot(), zrot(), xyrot(), xzrot(), yzrot(), affine3d_rot_by_axis()
|
||||
|
@ -773,9 +773,9 @@ function xyzrot(a=0, p, cp) = rot(a=a, v=[1,1,1], cp=cp, p=p);
|
|||
// scale(SCALAR) ...
|
||||
// scale([X,Y,Z]) ...
|
||||
// Usage: Scale Points
|
||||
// pts = scale(v, p, <cp=>);
|
||||
// pts = scale(v, p, [cp=]);
|
||||
// Usage: Get Scaling Matrix
|
||||
// mat = scale(v, <cp=>);
|
||||
// mat = scale(v, [cp=]);
|
||||
// Topics: Affine, Matrices, Transforms, Scaling
|
||||
// See Also: xscale(), yscale(), zscale(), affine2d_scale(), affine3d_scale()
|
||||
// Description:
|
||||
|
@ -837,11 +837,11 @@ function scale(v=1, p, cp=[0,0,0]) =
|
|||
//
|
||||
//
|
||||
// Usage: As Module
|
||||
// xscale(x, <cp=>) ...
|
||||
// xscale(x, [cp=]) ...
|
||||
// Usage: Scale Points
|
||||
// scaled = xscale(x, p, <cp=>);
|
||||
// scaled = xscale(x, p, [cp=]);
|
||||
// Usage: Get Affine Matrix
|
||||
// mat = xscale(x, <cp=>, <planar=>);
|
||||
// mat = xscale(x, [cp=], [planar=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Scaling
|
||||
// See Also: scale(), yscale(), zscale(), affine2d_scale(), affine3d_scale()
|
||||
|
@ -895,11 +895,11 @@ function xscale(x=1, p, cp=0, planar=false) =
|
|||
// Function&Module: yscale()
|
||||
//
|
||||
// Usage: As Module
|
||||
// yscale(y, <cp=>) ...
|
||||
// yscale(y, [cp=]) ...
|
||||
// Usage: Scale Points
|
||||
// scaled = yscale(y, p, <cp=>);
|
||||
// scaled = yscale(y, p, [cp=]);
|
||||
// Usage: Get Affine Matrix
|
||||
// mat = yscale(y, <cp=>, <planar=>);
|
||||
// mat = yscale(y, [cp=], [planar=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Scaling
|
||||
// See Also: scale(), xscale(), zscale(), affine2d_scale(), affine3d_scale()
|
||||
|
@ -953,11 +953,11 @@ function yscale(y=1, p, cp=0, planar=false) =
|
|||
// Function&Module: zscale()
|
||||
//
|
||||
// Usage: As Module
|
||||
// zscale(z, <cp=>) ...
|
||||
// zscale(z, [cp=]) ...
|
||||
// Usage: Scale Points
|
||||
// scaled = zscale(z, p, <cp=>);
|
||||
// scaled = zscale(z, p, [cp=]);
|
||||
// Usage: Get Affine Matrix
|
||||
// mat = zscale(z, <cp=>);
|
||||
// mat = zscale(z, [cp=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Scaling
|
||||
// See Also: scale(), xscale(), yscale(), affine2d_scale(), affine3d_scale()
|
||||
|
@ -1078,11 +1078,11 @@ function mirror(v, p) =
|
|||
// Function&Module: xflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xflip(<x>) ...
|
||||
// xflip([x]) ...
|
||||
// Usage: As Function
|
||||
// pt = xflip(p, <x>);
|
||||
// pt = xflip(p, [x]);
|
||||
// Usage: Get Affine Matrix
|
||||
// pt = xflip(<x>, <planar=>);
|
||||
// pt = xflip([x], [planar=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Reflection, Mirroring
|
||||
// See Also: mirror(), yflip(), zflip(), affine2d_mirror(), affine3d_mirror()
|
||||
|
@ -1138,11 +1138,11 @@ function xflip(p, x=0, planar=false) =
|
|||
// Function&Module: yflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// yflip(<y>) ...
|
||||
// yflip([y]) ...
|
||||
// Usage: As Function
|
||||
// pt = yflip(p, <y>);
|
||||
// pt = yflip(p, [y]);
|
||||
// Usage: Get Affine Matrix
|
||||
// pt = yflip(<y>, <planar=>);
|
||||
// pt = yflip([y], [planar=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Reflection, Mirroring
|
||||
// See Also: mirror(), xflip(), zflip(), affine2d_mirror(), affine3d_mirror()
|
||||
|
@ -1198,11 +1198,11 @@ function yflip(p, y=0, planar=false) =
|
|||
// Function&Module: zflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// zflip(<z>) ...
|
||||
// zflip([z]) ...
|
||||
// Usage: As Function
|
||||
// pt = zflip(p, <z>);
|
||||
// pt = zflip(p, [z]);
|
||||
// Usage: Get Affine Matrix
|
||||
// pt = zflip(<z>);
|
||||
// pt = zflip([z]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Reflection, Mirroring
|
||||
// See Also: mirror(), xflip(), yflip(), affine2d_mirror(), affine3d_mirror()
|
||||
|
@ -1246,11 +1246,11 @@ function zflip(p, z=0) =
|
|||
// Function&Module: xyflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xyflip(<cp>) ...
|
||||
// xyflip([cp]) ...
|
||||
// Usage: As Function
|
||||
// pt = xyflip(p, <cp>);
|
||||
// pt = xyflip(p, [cp]);
|
||||
// Usage: Get Affine Matrix
|
||||
// pt = xyflip(<cp>, <planar=>);
|
||||
// pt = xyflip([cp], [planar=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Reflection, Mirroring
|
||||
// See Also: mirror(), xflip(), yflip(), zflip(), xzflip(), yzflip(), affine2d_mirror(), affine3d_mirror()
|
||||
|
@ -1316,11 +1316,11 @@ function xyflip(p, cp=0, planar=false) =
|
|||
// Function&Module: xzflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xzflip(<cp>) ...
|
||||
// xzflip([cp]) ...
|
||||
// Usage: As Function
|
||||
// pt = xzflip(<cp>, p);
|
||||
// pt = xzflip([cp], p);
|
||||
// Usage: Get Affine Matrix
|
||||
// pt = xzflip(<cp>);
|
||||
// pt = xzflip([cp]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Reflection, Mirroring
|
||||
// See Also: mirror(), xflip(), yflip(), zflip(), xyflip(), yzflip(), affine2d_mirror(), affine3d_mirror()
|
||||
|
@ -1372,11 +1372,11 @@ function xzflip(p, cp=0) =
|
|||
// Function&Module: yzflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// yzflip(<x=>) ...
|
||||
// yzflip([x=]) ...
|
||||
// Usage: As Function
|
||||
// pt = yzflip(p, <x=>);
|
||||
// pt = yzflip(p, [x=]);
|
||||
// Usage: Get Affine Matrix
|
||||
// pt = yzflip(<x=>);
|
||||
// pt = yzflip([x=]);
|
||||
//
|
||||
// Topics: Affine, Matrices, Transforms, Reflection, Mirroring
|
||||
// See Also: mirror(), xflip(), yflip(), zflip(), xyflip(), xzflip(), affine2d_mirror(), affine3d_mirror()
|
||||
|
@ -1433,11 +1433,11 @@ function yzflip(p, cp=0) =
|
|||
|
||||
// Function&Module: skew()
|
||||
// Usage: As Module
|
||||
// skew(<sxy=>, <sxz=>, <syx=>, <syz=>, <szx=>, <szy=>) ...
|
||||
// skew([sxy=], [sxz=], [syx=], [syz=], [szx=], [szy=]) ...
|
||||
// Usage: As Function
|
||||
// pts = skew(p, <sxy=>, <sxz=>, <syx=>, <syz=>, <szx=>, <szy=>);
|
||||
// pts = skew(p, [sxy=], [sxz=], [syx=], [syz=], [szx=], [szy=]);
|
||||
// Usage: Get Affine Matrix
|
||||
// mat = skew(<sxy=>, <sxz=>, <syx=>, <syz=>, <szx=>, <szy=>, <planar=>);
|
||||
// mat = skew([sxy=], [sxz=], [syx=], [syz=], [szx=], [szy=], [planar=]);
|
||||
// Topics: Affine, Matrices, Transforms, Skewing
|
||||
// See Also: affine2d_skew(), affine3d_skew(), affine3d_skew_xy(), affine3d_skew_xz(), affine3d_skew_yz()
|
||||
//
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
// Function: is_vector()
|
||||
// Usage:
|
||||
// is_vector(v, <length>, ...);
|
||||
// is_vector(v, [length], ...);
|
||||
// Description:
|
||||
// Returns true if v is a list of finite numbers.
|
||||
// Arguments:
|
||||
|
@ -219,7 +219,7 @@ function vector_axis(v1,v2=undef,v3=undef) =
|
|||
|
||||
// Function: vp_tree()
|
||||
// Usage:
|
||||
// tree = vp_tree(points, <leafsize>)
|
||||
// tree = vp_tree(points, [leafsize])
|
||||
// Description:
|
||||
// Organizes n-dimensional data into a Vantage Point Tree, which can be
|
||||
// efficiently searched for for nearest matches. The Vantage Point Tree
|
||||
|
@ -380,7 +380,7 @@ function vp_nearest(points, tree, p, k) =
|
|||
|
||||
// Function: search_radius()
|
||||
// Usage:
|
||||
// index_list = search_radius(points, queries, r, <leafsize>);
|
||||
// index_list = search_radius(points, queries, r, [leafsize]);
|
||||
// Description:
|
||||
// Given a list of points and a compatible list of queries, for each query
|
||||
// search the points list for all points whose distance from the query
|
||||
|
|
12
vnf.scad
12
vnf.scad
|
@ -51,7 +51,7 @@ function vnf_faces(vnf) = vnf[1];
|
|||
|
||||
// Function: vnf_quantize()
|
||||
// Usage:
|
||||
// vnf2 = vnf_quantize(vnf,<q>);
|
||||
// vnf2 = vnf_quantize(vnf,[q]);
|
||||
// Description:
|
||||
// Quantizes the vertex coordinates of the VNF to the given quanta `q`.
|
||||
// Arguments:
|
||||
|
@ -144,7 +144,7 @@ function vnf_add_faces(vnf=EMPTY_VNF, faces) =
|
|||
|
||||
// Function: vnf_merge()
|
||||
// Usage:
|
||||
// vnf = vnf_merge([VNF, VNF, VNF, ...], <cleanup>,<eps>);
|
||||
// vnf = vnf_merge([VNF, VNF, VNF, ...], [cleanup],[eps]);
|
||||
// Description:
|
||||
// Given a list of VNF structures, merges them all into a single VNF structure.
|
||||
// When cleanup=true, it consolidates all duplicate vertices with a tolerance `eps`,
|
||||
|
@ -213,7 +213,7 @@ function vnf_triangulate(vnf) =
|
|||
|
||||
// Function: vnf_vertex_array()
|
||||
// Usage:
|
||||
// vnf = vnf_vertex_array(points, <caps>, <cap1>, <cap2>, <reverse>, <col_wrap>, <row_wrap>, <vnf>);
|
||||
// vnf = vnf_vertex_array(points, [caps], [cap1], [cap2], [reverse], [col_wrap], [row_wrap], [vnf]);
|
||||
// Description:
|
||||
// Creates a VNF structure from a vertex list, by dividing the vertices into columns and rows,
|
||||
// adding faces to tile the surface. You can optionally have faces added to wrap the last column
|
||||
|
@ -387,7 +387,7 @@ function vnf_vertex_array(
|
|||
|
||||
// Function: vnf_tri_array()
|
||||
// Usage:
|
||||
// vnf = vnf_tri_array(points, <row_wrap>, <reverse>)
|
||||
// vnf = vnf_tri_array(points, [row_wrap], [reverse])
|
||||
// Description:
|
||||
// Produces a vnf from an array of points where each row length can differ from the adjacent rows by up to 2 in length. This enables
|
||||
// the construction of triangular VNF patches. The resulting VNF can be wrapped along the rows by setting `row_wrap` to true.
|
||||
|
@ -713,7 +713,7 @@ function vnf_bend(vnf,r,d,axis="Z") =
|
|||
// Usage: As Function
|
||||
// fails = vnf_validate(vnf);
|
||||
// Usage: As Module
|
||||
// vnf_validate(vnf, <size>);
|
||||
// vnf_validate(vnf, [size]);
|
||||
// Description:
|
||||
// When called as a function, returns a list of non-manifold errors with the given VNF.
|
||||
// Each error has the format `[ERR_OR_WARN,CODE,MESG,POINTS,COLOR]`.
|
||||
|
@ -1040,7 +1040,7 @@ module vnf_validate(vnf, size=1, show_warns=true, check_isects=false) {
|
|||
|
||||
// Function: vnf_halfspace()
|
||||
// Usage:
|
||||
// newvnf = vnf_halfspace(plane, vnf, <closed>);
|
||||
// newvnf = vnf_halfspace(plane, vnf, [closed]);
|
||||
// Description:
|
||||
// Returns the intersection of the vnf with a half space. The half space is defined by
|
||||
// plane = [A,B,C,D], taking the side where the normal [A,B,C] points: Ax+By+Cz≥D.
|
||||
|
|
Loading…
Reference in a new issue