Fixed extrude_2d_path_along_spiral()'s anchoring.

This commit is contained in:
Revar Desmera 2019-05-03 11:27:25 -07:00
parent f52d5418d2
commit 6be09b7669

View file

@ -259,7 +259,7 @@ module extrude_2d_hollow(wall=2, height=50, twist=90, slices=60, center=undef, o
// Example:
// poly = [[-10,0], [-3,-5], [3,-5], [10,0], [0,-30]];
// extrude_2dpath_along_spiral(poly, h=200, r=50, twist=1080, $fn=36);
module extrude_2dpath_along_spiral(polyline, h, r, twist=360, center=undef, orient=ORIENT_Z, anchor=CENTER) {
module extrude_2dpath_along_spiral(polyline, h, r, twist=360, center=undef, orient=ORIENT_Z, anchor=BOTTOM) {
pline_count = len(polyline);
steps = ceil(segs(r)*(twist/360));
@ -275,7 +275,7 @@ module extrude_2dpath_along_spiral(polyline, h, r, twist=360, center=undef, orie
polyline, [
matrix4_xrot(90),
matrix4_zrot(a),
matrix4_translate([dx, dy, dz])
matrix4_translate([dx, dy, dz-h/2])
]
)
) for (pt = pts) pt