mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 01:04:07 +02:00
rename param
This commit is contained in:
@@ -13,25 +13,25 @@ function c3_a(r1, r2, r3) =
|
||||
)
|
||||
acos((b ^ 2 + c ^ 2 - a ^ 2) / (2 * b * c));
|
||||
|
||||
function tri_circle_packing(t, min_r) =
|
||||
function tri_circle_packing(shape_pts, min_r) =
|
||||
let(
|
||||
center = tri_incenter(t),
|
||||
s1 = t[1] - t[0],
|
||||
s2 = t[2] - t[1],
|
||||
s3 = t[0] - t[2],
|
||||
center = tri_incenter(shape_pts),
|
||||
s1 = shape_pts[1] - shape_pts[0],
|
||||
s2 = shape_pts[2] - shape_pts[1],
|
||||
s3 = shape_pts[0] - shape_pts[2],
|
||||
R = abs(cross(s1, s2)) / (norm(s1) + norm(s2) + norm(s3)),
|
||||
|
||||
ca = center - t[0],
|
||||
ca = center - shape_pts[0],
|
||||
leng_ca = norm(ca),
|
||||
unit_ca = ca / leng_ca,
|
||||
sina = R / leng_ca,
|
||||
|
||||
cb = center - t[1],
|
||||
cb = center - shape_pts[1],
|
||||
leng_cb = norm(cb),
|
||||
unit_cb = cb / leng_cb,
|
||||
sinb = R / leng_cb,
|
||||
|
||||
cc = center - t[2],
|
||||
cc = center - shape_pts[2],
|
||||
leng_cc = norm(cc),
|
||||
unit_cc = cc / leng_cc,
|
||||
sinc = R / leng_cc,
|
||||
|
@@ -27,9 +27,9 @@ function _tri_subdivide_indices(n) =
|
||||
[ci_base_i_1, ci_base_i1, ci_base_i]
|
||||
];
|
||||
|
||||
function tri_subdivide(tri, n) =
|
||||
function tri_subdivide(shape_pts, n) =
|
||||
let(
|
||||
pts = _tri_subdivide_pts(tri, n),
|
||||
pts = _tri_subdivide_pts(shape_pts, n),
|
||||
indices = _tri_subdivide_indices(n)
|
||||
)
|
||||
[
|
||||
|
Reference in New Issue
Block a user