mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Fix for nested diff()s, issue #270
This commit is contained in:
parent
dafc1a8aac
commit
914e57cc6e
2 changed files with 7 additions and 4 deletions
|
@ -923,7 +923,8 @@ module attachable(
|
|||
$parent_geom = geom;
|
||||
$parent_size = attach_geom_size(geom);
|
||||
$attach_to = undef;
|
||||
if (attachment_is_shown($tags)) {
|
||||
do_show = attachment_is_shown($tags);
|
||||
if (do_show) {
|
||||
if (is_undef($color)) {
|
||||
children(0);
|
||||
} else color($color) {
|
||||
|
@ -1270,7 +1271,7 @@ module recolor(c)
|
|||
// Usage:
|
||||
// hide(tags) ...
|
||||
// Description:
|
||||
// Hides all children with the given tags.
|
||||
// Hides all children with the given tags. Overrides any previous `hide()` or `show()` calls.
|
||||
// Example:
|
||||
// hide("A") cube(50, anchor=CENTER, $tags="Main") {
|
||||
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
|
||||
|
@ -1279,6 +1280,7 @@ module recolor(c)
|
|||
module hide(tags="")
|
||||
{
|
||||
$tags_hidden = tags==""? [] : str_split(tags, " ");
|
||||
$tags_shown = [];
|
||||
children();
|
||||
}
|
||||
|
||||
|
@ -1287,7 +1289,7 @@ module hide(tags="")
|
|||
// Usage:
|
||||
// show(tags) ...
|
||||
// Description:
|
||||
// Shows only children with the given tags.
|
||||
// Shows only children with the given tags. Overrides any previous `hide()` or `show()` calls.
|
||||
// Example:
|
||||
// show("A B") cube(50, anchor=CENTER, $tags="Main") {
|
||||
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
|
||||
|
@ -1296,6 +1298,7 @@ module hide(tags="")
|
|||
module show(tags="")
|
||||
{
|
||||
$tags_shown = tags==""? [] : str_split(tags, " ");
|
||||
$tags_hidden = [];
|
||||
children();
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,462];
|
||||
BOSL_VERSION = [2,0,463];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
|
Loading…
Reference in a new issue