Merge pull request #752 from adrianVmariano/master

debug function rename, etc
This commit is contained in:
Revar Desmera
2022-01-09 18:06:14 -08:00
committed by GitHub
5 changed files with 279 additions and 403 deletions

View File

@@ -528,65 +528,6 @@ module tags(tags)
}
// Module: recolor()
// Usage:
// recolor(c) {...}
// Topics: Attachments
// See Also: tags(), hide(), show(), diff(), intersect()
// Description:
// Sets the color for children that can use the $color special variable. For a more step-by-step
// explanation of attachments, see the [[Attachments Tutorial|Tutorial-Attachments]].
// Arguments:
// c = Color name or RGBA vector.
// Example:
// recolor("red") cyl(l=20, d=10);
module recolor(c)
{
$color = c;
children();
}
// Module: hide()
// Usage:
// hide(tags) {...}
// Topics: Attachments
// See Also: tags(), recolor(), show(), diff(), intersect()
// Description:
// Hides all children with the given tags. Overrides any previous `hide()` or `show()` calls.
// For a more step-by-step explanation of attachments, see the [[Attachments Tutorial|Tutorial-Attachments]].
// Example:
// hide("A") cube(50, anchor=CENTER, $tags="Main") {
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
// attach(RIGHT, BOTTOM) cylinder(d=30, l=30, $tags="B");
// }
module hide(tags="")
{
$tags_hidden = tags==""? [] : str_split(tags, " ");
$tags_shown = [];
children();
}
// Module: show()
// Usage:
// show(tags) {...}
// Topics: Attachments
// See Also: tags(), recolor(), hide(), diff(), intersect()
// Description:
// Shows only children with the given tags. Overrides any previous `hide()` or `show()` calls.
// For a more step-by-step explanation of attachments, see the [[Attachments Tutorial|Tutorial-Attachments]].
// Example:
// show("A B") cube(50, anchor=CENTER, $tags="Main") {
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
// attach(RIGHT, BOTTOM) cylinder(d=30, l=30, $tags="B");
// }
module show(tags="")
{
$tags_shown = tags==""? [] : str_split(tags, " ");
$tags_hidden = [];
children();
}
// Module: diff()
@@ -755,6 +696,67 @@ module hulling(a)
}
// Module: recolor()
// Usage:
// recolor(c) {...}
// Topics: Attachments
// See Also: tags(), hide(), show(), diff(), intersect()
// Description:
// Sets the color for children that can use the $color special variable. For a more step-by-step
// explanation of attachments, see the [[Attachments Tutorial|Tutorial-Attachments]].
// Arguments:
// c = Color name or RGBA vector.
// Example:
// recolor("red") cyl(l=20, d=10);
module recolor(c)
{
$color = c;
children();
}
// Module: hide()
// Usage:
// hide(tags) {...}
// Topics: Attachments
// See Also: tags(), recolor(), show(), diff(), intersect()
// Description:
// Hides all children with the given tags. Overrides any previous `hide()` or `show()` calls.
// For a more step-by-step explanation of attachments, see the [[Attachments Tutorial|Tutorial-Attachments]].
// Example:
// hide("A") cube(50, anchor=CENTER, $tags="Main") {
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
// attach(RIGHT, BOTTOM) cylinder(d=30, l=30, $tags="B");
// }
module hide(tags="")
{
$tags_hidden = tags==""? [] : str_split(tags, " ");
$tags_shown = [];
children();
}
// Module: show()
// Usage:
// show(tags) {...}
// Topics: Attachments
// See Also: tags(), recolor(), hide(), diff(), intersect()
// Description:
// Shows only children with the given tags. Overrides any previous `hide()` or `show()` calls.
// For a more step-by-step explanation of attachments, see the [[Attachments Tutorial|Tutorial-Attachments]].
// Example: Display the attachments but not the parent
// show("A B") cube(50, anchor=CENTER, $tags="Main") {
// attach(LEFT, BOTTOM) cylinder(d=30, l=30, $tags="A");
// attach(RIGHT, BOTTOM) cylinder(d=30, l=30, $tags="B");
// }
module show(tags="")
{
$tags_shown = tags==""? [] : str_split(tags, " ");
$tags_hidden = [];
children();
}
// Section: Attachable Masks