mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +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_geom = geom;
|
||||||
$parent_size = attach_geom_size(geom);
|
$parent_size = attach_geom_size(geom);
|
||||||
$attach_to = undef;
|
$attach_to = undef;
|
||||||
if (attachment_is_shown($tags)) {
|
do_show = attachment_is_shown($tags);
|
||||||
|
if (do_show) {
|
||||||
if (is_undef($color)) {
|
if (is_undef($color)) {
|
||||||
children(0);
|
children(0);
|
||||||
} else color($color) {
|
} else color($color) {
|
||||||
|
@ -1270,7 +1271,7 @@ module recolor(c)
|
||||||
// Usage:
|
// Usage:
|
||||||
// hide(tags) ...
|
// hide(tags) ...
|
||||||
// Description:
|
// Description:
|
||||||
// Hides all children with the given tags.
|
// Hides all children with the given tags. Overrides any previous `hide()` or `show()` calls.
|
||||||
// Example:
|
// Example:
|
||||||
// hide("A") cube(50, anchor=CENTER, $tags="Main") {
|
// hide("A") cube(50, anchor=CENTER, $tags="Main") {
|
||||||
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
|
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
|
||||||
|
@ -1279,6 +1280,7 @@ module recolor(c)
|
||||||
module hide(tags="")
|
module hide(tags="")
|
||||||
{
|
{
|
||||||
$tags_hidden = tags==""? [] : str_split(tags, " ");
|
$tags_hidden = tags==""? [] : str_split(tags, " ");
|
||||||
|
$tags_shown = [];
|
||||||
children();
|
children();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1287,7 +1289,7 @@ module hide(tags="")
|
||||||
// Usage:
|
// Usage:
|
||||||
// show(tags) ...
|
// show(tags) ...
|
||||||
// Description:
|
// Description:
|
||||||
// Shows only children with the given tags.
|
// Shows only children with the given tags. Overrides any previous `hide()` or `show()` calls.
|
||||||
// Example:
|
// Example:
|
||||||
// show("A B") cube(50, anchor=CENTER, $tags="Main") {
|
// show("A B") cube(50, anchor=CENTER, $tags="Main") {
|
||||||
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
|
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
|
||||||
|
@ -1296,6 +1298,7 @@ module hide(tags="")
|
||||||
module show(tags="")
|
module show(tags="")
|
||||||
{
|
{
|
||||||
$tags_shown = tags==""? [] : str_split(tags, " ");
|
$tags_shown = tags==""? [] : str_split(tags, " ");
|
||||||
|
$tags_hidden = [];
|
||||||
children();
|
children();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,462];
|
BOSL_VERSION = [2,0,463];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue