mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Example image bugfixes.
This commit is contained in:
parent
ff96db86d2
commit
22f8d65991
3 changed files with 14 additions and 12 deletions
|
@ -465,7 +465,7 @@ function bezier_close_to_axis(bezier, N=3, axis="X") =
|
|||
// closed = bezier_offset([-5,0], bez);
|
||||
// trace_bezier(closed, size=1);
|
||||
function bezier_offset(offset, bezier, N=3) =
|
||||
assert(is_num(offset))
|
||||
assert(is_vector(offset,2))
|
||||
assert(is_path(bezier,2), "bezier_offset() can only work on 2D bezier paths.")
|
||||
assert(is_int(N))
|
||||
assert(len(bezier)%N == 1, str("A degree ",N," bezier path shound have a multiple of ",N," points in it, plus 1."))
|
||||
|
@ -660,8 +660,8 @@ module bezier_sweep_bezier(bezier, path, pathsteps=16, bezsteps=16, bezN=3, path
|
|||
assert(is_int(bezsteps));
|
||||
assert(is_int(bezN));
|
||||
assert(is_int(pathN));
|
||||
assert(len(bezier)%bezN == 1, str("For argument bezier, a degree ",N," bezier path shound have a multiple of ",N," points in it, plus 1."));
|
||||
assert(len(path)%pathN == 1, str("For argument bezier, a degree ",N," bezier path shound have a multiple of ",N," points in it, plus 1."));
|
||||
assert(len(bezier)%bezN == 1, str("For argument bezier, a degree ",bezN," bezier path shound have a multiple of ",bezN," points in it, plus 1."));
|
||||
assert(len(path)%pathN == 1, str("For argument bezier, a degree ",pathN," bezier path shound have a multiple of ",pathN," points in it, plus 1."));
|
||||
bez_points = simplify_path(bezier_polyline(bezier, bezsteps, bezN));
|
||||
path_points = simplify_path(path3d(bezier_polyline(path, pathsteps, pathN)));
|
||||
path_sweep(bez_points, path_points);
|
||||
|
|
|
@ -517,14 +517,16 @@ module bevel_gear(
|
|||
),
|
||||
pp = rot(theta, cp=spiral_cp, p=[0,Rm,0]),
|
||||
ang = atan2(pp.y,pp.x)-90,
|
||||
pts = apply_list(profile, [
|
||||
pts = apply_list(
|
||||
path3d(profile), [
|
||||
move([0,-p,0]),
|
||||
rot([0,ang,0]),
|
||||
rot([bevelang,0,0]),
|
||||
move(pp),
|
||||
rot(tooth*360/teeth),
|
||||
move([0,0,thickness*u])
|
||||
])
|
||||
]
|
||||
)
|
||||
) each pts
|
||||
], [
|
||||
[0,0,-dy], [0,0,thickness]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,280];
|
||||
BOSL_VERSION = [2,0,281];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
|
Loading…
Reference in a new issue