mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-06 04:09:47 +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)
|
||||
{
|
||||
// Don't perform the operation if the current tags are hidden
|
||||
if (attachment_is_shown($tags)) {
|
||||
difference() {
|
||||
if (pos != undef) {
|
||||
show(pos) children();
|
||||
|
@ -1247,6 +1249,7 @@ module diff(neg, pos=undef, keep=undef)
|
|||
}
|
||||
show(neg) children();
|
||||
}
|
||||
}
|
||||
if (keep!=undef) {
|
||||
show(keep) children();
|
||||
} else if (pos!=undef) {
|
||||
|
@ -1280,6 +1283,8 @@ module diff(neg, pos=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() {
|
||||
if (b != undef) {
|
||||
show(b) children();
|
||||
|
@ -1292,6 +1297,7 @@ module intersect(a, b=undef, keep=undef)
|
|||
}
|
||||
show(a) children();
|
||||
}
|
||||
}
|
||||
if (keep!=undef) {
|
||||
show(keep) children();
|
||||
} else if (b!=undef) {
|
||||
|
|
Loading…
Reference in a new issue