remove nil and noop

This commit is contained in:
Adrian Mariano 2021-11-15 23:55:57 -05:00
parent 886d316532
commit 6b20232f99
3 changed files with 9 additions and 29 deletions

View file

@ -1885,7 +1885,8 @@ module show_anchors(s=10, std=true, custom=true) {
anchor_arrow(s, color="cyan");
}
color("black")
noop($tags="anchor-arrow") {
// tags("anchor-arrow")
{
xrot(two_d? 0 : 90) {
back(s/3) {
yrot_copies(n=2)
@ -1897,11 +1898,12 @@ module show_anchors(s=10, std=true, custom=true) {
}
}
}
color([1, 1, 1, 0.4])
noop($tags="anchor-arrow") {
color([1, 1, 1, 1])
tags("anchor-arrow")
{
xrot(two_d? 0 : 90) {
back(s/3) {
zcopies(s/21) cube([s/4.5*len(anchor[0]), s/3, 0.01], center=true);
cube([s/4.5*len(anchor[0]), s/3, 0.01], center=true);
}
}
}
@ -1953,7 +1955,7 @@ module anchor_arrow(s=10, color=[0.333,0.333,1], flag=true, $tags="anchor-arrow"
// Example:
// anchor_arrow2d(s=20);
module anchor_arrow2d(s=15, color=[0.333,0.333,1], $tags="anchor-arrow") {
noop() color(color) stroke([[0,0],[0,s]], width=s/10, endcap1="butt", endcap2="arrow2");
color(color) stroke([[0,0],[0,s]], width=s/10, endcap1="butt", endcap2="arrow2");
}

View file

@ -2304,27 +2304,6 @@ module path_text(path, text, font, size, thickness, lettersize, offset=0, revers
// Section: Miscellaneous
// Module: nil()
//
// Description:
// Useful when you MUST pass a child to a module, but you want it to be nothing.
module nil() union(){}
// Module: noop()
//
// Description:
// Passes through the children passed to it, with no action at all. Useful while debugging when
// you want to replace a command. This is an attachable non-object.
//
// Arguments:
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#spin). Default: `0`
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#orient). Default: `UP`
module noop(spin=0, orient=UP) attachable(CENTER,spin,orient, d=0.01) {nil(); children();}
// Module: interior_fillet()
//
// Description:

View file

@ -535,7 +535,6 @@ module npt_threaded_rod(
higbee=r1*PI/2
);
if (hollow) cylinder(l=l+1, d=size*INCH, center=true);
else nil();
}
children();
}