1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-21 05:52:16 +02:00
This commit is contained in:
Justin Lin
2022-04-28 09:41:53 +08:00
parent ae8e72a7f4
commit 4510f43cc0

View File

@@ -66,20 +66,14 @@ module sf_thickenT(points, thickness, triangles = undef, direction = "BOTH", con
]; ];
if(direction == "BOTH") { if(direction == "BOTH") {
half_thickness = thickness / 2; off = vertex_normals * (thickness / 2);
pts1 = points + vertex_normals * half_thickness; sf_solidifyT(points + off, points - off, real_triangles, convexity = convexity);
pts2 = points - vertex_normals * half_thickness;
sf_solidifyT(pts1, pts2, real_triangles, convexity = convexity);
} }
else if(direction == "FORWARD") { else if(direction == "FORWARD") {
pts1 = points + vertex_normals * thickness; sf_solidifyT(points + vertex_normals * thickness, points, real_triangles, convexity = convexity);
pts2 = points;
sf_solidifyT(pts1, pts2, real_triangles, convexity = convexity);
} }
else { else {
pts1 = points; sf_solidifyT(points, points - vertex_normals * thickness, real_triangles, convexity = convexity);
pts2 = points - vertex_normals * thickness;
sf_solidifyT(pts1, pts2, real_triangles, convexity = convexity);
} }
} }
} }