From 1bc154b35f0d11103ae403e69a53350900bb52e0 Mon Sep 17 00:00:00 2001 From: Jochen Vothknecht <jochen3120@gmail.com> Date: Fri, 24 Sep 2021 07:02:29 +0200 Subject: [PATCH] Reordering modules --- scad/util/common.scad | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/scad/util/common.scad b/scad/util/common.scad index 72d69b0..5bc567b 100644 --- a/scad/util/common.scad +++ b/scad/util/common.scad @@ -1,21 +1,5 @@ -/** - * - * TODO: Moar documentation! - * - */ -module roundRect(w, h, r) { - if (r > 0) { - _dw2 = (w - 2*r) / 2; - _dh2 = (h - 2*r) / 2; - - hull() for (tx=[-_dw2, _dw2], ty=[-_dh2, _dh2]) translate([tx, ty, 0]) circle(r=r); - } else { - square([w, h], center=true); - } -} - /** * A round triangle pointing along the X-Axis @@ -37,3 +21,19 @@ module roundTri(w, h, r, style="inner") { } } + +/** + * + * TODO: Moar documentation! + * + */ +module roundRect(w, h, r) { + if (r > 0) { + _dw2 = (w - 2*r) / 2; + _dh2 = (h - 2*r) / 2; + + hull() for (tx=[-_dw2, _dw2], ty=[-_dh2, _dh2]) translate([tx, ty, 0]) circle(r=r); + } else { + square([w, h], center=true); + } +} -- GitLab