mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-15 17:09:40 +00:00
Compare commits
13 commits
402a18bdf0
...
40d970a420
Author | SHA1 | Date | |
---|---|---|---|
|
40d970a420 | ||
|
b919905449 | ||
|
53af9121e7 | ||
|
736fad321b | ||
|
cc08eb3323 | ||
|
78ea8e4770 | ||
|
8383d360cc | ||
|
9145c0961f | ||
|
ebb98b47d2 | ||
|
8ea8ebf341 | ||
|
17e307fdb4 | ||
|
67f0004773 | ||
|
76d09271c1 |
2 changed files with 10 additions and 7 deletions
15
beziers.scad
15
beziers.scad
|
@ -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."))
|
||||
let(
|
||||
segs = (len(bezpath)-1) / N,
|
||||
step = 1 / splinesteps
|
||||
) [
|
||||
for (seg = [0:1:segs-1])
|
||||
each bezier_points(select(bezpath, seg*N, (seg+1)*N), [0:step:1-step/2]),
|
||||
if (endpoint) last(bezpath)
|
||||
];
|
||||
step = 1 / splinesteps,
|
||||
path = [
|
||||
for (seg = [0:1:segs-1])
|
||||
each bezier_points(select(bezpath, seg*N, (seg+1)*N), [0:step:1-step/2]),
|
||||
if (endpoint) last(bezpath)
|
||||
],
|
||||
is_closed = approx(path[0], last(path)),
|
||||
out = path_merge_collinear(path, closed=is_closed)
|
||||
) out;
|
||||
|
||||
|
||||
// Function: bezpath_closest_point()
|
||||
|
|
|
@ -858,7 +858,7 @@ function octahedron(size=1, anchor=CENTER, spin=0, orient=UP) =
|
|||
// Creates a prism whose ends are similar `n`-sided regular polygons, with optional rounding, chamfers or textures.
|
||||
// You can specify the size of the ends using diameter or radius measured either inside or outside. Alternatively
|
||||
// you can give the length of the side of the polygon. You can specify chamfers and roundings for the ends, but not
|
||||
// the vertical edges. See {{rounded_prism}} for prisms with rounded vertical edges. You can also specify texture for the side
|
||||
// the vertical edges. See {{rounded_prism()}} for prisms with rounded vertical edges. You can also specify texture for the side
|
||||
// faces, but note that texture is not compatible with any roundings or chamfers.
|
||||
// .
|
||||
// Anchors are based on the VNF of the prism. Especially for tapered or shifted prisms, this may give unexpected anchor positions, such as top side anchors
|
||||
|
|
Loading…
Reference in a new issue