1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-13 02:04:16 +02:00

support depth

This commit is contained in:
Justin Lin
2020-02-20 08:47:01 +08:00
parent d9b4917c43
commit 3640a84769

View File

@@ -9,8 +9,9 @@ use <experimental/tf_sphere.scad>;
angle: [za, xa] mapping angles. angle: [za, xa] mapping angles.
invert: inverts how the gray levels are translated into height values. invert: inverts how the gray levels are translated into height values.
*/ */
module sf_sphere(levels, radius, thickness, angle = [180, 360], invert = false) { module sf_sphere(levels, radius, thickness, depth, angle = [180, 360], invert = false) {
surface = _sf_square_surfaces(levels, thickness, invert); dp = is_undef(depth) ? thickness - .1 : depth;
surface = _sf_square_surfaces(levels, thickness, dp, invert);
rows = len(levels); rows = len(levels);
columns = len(levels[0]); columns = len(levels[0]);
size = [columns - 1, rows - 1]; size = [columns - 1, rows - 1];