mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-25 23:46:32 +02:00
use __is_float
This commit is contained in:
@@ -44,9 +44,9 @@ function __br_corner(frags, b_ang, l1, l2, h, round_r) =
|
||||
|
||||
function __half_trapezium(length, h, round_r) =
|
||||
let(
|
||||
is_vt = __is_vector(length),
|
||||
l1 = is_vt ? length[0] : length,
|
||||
l2 = is_vt ? length[1] : length,
|
||||
is_flt = __is_float(length),
|
||||
l1 = is_flt ? length : length[0],
|
||||
l2 = is_flt ? length : length[1],
|
||||
frags = __frags(round_r),
|
||||
b_ang = atan2(h, l1 - l2),
|
||||
br_corner = __br_corner(frags, b_ang, l1, l2, h, round_r),
|
||||
|
@@ -8,17 +8,17 @@
|
||||
*
|
||||
**/
|
||||
|
||||
include <__private__/__is_vector.scad>;
|
||||
include <__private__/__is_float.scad>;
|
||||
include <__private__/__frags.scad>;
|
||||
include <__private__/__pie_for_rounding.scad>;
|
||||
include <__private__/__half_trapezium.scad>;
|
||||
include <__private__/__trapezium.scad>;
|
||||
|
||||
|
||||
function shape_square(size, corner_r = 0) =
|
||||
let(
|
||||
is_vt = __is_vector(size),
|
||||
x = is_vt ? size[0] : size,
|
||||
y = is_vt ? size[1] : size
|
||||
is_flt = __is_float(size),
|
||||
x = is_flt ? size : size[0],
|
||||
y = is_flt ? size : size[1]
|
||||
)
|
||||
__trapezium(
|
||||
length = x,
|
||||
|
Reference in New Issue
Block a user