mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-02 21:38:35 +02:00
screws update
This commit is contained in:
@@ -661,7 +661,8 @@ function _indexed_sort(arrind) =
|
|||||||
// Topics: List Handling
|
// Topics: List Handling
|
||||||
// See Also: shuffle(), sortidx(), unique(), unique_count(), group_sort()
|
// See Also: shuffle(), sortidx(), unique(), unique_count(), group_sort()
|
||||||
// Description:
|
// Description:
|
||||||
// Sorts the given list in lexicographic order. If the input is a homogeneous simple list or a homogeneous
|
// Sorts the given list in lexicographic order. The sort is stable, meaning equivalent items will not change order.
|
||||||
|
// If the input is a homogeneous simple list or a homogeneous
|
||||||
// list of vectors (see function is_homogeneous), the sorting method uses the native comparison operator and is faster.
|
// list of vectors (see function is_homogeneous), the sorting method uses the native comparison operator and is faster.
|
||||||
// When sorting non homogeneous list the elements are compared with `compare_vals`, with types ordered according to
|
// When sorting non homogeneous list the elements are compared with `compare_vals`, with types ordered according to
|
||||||
// `undef < boolean < number < string < list`. Comparison of lists is recursive.
|
// `undef < boolean < number < string < list`. Comparison of lists is recursive.
|
||||||
@@ -704,6 +705,7 @@ function sort(list, idx=undef) =
|
|||||||
// Description:
|
// Description:
|
||||||
// Given a list, sort it as function `sort()`, and returns
|
// Given a list, sort it as function `sort()`, and returns
|
||||||
// a list of indexes into the original list in that sorted order.
|
// a list of indexes into the original list in that sorted order.
|
||||||
|
// The sort is stable, so equivalent items will not change order.
|
||||||
// If you iterate the returned list in order, and use the list items
|
// If you iterate the returned list in order, and use the list items
|
||||||
// to index into the original list, you will be iterating the original
|
// to index into the original list, you will be iterating the original
|
||||||
// values in sorted order.
|
// values in sorted order.
|
||||||
|
789
screws.scad
789
screws.scad
File diff suppressed because it is too large
Load Diff
@@ -160,9 +160,9 @@ module threaded_nut(
|
|||||||
anchor, spin, orient
|
anchor, spin, orient
|
||||||
) {
|
) {
|
||||||
dummy1=
|
dummy1=
|
||||||
assert(all_positive(pitch))
|
assert(all_positive(pitch), "Nut pitch must be positive")
|
||||||
assert(all_positive(id))
|
assert(all_positive(id), "Nut inner diameter must be positive")
|
||||||
assert(all_positive(h));
|
assert(all_positive(h),"Nut thickness must be positive");
|
||||||
basic = is_num(id) || is_undef(id) || is_def(id1) || is_def(id2);
|
basic = is_num(id) || is_undef(id) || is_def(id1) || is_def(id2);
|
||||||
dummy2 = assert(basic || is_vector(id,3));
|
dummy2 = assert(basic || is_vector(id,3));
|
||||||
depth = basic ? cos(30) * 5/8
|
depth = basic ? cos(30) * 5/8
|
||||||
@@ -1208,7 +1208,7 @@ module generic_threaded_rod(
|
|||||||
|
|
||||||
// Module: generic_threaded_nut()
|
// Module: generic_threaded_nut()
|
||||||
// Usage:
|
// Usage:
|
||||||
// generic_threaded_nut(od, id, h, pitch, profile, ...) [ATTACHMENTS];
|
// generic_threaded_nut(od, id, h, pitch, profile, [$slop], ...) [ATTACHMENTS];
|
||||||
// Description:
|
// Description:
|
||||||
// Constructs a hexagonal nut for an generic threaded rod using a user-supplied thread profile.
|
// Constructs a hexagonal nut for an generic threaded rod using a user-supplied thread profile.
|
||||||
// See generic_threaded_rod for details on the profile specification.
|
// See generic_threaded_rod for details on the profile specification.
|
||||||
@@ -1238,7 +1238,7 @@ function generic_threaded_nut(
|
|||||||
profile,
|
profile,
|
||||||
left_handed=false,
|
left_handed=false,
|
||||||
starts=1,
|
starts=1,
|
||||||
bevel,bevel1,bevel2,
|
bevel,bevel1,bevel2,bevang=30,
|
||||||
id1,id2,
|
id1,id2,
|
||||||
anchor, spin, orient
|
anchor, spin, orient
|
||||||
) = no_function("generic_threaded_nut");
|
) = no_function("generic_threaded_nut");
|
||||||
|
Reference in New Issue
Block a user