1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-30 01:40:02 +02:00

add swap_surface param

This commit is contained in:
Justin Lin
2021-06-20 17:39:18 +08:00
parent ad1b0c898a
commit 7518539350

View File

@@ -1,7 +1,7 @@
use <sf_solidify.scad>;
use <util/sum.scad>;
module sf_thicken(points, thickness, direction = undef, slicing = "SLASH") {
module sf_thicken(points, thickness, direction = undef, swap_surface = false, slicing = "SLASH") {
function tri_normal(tri) =
let(v = cross(tri[2] - tri[0], tri[1] - tri[0])) v / norm(v);
@@ -48,7 +48,12 @@ module sf_thicken(points, thickness, direction = undef, slicing = "SLASH") {
dir_v
]
];
sf_solidify(points, surface_bottom, slicing);
if(swap_surface) {
sf_solidify(surface_bottom, points, slicing);
}
else {
sf_solidify(points, surface_bottom, slicing);
}
}
}