mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
fix asserts that don't run in time
This commit is contained in:
parent
7b8dc9aa2d
commit
b675dfdd6b
1 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@ function _ph_bot_angle() = 28.0;
|
|||
function _ph_side_angle() = 26.5;
|
||||
|
||||
module phillips_mask(size="#2", $fn=36, anchor=BOTTOM, spin=0, orient=UP) {
|
||||
assert(in_list(size,["#0","#1","#2","#3","#4",0,1,2,3,4]));
|
||||
dummy = assert(in_list(size,["#0","#1","#2","#3","#4",0,1,2,3,4]));
|
||||
num = is_num(size) ? size : ord(size[1]) - ord("0");
|
||||
shaft = _phillips_shaft(num);
|
||||
b = [0.61, 0.97, 1.47, 2.41, 3.48][num];
|
||||
|
@ -91,7 +91,7 @@ module phillips_mask(size="#2", $fn=36, anchor=BOTTOM, spin=0, orient=UP) {
|
|||
// size = size as a number or text string like "#2"
|
||||
// d = desired diameter
|
||||
function phillips_depth(size, d) =
|
||||
assert(in_list(size,["#0","#1","#2","#3","#4",0,1,2,3,4]))
|
||||
dummy=assert(in_list(size,["#0","#1","#2","#3","#4",0,1,2,3,4]))
|
||||
let(
|
||||
num = is_num(size) ? size : ord(size[1]) - ord("0"),
|
||||
shaft = [3,4.5,6,8,10][num],
|
||||
|
@ -113,7 +113,7 @@ function phillips_depth(size, d) =
|
|||
// size = size as number or text string like "#2"
|
||||
// depth = depth of recess to find the diameter of
|
||||
function phillips_diam(size, depth) =
|
||||
assert(in_list(size,["#0","#1","#2","#3","#4",0,1,2,3,4]))
|
||||
dummy=assert(in_list(size,["#0","#1","#2","#3","#4",0,1,2,3,4]))
|
||||
let(
|
||||
num = is_num(size) ? size : ord(size[1]) - ord("0"),
|
||||
shaft = _phillips_shaft(num),
|
||||
|
@ -304,7 +304,7 @@ function torx_depth(size) = torx_info(size)[2];
|
|||
// robertson_mask(size=2);
|
||||
// }
|
||||
module robertson_mask(size, extra=1, ang=2.5) {
|
||||
assert(is_int(size) && size>=0 && size<=4);
|
||||
dummy=assert(is_int(size) && size>=0 && size<=4);
|
||||
Mmin = [0.0696, 0.0900, 0.1110, 0.1315, 0.1895][size];
|
||||
Mmax = [0.0710, 0.0910, 0.1126, 0.1330, 0.1910][size];
|
||||
M = (Mmin + Mmax) / 2 * INCH;
|
||||
|
|
Loading…
Reference in a new issue