From 507c7ec226097b286b0b3306007b221fe11bc5d3 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 26 Jun 2021 18:35:32 +0800 Subject: [PATCH] refactor --- src/surface/sf_thicken.scad | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/surface/sf_thicken.scad b/src/surface/sf_thicken.scad index 2ef1b87e..10d384df 100644 --- a/src/surface/sf_thicken.scad +++ b/src/surface/sf_thicken.scad @@ -65,8 +65,9 @@ module sf_thicken(points, thickness, direction = "BOTH") { vertex_normal(points, x, y) ] ]; - half_thickness = thickness / 2; + if(direction == "BOTH") { + half_thickness = thickness / 2; surface_top = points + half_thickness * vertex_normals; surface_bottom = points - half_thickness * vertex_normals; sf_solidify(surface_top, surface_bottom);