mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-16 11:44:50 +02:00
refactor: reuse dir_vs
This commit is contained in:
@@ -45,12 +45,10 @@ module sf_thicken(points, thickness, direction = "BOTH", convexity = 1) {
|
|||||||
leng_point0 = len(points[0]);
|
leng_point0 = len(points[0]);
|
||||||
if(is_list(direction)) {
|
if(is_list(direction)) {
|
||||||
dir_v = direction / norm(direction);
|
dir_v = direction / norm(direction);
|
||||||
|
dir_vs = [for(x = [0:leng_point0 - 1]) dir_v];
|
||||||
surface_another = points + thickness * [
|
surface_another = points + thickness * [
|
||||||
for(y = [0:leng_points - 1])
|
for(y = [0:leng_points - 1])
|
||||||
[
|
dir_vs
|
||||||
for(x = [0:leng_point0 - 1])
|
|
||||||
dir_v
|
|
||||||
]
|
|
||||||
];
|
];
|
||||||
|
|
||||||
midy = leng_points / 2;
|
midy = leng_points / 2;
|
||||||
|
Reference in New Issue
Block a user