mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Attempt to fix errors with union(), difference(), intersection() with infinitesimally misaligned paths.
This commit is contained in:
parent
6433ebaa82
commit
2aaa7006e7
2 changed files with 4 additions and 4 deletions
|
@ -644,7 +644,7 @@ function union(regions=[],b=undef,c=undef,eps=EPSILON) =
|
||||||
b!=undef? union(concat([regions],[b],c==undef?[]:[c]), eps=eps) :
|
b!=undef? union(concat([regions],[b],c==undef?[]:[c]), eps=eps) :
|
||||||
len(regions)<=1? regions[0] :
|
len(regions)<=1? regions[0] :
|
||||||
union(
|
union(
|
||||||
let(regions=[for (r=regions) is_path(r)? [r] : r])
|
let(regions=[for (r=regions) quant(is_path(r)? [r] : r, 1/65536)])
|
||||||
concat(
|
concat(
|
||||||
[_tagged_region(regions[0],regions[1],["O","S"],["O"], eps=eps)],
|
[_tagged_region(regions[0],regions[1],["O","S"],["O"], eps=eps)],
|
||||||
[for (i=[2:1:len(regions)-1]) regions[i]]
|
[for (i=[2:1:len(regions)-1]) regions[i]]
|
||||||
|
@ -675,7 +675,7 @@ function difference(regions=[],b=undef,c=undef,eps=EPSILON) =
|
||||||
b!=undef? difference(concat([regions],[b],c==undef?[]:[c]), eps=eps) :
|
b!=undef? difference(concat([regions],[b],c==undef?[]:[c]), eps=eps) :
|
||||||
len(regions)<=1? regions[0] :
|
len(regions)<=1? regions[0] :
|
||||||
difference(
|
difference(
|
||||||
let(regions=[for (r=regions) is_path(r)? [r] : r])
|
let(regions=[for (r=regions) quant(is_path(r)? [r] : r, 1/65536)])
|
||||||
concat(
|
concat(
|
||||||
[_tagged_region(regions[0],regions[1],["O","U"],["I"], eps=eps)],
|
[_tagged_region(regions[0],regions[1],["O","U"],["I"], eps=eps)],
|
||||||
[for (i=[2:1:len(regions)-1]) regions[i]]
|
[for (i=[2:1:len(regions)-1]) regions[i]]
|
||||||
|
@ -705,7 +705,7 @@ function intersection(regions=[],b=undef,c=undef,eps=EPSILON) =
|
||||||
b!=undef? intersection(concat([regions],[b],c==undef?[]:[c]),eps=eps) :
|
b!=undef? intersection(concat([regions],[b],c==undef?[]:[c]),eps=eps) :
|
||||||
len(regions)<=1? regions[0] :
|
len(regions)<=1? regions[0] :
|
||||||
intersection(
|
intersection(
|
||||||
let(regions=[for (r=regions) is_path(r)? [r] : r])
|
let(regions=[for (r=regions) quant(is_path(r)? [r] : r, 1/65536)])
|
||||||
concat(
|
concat(
|
||||||
[_tagged_region(regions[0],regions[1],["I","S"],["I"],eps=eps)],
|
[_tagged_region(regions[0],regions[1],["I","S"],["I"],eps=eps)],
|
||||||
[for (i=[2:1:len(regions)-1]) regions[i]]
|
[for (i=[2:1:len(regions)-1]) regions[i]]
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,159];
|
BOSL_VERSION = [2,0,160];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue