From 7518539350a0f54bf084c3545d34791e72e59f47 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sun, 20 Jun 2021 17:39:18 +0800 Subject: [PATCH] add swap_surface param --- src/surface/sf_thicken.scad | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/surface/sf_thicken.scad b/src/surface/sf_thicken.scad index 3b7bd63f..c5d5c450 100644 --- a/src/surface/sf_thicken.scad +++ b/src/surface/sf_thicken.scad @@ -1,7 +1,7 @@ use ; use ; -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); + } } }