From c7dacfddd827227e7b0e213d4a9f5147171ad1c2 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 28 Sep 2019 20:29:53 +0800 Subject: [PATCH] refactor --- examples/turtle/forest.scad | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/turtle/forest.scad b/examples/turtle/forest.scad index c7db54d4..a3dcc7cc 100644 --- a/examples/turtle/forest.scad +++ b/examples/turtle/forest.scad @@ -29,11 +29,14 @@ module forest(trunk_angle, max_trunk_length, min_trunk_length, style = "TREES", if (length > min_trunk_length) { // baseline if(style != "INVERTED") { - p = t2d(t, [ - ["forward", length], - ["point"] - ]); - line2d(t[0], p, width); + line2d( + t[0], + t2d(t, [ + ["forward", length], + ["point"] + ]), + width + ); } else { inverted_trunk(t, length); }