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

support depth

This commit is contained in:
Justin Lin 2020-02-20 10:26:07 +08:00
parent e56c12f7a6
commit 0a61fd4095

View File

@ -6,12 +6,14 @@ use <experimental/tf_torus.scad>;
levels : A list of numbers (0 ~ 255).
radius: torus [R, r]
thickness: shell thickness
depth: the depth of the image
angle: torus [A, a].
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_torus(levels, radius, thickness, angle = [360, 360], twist = 0, invert = false) {
surface = _sf_square_surfaces(levels, thickness, invert);
module sf_torus(levels, radius, thickness, depth, angle = [360, 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];