1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-02-24 09:33:26 +01:00

support depth

This commit is contained in:
Justin Lin 2020-02-20 10:22:24 +08:00
parent 1e1f4c7d65
commit e56c12f7a6

View File

@ -6,13 +6,15 @@ use <experimental/tf_ring.scad>;
levels : A list of numbers (0 ~ 255).
radius: ring radius.
thickness: thickness
depth: the depth of the image
angle: arc angle.
twist: The number of degrees of through which the rectangle is twisted.
invert: inverts how the gray levels are translated into height values.
*/
module sf_ring(levels, radius, thickness, angle = 360, twist = 0, invert = false) {
surface = _sf_square_surfaces(levels, thickness, invert);
module sf_ring(levels, radius, thickness, depth, angle = 360, twist = 0, invert = false) {
dp = is_undef(depth) ? thickness / 2 : depth;
surface = _sf_square_surfaces(levels, thickness, dp, invert);
rows = len(levels);
columns = len(levels[0]);
size = [columns - 1, rows - 1];