mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 15:26:39 +02:00
support depth
This commit is contained in:
@@ -6,12 +6,14 @@ use <experimental/tf_torus.scad>;
|
|||||||
levels : A list of numbers (0 ~ 255).
|
levels : A list of numbers (0 ~ 255).
|
||||||
radius: torus [R, r]
|
radius: torus [R, r]
|
||||||
thickness: shell thickness
|
thickness: shell thickness
|
||||||
|
depth: the depth of the image
|
||||||
angle: torus [A, a].
|
angle: torus [A, a].
|
||||||
twist: The number of degrees of through which the rectangle is twisted.
|
twist: The number of degrees of through which the rectangle is twisted.
|
||||||
invert: inverts how the gray levels are translated into height values.
|
invert: inverts how the gray levels are translated into height values.
|
||||||
*/
|
*/
|
||||||
module sf_torus(levels, radius, thickness, angle = [360, 360], twist = 0, invert = false) {
|
module sf_torus(levels, radius, thickness, depth, angle = [360, 360], twist = 0, invert = false) {
|
||||||
surface = _sf_square_surfaces(levels, thickness, invert);
|
dp = is_undef(depth) ? thickness / 2 : 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];
|
||||||
|
Reference in New Issue
Block a user