From 9f8614397bd30893ddecd6b4e01d74cbde7050f6 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 13 Aug 2021 20:50:33 +0800 Subject: [PATCH] better bottom fitness --- examples/distorted_vase.scad | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/distorted_vase.scad b/examples/distorted_vase.scad index 87e2c950..99ec40a8 100644 --- a/examples/distorted_vase.scad +++ b/examples/distorted_vase.scad @@ -11,11 +11,11 @@ beginning_radius = 15; thickness = 2; fn = 180; amplitude = 10; -curve_step = 0.02; +curve_step = 0.01; smoothness = 15; // Perlin noise 2D or 3D perlin = 2; // [2, 3] -bottom = "NO"; // ["YES", "NO"] +bottom = "YES"; // ["YES", "NO"] epsilon = 0.000001; distorted_vase(beginning_radius, thickness, fn, amplitude, curve_step, smoothness, perlin, epsilon); @@ -77,7 +77,10 @@ module distorted_vase(beginning_radius, thickness, fn, amplitude,curve_step, smo sweep(all, triangles = "HOLLOW"); if(bottom == "YES") { - linear_extrude(thickness) - polygon([for(p = offset_noisy[len(offset_noisy) - 1]) [p[0], p[1]]]); + sweep([ + for(section = noisy) + if(section[0][2] < thickness) + section + ]); } } \ No newline at end of file