mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 09:14:29 +02:00
don't call ptf_xxx_twist when 0
This commit is contained in:
@@ -19,23 +19,21 @@ module sf_square(levels, thickness, depth, x_twist = 0, y_twist = 0, invert = fa
|
|||||||
surface = _sf_square_surfaces(levels, thickness, dp, invert);
|
surface = _sf_square_surfaces(levels, thickness, dp, invert);
|
||||||
|
|
||||||
off = [0, 0, invert ? thickness : 0];
|
off = [0, 0, invert ? thickness : 0];
|
||||||
|
xt = x_twist != 0;
|
||||||
|
yt = y_twist != 0;
|
||||||
sf_solidify(
|
sf_solidify(
|
||||||
[
|
[
|
||||||
for(row = surface[0]) [
|
for(row = surface[0]) [
|
||||||
for(p = row)
|
for(p = row)
|
||||||
ptf_y_twist(size,
|
let(p_off = p + off, p_xt = xt ? ptf_x_twist(size, p_off, x_twist) : p_off)
|
||||||
ptf_x_twist(size, p + off, x_twist),
|
yt ? ptf_y_twist(size, p_xt, y_twist) : p_xt
|
||||||
y_twist
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
for(row = surface[1]) [
|
for(row = surface[1]) [
|
||||||
for(p = row)
|
for(p = row)
|
||||||
ptf_y_twist(size,
|
let(p_xt = xt ? ptf_x_twist(size, p, x_twist) : p)
|
||||||
ptf_x_twist(size, p, x_twist),
|
yt ? ptf_y_twist(size, p_xt, y_twist) : p_xt
|
||||||
y_twist
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
convexity = convexity
|
convexity = convexity
|
||||||
|
Reference in New Issue
Block a user