mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-15 08:59:40 +00:00
Compare commits
21 commits
3ffbc19701
...
a7c5e7e795
Author | SHA1 | Date | |
---|---|---|---|
|
a7c5e7e795 | ||
|
c83253c814 | ||
|
3f9fb3a5b4 | ||
|
82a13f9e97 | ||
|
9717497174 | ||
|
38f9a9b40c | ||
|
d8214cc0e1 | ||
|
456fcd8d8a | ||
|
8a930d5495 | ||
|
eda0cd75b5 | ||
|
53af9121e7 | ||
|
736fad321b | ||
|
cc08eb3323 | ||
|
78ea8e4770 | ||
|
8383d360cc | ||
|
9145c0961f | ||
|
ebb98b47d2 | ||
|
8ea8ebf341 | ||
|
17e307fdb4 | ||
|
67f0004773 | ||
|
76d09271c1 |
2 changed files with 12 additions and 9 deletions
|
@ -466,12 +466,15 @@ function bezpath_curve(bezpath, splinesteps=16, N=3, endpoint=true) =
|
||||||
assert(len(bezpath)%N == 1, str("A degree ",N," bezier path should have a multiple of ",N," points in it, plus 1."))
|
assert(len(bezpath)%N == 1, str("A degree ",N," bezier path should have a multiple of ",N," points in it, plus 1."))
|
||||||
let(
|
let(
|
||||||
segs = (len(bezpath)-1) / N,
|
segs = (len(bezpath)-1) / N,
|
||||||
step = 1 / splinesteps
|
step = 1 / splinesteps,
|
||||||
) [
|
path = [
|
||||||
for (seg = [0:1:segs-1])
|
for (seg = [0:1:segs-1])
|
||||||
each bezier_points(select(bezpath, seg*N, (seg+1)*N), [0:step:1-step/2]),
|
each bezier_points(select(bezpath, seg*N, (seg+1)*N), [0:step:1-step/2]),
|
||||||
if (endpoint) last(bezpath)
|
if (endpoint) last(bezpath)
|
||||||
];
|
],
|
||||||
|
is_closed = approx(path[0], last(path)),
|
||||||
|
out = path_merge_collinear(path, closed=is_closed)
|
||||||
|
) out;
|
||||||
|
|
||||||
|
|
||||||
// Function: bezpath_closest_point()
|
// Function: bezpath_closest_point()
|
||||||
|
|
|
@ -2095,9 +2095,9 @@ function _rp_compute_patches(top, bot, rtop, rsides, ktop, ksides, concave) =
|
||||||
// top = 2d or 3d path describing top polygon (must be the same dimension as bottom)
|
// top = 2d or 3d path describing top polygon (must be the same dimension as bottom)
|
||||||
// ---
|
// ---
|
||||||
// height/length/h/l = height of the shape when you give 2d bottom
|
// height/length/h/l = height of the shape when you give 2d bottom
|
||||||
// joint_top = rounding length for top (number or 2-vector). Default: 0
|
// joint_top = joint distance or [joint,k] pair for top roundover (number or 2-vector). Default: 0
|
||||||
// joint_bot = rounding length for bottom (number or 2-vector). Default: 0
|
// joint_bot = joint distance or [joint,k] for bottom roundover (number or 2-vector). Default: 0
|
||||||
// joint_sides = rounding length for side edges, a number/2-vector or list of them. Default: 0
|
// joint_sides = joint distance or [joint,k] for rounding of side edges, a number/2-vector or list of them. Default: 0
|
||||||
// k = continuous curvature rounding parameter for all edges. Default: 0.5
|
// k = continuous curvature rounding parameter for all edges. Default: 0.5
|
||||||
// k_top = continuous curvature rounding parameter for top
|
// k_top = continuous curvature rounding parameter for top
|
||||||
// k_bot = continuous curvature rounding parameter for bottom
|
// k_bot = continuous curvature rounding parameter for bottom
|
||||||
|
|
Loading…
Reference in a new issue