mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-08 13:19:45 +00:00
Merge pull request #242 from kelvie/diff-tag-fix
Fix diff/intersect when some tags are hidden
This commit is contained in:
commit
248921df8d
1 changed files with 22 additions and 16 deletions
|
@ -1235,6 +1235,8 @@ module show(tags="")
|
||||||
// }
|
// }
|
||||||
module diff(neg, pos=undef, keep=undef)
|
module diff(neg, pos=undef, keep=undef)
|
||||||
{
|
{
|
||||||
|
// Don't perform the operation if the current tags are hidden
|
||||||
|
if (attachment_is_shown($tags)) {
|
||||||
difference() {
|
difference() {
|
||||||
if (pos != undef) {
|
if (pos != undef) {
|
||||||
show(pos) children();
|
show(pos) children();
|
||||||
|
@ -1247,6 +1249,7 @@ module diff(neg, pos=undef, keep=undef)
|
||||||
}
|
}
|
||||||
show(neg) children();
|
show(neg) children();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (keep!=undef) {
|
if (keep!=undef) {
|
||||||
show(keep) children();
|
show(keep) children();
|
||||||
} else if (pos!=undef) {
|
} else if (pos!=undef) {
|
||||||
|
@ -1280,6 +1283,8 @@ module diff(neg, pos=undef, keep=undef)
|
||||||
// }
|
// }
|
||||||
module intersect(a, b=undef, keep=undef)
|
module intersect(a, b=undef, keep=undef)
|
||||||
{
|
{
|
||||||
|
// Don't perform the operation if the current tags are hidden
|
||||||
|
if (attachment_is_shown($tags)) {
|
||||||
intersection() {
|
intersection() {
|
||||||
if (b != undef) {
|
if (b != undef) {
|
||||||
show(b) children();
|
show(b) children();
|
||||||
|
@ -1292,6 +1297,7 @@ module intersect(a, b=undef, keep=undef)
|
||||||
}
|
}
|
||||||
show(a) children();
|
show(a) children();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (keep!=undef) {
|
if (keep!=undef) {
|
||||||
show(keep) children();
|
show(keep) children();
|
||||||
} else if (b!=undef) {
|
} else if (b!=undef) {
|
||||||
|
|
Loading…
Reference in a new issue