mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-30 08:39:51 +02:00
Torx sizing tweaks.
This commit is contained in:
@@ -53,8 +53,8 @@ test_arc();
|
||||
|
||||
|
||||
module test_dashed_stroke() {
|
||||
segs = dashed_stroke([[0,0],[10,0]], dashpat=[3,2], closed=false);
|
||||
assert_equal(segs,[[[0,0],[3,0]], [[5,0],[8,0]]]);
|
||||
segs = dashed_stroke([[0,0],[15,0]], dashpat=[3,2], closed=false);
|
||||
assert_approx(segs,[[[0,0],[2.5,0]],[[4+1/6,0],[6+2/3,0]],[[8+1/3,0],[10+5/6,0]],[[12.5,0],[15,0]]]);
|
||||
}
|
||||
test_dashed_stroke();
|
||||
|
||||
|
@@ -13,49 +13,16 @@ module test_torx_diam() {
|
||||
test_torx_diam();
|
||||
|
||||
|
||||
module test_torx_inner_diam() {
|
||||
assert_approx(_torx_inner_diam(10), 2.05);
|
||||
assert_approx(_torx_inner_diam(15), 2.40);
|
||||
assert_approx(_torx_inner_diam(20), 2.85);
|
||||
assert_approx(_torx_inner_diam(25), 3.25);
|
||||
assert_approx(_torx_inner_diam(30), 4.05);
|
||||
assert_approx(_torx_inner_diam(40), 4.85);
|
||||
}
|
||||
test_torx_inner_diam();
|
||||
|
||||
|
||||
module test_torx_depth() {
|
||||
assert_approx(torx_depth(10), 3.56);
|
||||
assert_approx(torx_depth(15), 3.81);
|
||||
assert_approx(torx_depth(20), 4.07);
|
||||
assert_approx(torx_depth(25), 4.45);
|
||||
assert_approx(torx_depth(30), 4.95);
|
||||
assert_approx(torx_depth(40), 5.59);
|
||||
assert_approx(torx_depth(10), 3.61);
|
||||
assert_approx(torx_depth(15), 3.86);
|
||||
assert_approx(torx_depth(20), 4.12);
|
||||
assert_approx(torx_depth(25), 4.50);
|
||||
assert_approx(torx_depth(30), 5,00);
|
||||
assert_approx(torx_depth(40), 5.64);
|
||||
}
|
||||
test_torx_depth();
|
||||
|
||||
|
||||
module test_torx_tip_radius() {
|
||||
assert_approx(_torx_tip_radius(10), 0.229);
|
||||
assert_approx(_torx_tip_radius(15), 0.267);
|
||||
assert_approx(_torx_tip_radius(20), 0.305);
|
||||
assert_approx(_torx_tip_radius(25), 0.375);
|
||||
assert_approx(_torx_tip_radius(30), 0.451);
|
||||
assert_approx(_torx_tip_radius(40), 0.546);
|
||||
}
|
||||
test_torx_tip_radius();
|
||||
|
||||
|
||||
module test_torx_rounding_radius() {
|
||||
assert_approx(_torx_rounding_radius(10), 0.598);
|
||||
assert_approx(_torx_rounding_radius(15), 0.716);
|
||||
assert_approx(_torx_rounding_radius(20), 0.859);
|
||||
assert_approx(_torx_rounding_radius(25), 0.920);
|
||||
assert_approx(_torx_rounding_radius(30), 1.194);
|
||||
assert_approx(_torx_rounding_radius(40), 1.428);
|
||||
}
|
||||
test_torx_rounding_radius();
|
||||
|
||||
|
||||
|
||||
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|
||||
|
Reference in New Issue
Block a user