1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00

support depth

This commit is contained in:
Justin Lin
2020-02-20 10:19:33 +08:00
parent 74e087e4dd
commit 1e1f4c7d65

View File

@@ -6,11 +6,13 @@ use <experimental/tf_bend.scad>;
levels : A list of numbers (0 ~ 255).
radius: The radius of the arc after being bent
thickness: shell thickness
depth: the depth of the image
angle: The central angle of the arc..
invert: inverts how the gray levels are translated into height values.
*/
module sf_bend(levels, radius, thickness, angle, invert = false) {
surface = _sf_square_surfaces(levels, thickness, invert);
module sf_bend(levels, radius, thickness, depth, angle = 180, 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];