From f494fbd90a2f6b917537b57755e17c7563994356 Mon Sep 17 00:00:00 2001 From: revarbat <revarbat@users.noreply.github.com> Date: Tue, 12 Dec 2023 23:22:30 +0000 Subject: [PATCH 01/10] Version Bump --- version.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.scad b/version.scad index 196ab5b..dd037bd 100644 --- a/version.scad +++ b/version.scad @@ -9,7 +9,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,664]; +BOSL_VERSION = [2,0,665]; // Section: BOSL Library Version Functions From 0f8378091dd5370a491440a46c4d5c9cf62f68eb Mon Sep 17 00:00:00 2001 From: Adrian Mariano <avm4@cornell.edu> Date: Mon, 25 Dec 2023 17:20:21 -0500 Subject: [PATCH 02/10] fix half_of() bug with regions --- partitions.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partitions.scad b/partitions.scad index 144c768..77b467e 100644 --- a/partitions.scad +++ b/partitions.scad @@ -95,7 +95,7 @@ function half_of(p, v=UP, cp) = assert(is_vector(v,2) || (is_vector(v,3) && v.z==0),"Must give 2-vector") assert(!all_zero(v), "Vector v must be nonzero") let( - bounds = pointlist_bounds(move(-cp,p)), + bounds = pointlist_bounds(move(-cp,flatten(force_region(p)))), L = 2*max(flatten(bounds)), n = unit(v), u = [-n.y,n.x], From 861ed80c82b231ccfdbbb4e33ddb3983dea2773f Mon Sep 17 00:00:00 2001 From: adrianVmariano <adrianVmariano@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:21:46 +0000 Subject: [PATCH 03/10] Version Bump --- version.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.scad b/version.scad index dd037bd..3cf1c0f 100644 --- a/version.scad +++ b/version.scad @@ -9,7 +9,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,665]; +BOSL_VERSION = [2,0,666]; // Section: BOSL Library Version Functions From 8e7df82f53ae28414a2a42c456e5c638386b05b7 Mon Sep 17 00:00:00 2001 From: Anders 'pipe' Andersson <pipatron@gmail.com> Date: Mon, 1 Jan 2024 22:28:13 +0100 Subject: [PATCH 04/10] Propagate "style" in recursive sweep() - skin.scad/sweep() takes a "style" parameter which was not propagated correctly when used recursively on a region with multiple parts. - Testing for transform list length did not match the comment. - Added a simple test case for sweep() --- skin.scad | 4 ++-- tests/test_skin.scad | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/skin.scad b/skin.scad index d97e4c4..f44007b 100644 --- a/skin.scad +++ b/skin.scad @@ -2099,7 +2099,7 @@ function sweep(shape, transforms, closed=false, caps, style="min_edge", capsOK = is_bool(caps) || is_bool_list(caps,2), fullcaps = is_bool(caps) ? [caps,caps] : caps ) - assert(len(transforms), "transformation must be length 2 or more") + assert(len(transforms)>=2, "transformation must be length 2 or more") assert(capsOK, "caps must be boolean or a list of two booleans") assert(!closed || !caps, "Cannot make closed shape with caps") is_region(shape)? let( @@ -2108,7 +2108,7 @@ function sweep(shape, transforms, closed=false, caps, style="min_edge", vnfs = [ for (rgn=regions) each [ for (path=rgn) - sweep(path, transforms, closed=closed, caps=false), + sweep(path, transforms, closed=closed, caps=false, style=style), if (fullcaps[0]) vnf_from_region(rgn, transform=transforms[0], reverse=true), if (fullcaps[1]) vnf_from_region(rgn, transform=last(transforms)), ], diff --git a/tests/test_skin.scad b/tests/test_skin.scad index 405e19b..1898946 100644 --- a/tests/test_skin.scad +++ b/tests/test_skin.scad @@ -16,4 +16,21 @@ module test_skin() { test_skin(); +module test_sweep() { + multi_region = [ + [[10, 0], [ 0, 0], [ 0, 10], [10, 10]], + [[30, 0], [20, 0], [20, 10], [30, 10]] + ]; + transforms = [ up(10), down(10) ]; + + vnf1 = sweep(multi_region,transforms,closed=false,caps=false); + assert(len(vnf1[0])==8*2 && len(vnf1[1])==8*2); + + vnf2 = sweep(multi_region,transforms,closed=false,caps=false,style="quincunx"); + assert(len(vnf2[0])==8*3 && len(vnf2[1])==8*4); +} +test_sweep(); + + + // vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap From 52d6e0fa7d17807441996b484167608fdebe66c4 Mon Sep 17 00:00:00 2001 From: adrianVmariano <adrianVmariano@users.noreply.github.com> Date: Tue, 2 Jan 2024 02:50:34 +0000 Subject: [PATCH 05/10] Version Bump --- version.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.scad b/version.scad index 639be96..cd506b1 100644 --- a/version.scad +++ b/version.scad @@ -9,7 +9,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,670]; +BOSL_VERSION = [2,0,671]; // Section: BOSL Library Version Functions From b01b475467451d3c966a05d865963c8460702318 Mon Sep 17 00:00:00 2001 From: adrianVmariano <adrianVmariano@users.noreply.github.com> Date: Tue, 2 Jan 2024 03:06:08 +0000 Subject: [PATCH 06/10] Version Bump --- version.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.scad b/version.scad index 0cbf8f3..22b8072 100644 --- a/version.scad +++ b/version.scad @@ -10,7 +10,7 @@ -BOSL_VERSION = [2,0,672]; +BOSL_VERSION = [2,0,673]; // Section: BOSL Library Version Functions From dafc8d28a73a03f5704d2c7e7a1032a94aaeb84e Mon Sep 17 00:00:00 2001 From: Adrian Mariano <avm4@cornell.edu> Date: Mon, 1 Jan 2024 22:08:08 -0500 Subject: [PATCH 07/10] fixing version? --- version.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.scad b/version.scad index 639be96..071d01d 100644 --- a/version.scad +++ b/version.scad @@ -9,7 +9,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,670]; +BOSL_VERSION = [2,0,673]; // Section: BOSL Library Version Functions From 80035f03dbbb9ab70c6cdd504836433bebc12c08 Mon Sep 17 00:00:00 2001 From: adrianVmariano <adrianVmariano@users.noreply.github.com> Date: Tue, 2 Jan 2024 03:10:46 +0000 Subject: [PATCH 08/10] Version Bump --- version.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.scad b/version.scad index 22b8072..73771dc 100644 --- a/version.scad +++ b/version.scad @@ -10,7 +10,7 @@ -BOSL_VERSION = [2,0,673]; +BOSL_VERSION = [2,0,674]; // Section: BOSL Library Version Functions From 8ba1df78bd5f68c2b66a242424dc1d0e4c17aeda Mon Sep 17 00:00:00 2001 From: revarbat <revarbat@users.noreply.github.com> Date: Fri, 5 Jan 2024 00:59:47 +0000 Subject: [PATCH 09/10] Version Bump --- version.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.scad b/version.scad index 73771dc..e03618e 100644 --- a/version.scad +++ b/version.scad @@ -10,7 +10,7 @@ -BOSL_VERSION = [2,0,674]; +BOSL_VERSION = [2,0,675]; // Section: BOSL Library Version Functions From 9f056b00e48243a27ab590d6a71fca44bfb574e9 Mon Sep 17 00:00:00 2001 From: revarbat <revarbat@users.noreply.github.com> Date: Fri, 5 Jan 2024 01:00:24 +0000 Subject: [PATCH 10/10] Version Bump --- version.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.scad b/version.scad index e03618e..7b92c40 100644 --- a/version.scad +++ b/version.scad @@ -10,7 +10,7 @@ -BOSL_VERSION = [2,0,675]; +BOSL_VERSION = [2,0,676]; // Section: BOSL Library Version Functions