From cea39fc7b6ea9a356306b0c5f1d3364308f7b040 Mon Sep 17 00:00:00 2001 From: Richard Milewski Date: Tue, 3 Oct 2023 11:41:46 -0700 Subject: [PATCH 1/3] Set default_tag("remove") --- masks2d.scad | 72 ++++++++++++------ masks3d.scad | 202 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 175 insertions(+), 99 deletions(-) diff --git a/masks2d.scad b/masks2d.scad index 96c2aea5..d52ea61b 100644 --- a/masks2d.scad +++ b/masks2d.scad @@ -37,6 +37,9 @@ // d = Diameter of the roundover. // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` +// Side Effects: +// Sets the default tag to "remove". +// // Example(2D): 2D Roundover Mask // mask2d_roundover(r=10); // Example(2D): 2D Bead Mask @@ -60,9 +63,11 @@ // mask2d_roundover(r=10); module mask2d_roundover(r, inset=0, mask_angle=90, excess=0.01, d, anchor=CENTER,spin=0) { path = mask2d_roundover(r=r, d=d, inset=inset, mask_angle=mask_angle, excess=excess); - attachable(anchor,spin, two_d=true, path=path) { - polygon(path); - children(); + default_tag("remove") { + attachable(anchor,spin, two_d=true, path=path) { + polygon(path); + children(); + } } } @@ -114,6 +119,8 @@ function mask2d_roundover(r, inset=0, mask_angle=90, excess=0.01, d, anchor=CENT // d = Diameter of the cove. // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` +// Side Effects: +// Sets the default tag to "remove". // Example(2D): 2D Cove Mask // mask2d_cove(r=10); // Example(2D): 2D Inset Cove Mask @@ -137,9 +144,11 @@ function mask2d_roundover(r, inset=0, mask_angle=90, excess=0.01, d, anchor=CENT // mask2d_cove(r=5, inset=5); module mask2d_cove(r, inset=0, mask_angle=90, excess=0.01, d, anchor=CENTER, spin=0) { path = mask2d_cove(r=r, d=d, inset=inset, mask_angle=mask_angle, excess=excess); - attachable(anchor,spin, two_d=true, path=path) { - polygon(path); - children(); + default_tag("remove") { + attachable(anchor,spin, two_d=true, path=path) { + polygon(path); + children(); + } } } @@ -198,6 +207,8 @@ function mask2d_cove(r, inset=0, mask_angle=90, excess=0.01, d, anchor=CENTER, s // y = The height of the chamfer. // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` +// Side Effects: +// Sets the default tag to "remove". // Example(2D): 2D Chamfer Mask // mask2d_chamfer(x=10); // Example(2D): 2D Chamfer Mask by Width. @@ -221,9 +232,11 @@ function mask2d_cove(r, inset=0, mask_angle=90, excess=0.01, d, anchor=CENTER, s // mask2d_chamfer(edge=10); module mask2d_chamfer(edge, angle=45, inset=0, excess=0.01, x, y, anchor=CENTER,spin=0) { path = mask2d_chamfer(x=x, y=y, edge=edge, angle=angle, excess=excess, inset=inset); - attachable(anchor,spin, two_d=true, path=path, extent=true) { - polygon(path); - children(); + default_tag("remove") { + attachable(anchor,spin, two_d=true, path=path, extent=true) { + polygon(path); + children(); + } } } @@ -269,6 +282,8 @@ function mask2d_chamfer(edge, angle=45, inset=0, excess=0.01, x, y, anchor=CENTE // --- // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` +// Side Effects: +// Sets the default tag to "remove". // Example(2D): 2D Rabbet Mask // mask2d_rabbet(size=10); // Example(2D): 2D Asymmetrical Rabbet Mask @@ -290,9 +305,11 @@ function mask2d_chamfer(edge, angle=45, inset=0, excess=0.01, x, y, anchor=CENTE // mask2d_rabbet(size=[5,10]); module mask2d_rabbet(size, mask_angle=90, excess=0.01, anchor=CTR, spin=0) { path = mask2d_rabbet(size=size, mask_angle=mask_angle, excess=excess); - attachable(anchor,spin, two_d=true, path=path, extent=false) { - polygon(path); - children(); + default_tag("remove") { + attachable(anchor,spin, two_d=true, path=path, extent=false) { + polygon(path); + children(); + } } } @@ -344,6 +361,8 @@ function mask2d_rabbet(size, mask_angle=90, excess=0.01, anchor=CTR, spin=0) = // y = The height of the dovetail. // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` +// Side Effects: +// Sets the default tag to "remove". // Example(2D): 2D Dovetail Mask // mask2d_dovetail(x=10); // Example(2D): 2D Dovetail Mask by Width. @@ -367,9 +386,11 @@ function mask2d_rabbet(size, mask_angle=90, excess=0.01, anchor=CTR, spin=0) = // mask2d_dovetail(x=10); module mask2d_dovetail(edge, angle=30, inset=0, shelf=0, excess=0.01, x, y, anchor=CENTER, spin=0) { path = mask2d_dovetail(x=x, y=y, edge=edge, angle=angle, inset=inset, shelf=shelf, excess=excess); - attachable(anchor,spin, two_d=true, path=path) { - polygon(path); - children(); + default_tag("remove") { + attachable(anchor,spin, two_d=true, path=path) { + polygon(path); + children(); + } } } @@ -420,6 +441,8 @@ function mask2d_dovetail(edge, angle=30, inset=0, shelf=0, excess=0.01, x, y, an // d = Diameter of the rounding. // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` +// Side Effects: +// Sets the default tag to "remove". // Example(2D): 2D Teardrop Mask // mask2d_teardrop(r=10); // Example(2D): 2D Teardrop Mask for a Non-Right Edge @@ -469,9 +492,11 @@ function mask2d_teardrop(r, angle=45, mask_angle=90, excess=0.01, d, anchor=CENT module mask2d_teardrop(r, angle=45, mask_angle=90, excess=0.01, d, anchor=CENTER, spin=0) { path = mask2d_teardrop(r=r, d=d, angle=angle, mask_angle=mask_angle, excess=excess); - attachable(anchor,spin, two_d=true, path=path) { - polygon(path); - children(); + default_tag("remove") { + attachable(anchor,spin, two_d=true, path=path) { + polygon(path); + children(); + } } } @@ -510,6 +535,9 @@ module mask2d_teardrop(r, angle=45, mask_angle=90, excess=0.01, d, anchor=CENTER // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // +// Side Effects: +// Sets the default tag to "remove". +// // Example(2D): 2D Ogee Mask // mask2d_ogee([ // "xstep",1, "ystep",1, // Starting shoulder. @@ -539,9 +567,11 @@ module mask2d_teardrop(r, angle=45, mask_angle=90, excess=0.01, d, anchor=CENTER // ]); module mask2d_ogee(pattern, excess=0.01, anchor=CENTER,spin=0) { path = mask2d_ogee(pattern, excess=excess); - attachable(anchor,spin, two_d=true, path=path) { - polygon(path); - children(); + default_tag("remove") { + attachable(anchor,spin, two_d=true, path=path) { + polygon(path); + children(); + } } } diff --git a/masks3d.scad b/masks3d.scad index 4e479e42..67cae773 100644 --- a/masks3d.scad +++ b/masks3d.scad @@ -17,7 +17,7 @@ // Synopsis: Creates a shape to chamfer a 90° edge. // SynTags: Geom // Topics: Masking, Chamfers, Shapes (3D) -// See Also: chamfer_corner_mask(), chamfer_cylinder_mask(), chamfer_edge_mask() +// See Also: chamfer_corner_mask(), chamfer_cylinder_mask(), chamfer_edge_mask(), default_tag(), diff() // Usage: // chamfer_edge_mask(l|h=|length=|height=, chamfer, [excess]) [ATTACHMENTS]; // Description: @@ -32,6 +32,8 @@ // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` +// Side Effects: +// Sets the default_tag to "remove". // Example: // chamfer_edge_mask(l=50, chamfer=10); // Example: @@ -48,9 +50,11 @@ function chamfer_edge_mask(l, chamfer=1, excess=0.1, h, length, height, anchor=CENTER, spin=0, orient=UP) = no_function("chamfer_edge_mask"); module chamfer_edge_mask(l, chamfer=1, excess=0.1, h, length, height, anchor=CENTER, spin=0, orient=UP) { l = one_defined([l, h, height, length], "l,h,height,length"); - attachable(anchor,spin,orient, size=[chamfer*2, chamfer*2, l]) { - cylinder(r=chamfer, h=l+excess, center=true, $fn=4); - children(); + default_tag("remove") { + attachable(anchor,spin,orient, size=[chamfer*2, chamfer*2, l]) { + cylinder(r=chamfer, h=l+excess, center=true, $fn=4); + children(); + } } } @@ -59,7 +63,7 @@ module chamfer_edge_mask(l, chamfer=1, excess=0.1, h, length, height, anchor=CEN // Synopsis: Creates a shape to chamfer a 90° corner. // SynTags: Geom // Topics: Masking, Chamfers, Shapes (3D) -// See Also: chamfer_corner_mask(), chamfer_cylinder_mask(), chamfer_edge_mask() +// See Also: chamfer_corner_mask(), chamfer_cylinder_mask(), chamfer_edge_mask(), default_tag(), diff() // Usage: // chamfer_corner_mask(chamfer) [ATTACHMENTS]; // Description: @@ -72,6 +76,8 @@ module chamfer_edge_mask(l, chamfer=1, excess=0.1, h, length, height, anchor=CEN // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` +// Side Effects: +// Sets the default_tag to "remove". // Example: // chamfer_corner_mask(chamfer=10); // Example: @@ -90,7 +96,9 @@ module chamfer_edge_mask(l, chamfer=1, excess=0.1, h, length, height, anchor=CEN // show_anchors(); function chamfer_corner_mask(chamfer=1, anchor=CENTER, spin=0, orient=UP) = no_function("chamfer_corner_mask"); module chamfer_corner_mask(chamfer=1, anchor=CENTER, spin=0, orient=UP) { - octahedron(chamfer*4, anchor=anchor, spin=spin, orient=orient) children(); + default_tag("remove") { + octahedron(chamfer*4, anchor=anchor, spin=spin, orient=orient) children(); + } } @@ -98,7 +106,7 @@ module chamfer_corner_mask(chamfer=1, anchor=CENTER, spin=0, orient=UP) { // Synopsis: Creates a shape to chamfer the end of a cylinder. // SynTags: Geom // Topics: Masking, Chamfers, Cylinders -// See Also: chamfer_corner_mask(), chamfer_cylinder_mask(), chamfer_edge_mask() +// See Also: chamfer_corner_mask(), chamfer_cylinder_mask(), chamfer_edge_mask(), default_tag(), diff() // Usage: // chamfer_cylinder_mask(r|d=, chamfer, [ang], [from_end]) [ATTACHMENTS]; // Description: @@ -116,6 +124,8 @@ module chamfer_corner_mask(chamfer=1, anchor=CENTER, spin=0, orient=UP) { // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` +// Side Effects: +// Sets the default_tag to "remove". // Example: // difference() { // cylinder(r=50, h=100, center=true); @@ -147,12 +157,14 @@ module chamfer_cylinder_mask(r, chamfer, d, ang=45, from_end=false, anchor=CENTE r = get_radius(r=r, d=d, dflt=1); dummy = assert(all_nonnegative([chamfer]), "Chamfer must be a nonnegative number"); ch = from_end? chamfer : opp_ang_to_adj(chamfer,90-ang); - attachable(anchor,spin,orient, r=r, l=ch*2) { - difference() { - cyl(r=r+chamfer, l=ch*2, anchor=CENTER); - cyl(r=r, l=ch*3, chamfer=chamfer, chamfang=ang, from_end=from_end, anchor=TOP); + default_tag("remove"){ + attachable(anchor,spin,orient, r=r, l=ch*2) { + difference() { + cyl(r=r+chamfer, l=ch*2, anchor=CENTER); + cyl(r=r, l=ch*3, chamfer=chamfer, chamfang=ang, from_end=from_end, anchor=TOP); + } + children(); } - children(); } } @@ -164,7 +176,7 @@ module chamfer_cylinder_mask(r, chamfer, d, ang=45, from_end=false, anchor=CENTE // Synopsis: Creates a shape to round a 90° edge. // SynTags: Geom // Topics: Masks, Rounding, Shapes (3D) -// See Also: rounding_angled_edge_mask(), rounding_corner_mask(), rounding_angled_corner_mask() +// See Also: rounding_angled_edge_mask(), rounding_corner_mask(), rounding_angled_corner_mask(), default_tag(), diff() // Usage: // rounding_edge_mask(l|h=|length=|height=, r|d=, [excess=]) [ATTACHMENTS]; // rounding_edge_mask(l|h=|length=|height=, r1=|d1=, r2=|d2=, [excess=]) [ATTACHMENTS]; @@ -185,6 +197,8 @@ module chamfer_cylinder_mask(r, chamfer, d, ang=45, from_end=false, anchor=CENTE // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` +// Side Effects: +// Sets the default_tag to "remove". // Example(VPD=200,VPR=[55,0,120]): // rounding_edge_mask(l=50, r1=10, r2=25); // Example: @@ -217,25 +231,27 @@ module rounding_edge_mask(l, r, r1, r2, d, d1, d2, excess=0.1, anchor=CENTER, sp r1 = get_radius(r1=r1, r=r, d1=d1, d=d, dflt=1); r2 = get_radius(r1=r2, r=r, d1=d2, d=d, dflt=1); sides = quantup(segs(max(r1,r2)),4); - attachable(anchor,spin,orient, size=[2*r1,2*r1,l], size2=[2*r2,2*r2]) { - if (r1 Date: Tue, 3 Oct 2023 15:19:52 -0700 Subject: [PATCH 2/3] Switched to use default_tag("remove") --- attachments.scad | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/attachments.scad b/attachments.scad index 9e797b87..a9c0963b 100644 --- a/attachments.scad +++ b/attachments.scad @@ -1522,7 +1522,7 @@ module show_int(tags) // Arguments: // edges = Faces to mask. See [Specifying Faces](attachments.scad#subsection-specifying-faces) for information on specifying faces. Default: All faces // Side Effects: -// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. +// Sets the default_tag to "remove". // `$idx` is set to the index number of each face in the list of faces given. // `$attach_anchor` is set for each face given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // Example: @@ -1543,8 +1543,7 @@ module face_mask(faces=[LEFT,RIGHT,FRONT,BACK,BOT,TOP]) { assert(all([for (face=faces) is_vector(face) && sum([for (x=face) x!=0? 1 : 0])==1]), "Vector in faces doesn't point at a face."); assert($parent_geom != undef, "No object to attach to!"); attach(faces) { - if ($tag=="") tag("remove") children(); - else children(); + default_tag("remove") children(); } } @@ -1575,9 +1574,7 @@ module face_mask(faces=[LEFT,RIGHT,FRONT,BACK,BOT,TOP]) { // edges = Edges to mask. See [Specifying Edges](attachments.scad#subsection-specifying-edges). Default: All edges. // except = Edges to explicitly NOT mask. See [Specifying Edges](attachments.scad#subsection-specifying-edges). Default: No edges. // Side Effects: -// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. -// Side Effects: -// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. +// Sets the default_tag to "remove". // `$idx` is set to the index number of each edge. // `$attach_anchor` is set for each edge given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // Example: @@ -1608,8 +1605,7 @@ module edge_mask(edges=EDGES_ALL, except=[]) { vec.z==0 && sign(vec.x)!=sign(vec.y)? [0,180,45+v_theta(vec)] : [-90,0,180+v_theta(vec)]; translate(anch[1]) rot(rotang) - if ($tag=="") tag("remove") children(); - else children(); + default_tag("remove") children(); } } @@ -1631,7 +1627,7 @@ module edge_mask(edges=EDGES_ALL, except=[]) { // corners = Corners to mask. See [Specifying Corners](attachments.scad#subsection-specifying-corners). Default: All corners. // except = Corners to explicitly NOT mask. See [Specifying Corners](attachments.scad#subsection-specifying-corners). Default: No corners. // Side Effects: -// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. +// Sets the default_tag to "remove". // `$idx` is set to the index number of each corner. // `$attach_anchor` is set for each corner given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // Example: @@ -1659,8 +1655,7 @@ module corner_mask(corners=CORNERS_ALL, except=[]) { [ 0,0,180+v_theta(vec)-45] : [180,0,-90+v_theta(vec)-45]; translate(anch[1]) rot(rotang) - if ($tag=="") tag("remove") children(); - else children(); + default_tag("remove") children(); } } @@ -1826,7 +1821,7 @@ module edge_profile(edges=EDGES_ALL, except=[], excess=0.01, convexity=10) { // corner_type = Specifies how exterior corners should be formed. Must be one of `"none"`, `"chamfer"`, `"round"`, or `"sharp"`. Default: `"none"` // size = If given the width and height of the 2D profile, will enable rounding and chamfering of internal corners when given a negative profile. // Side Effects: -// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. +// Sets the default_tag to "remove". // `$idx` is set to the index number of each edge. // `$attach_anchor` is set for each edge given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // `$profile_type` is set to `"edge"`. @@ -2167,7 +2162,7 @@ module edge_profile_asym( // d = Diameter of corner mask. // convexity = Max number of times a line could intersect the perimeter of the mask shape. Default: 10 // Side Effects: -// Tags the children with "remove" (and hence sets $tag) if no tag is already set. +// Sets the default_tag to "remove". // `$idx` is set to the index number of each corner. // `$attach_anchor` is set for each corner given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // `$profile_type` is set to `"corner"`. @@ -2195,21 +2190,22 @@ module corner_profile(corners=CORNERS_ALL, except=[], r, d, convexity=10) { rotang = vec.z<0? [ 0,0,180+v_theta(vec)-45] : [180,0,-90+v_theta(vec)-45]; - $tag = $tag=="" ? str($tag_prefix,"remove") : $tag; - translate(anch[1]) { - rot(rotang) { - down(0.01) { - linear_extrude(height=r+0.01, center=false) { - difference() { - translate(-[0.01,0.01]) square(r); - translate([r,r]) circle(r=r*0.999); + default_tag("remove"){ + translate(anch[1]) { + rot(rotang) { + down(0.01) { + linear_extrude(height=r+0.01, center=false) { + difference() { + translate(-[0.01,0.01]) square(r); + translate([r,r]) circle(r=r*0.999); + } } } - } - translate([r,r]) zrot(180) { - rotate_extrude(angle=90, convexity=convexity) { - right(r) xflip() { - children(); + translate([r,r]) zrot(180) { + rotate_extrude(angle=90, convexity=convexity) { + right(r) xflip() { + children(); + } } } } From 1be8202be1c8196360b3240f2845902d8a38379e Mon Sep 17 00:00:00 2001 From: Richard Milewski Date: Tue, 3 Oct 2023 22:46:58 -0700 Subject: [PATCH 3/3] Changingn default_tag() Side Effect description --- attachments.scad | 10 +++++----- masks2d.scad | 14 +++++++------- masks3d.scad | 22 +++++++++++----------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/attachments.scad b/attachments.scad index a9c0963b..3657741c 100644 --- a/attachments.scad +++ b/attachments.scad @@ -1522,7 +1522,7 @@ module show_int(tags) // Arguments: // edges = Faces to mask. See [Specifying Faces](attachments.scad#subsection-specifying-faces) for information on specifying faces. Default: All faces // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // `$idx` is set to the index number of each face in the list of faces given. // `$attach_anchor` is set for each face given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // Example: @@ -1574,7 +1574,7 @@ module face_mask(faces=[LEFT,RIGHT,FRONT,BACK,BOT,TOP]) { // edges = Edges to mask. See [Specifying Edges](attachments.scad#subsection-specifying-edges). Default: All edges. // except = Edges to explicitly NOT mask. See [Specifying Edges](attachments.scad#subsection-specifying-edges). Default: No edges. // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // `$idx` is set to the index number of each edge. // `$attach_anchor` is set for each edge given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // Example: @@ -1627,7 +1627,7 @@ module edge_mask(edges=EDGES_ALL, except=[]) { // corners = Corners to mask. See [Specifying Corners](attachments.scad#subsection-specifying-corners). Default: All corners. // except = Corners to explicitly NOT mask. See [Specifying Corners](attachments.scad#subsection-specifying-corners). Default: No corners. // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // `$idx` is set to the index number of each corner. // `$attach_anchor` is set for each corner given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // Example: @@ -1821,7 +1821,7 @@ module edge_profile(edges=EDGES_ALL, except=[], excess=0.01, convexity=10) { // corner_type = Specifies how exterior corners should be formed. Must be one of `"none"`, `"chamfer"`, `"round"`, or `"sharp"`. Default: `"none"` // size = If given the width and height of the 2D profile, will enable rounding and chamfering of internal corners when given a negative profile. // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // `$idx` is set to the index number of each edge. // `$attach_anchor` is set for each edge given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // `$profile_type` is set to `"edge"`. @@ -2162,7 +2162,7 @@ module edge_profile_asym( // d = Diameter of corner mask. // convexity = Max number of times a line could intersect the perimeter of the mask shape. Default: 10 // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // `$idx` is set to the index number of each corner. // `$attach_anchor` is set for each corner given, to the `[ANCHOR, POSITION, ORIENT, SPIN]` information for that anchor. // `$profile_type` is set to `"corner"`. diff --git a/masks2d.scad b/masks2d.scad index d52ea61b..81071a6f 100644 --- a/masks2d.scad +++ b/masks2d.scad @@ -38,7 +38,7 @@ // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // Side Effects: -// Sets the default tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // // Example(2D): 2D Roundover Mask // mask2d_roundover(r=10); @@ -120,7 +120,7 @@ function mask2d_roundover(r, inset=0, mask_angle=90, excess=0.01, d, anchor=CENT // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // Side Effects: -// Sets the default tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example(2D): 2D Cove Mask // mask2d_cove(r=10); // Example(2D): 2D Inset Cove Mask @@ -208,7 +208,7 @@ function mask2d_cove(r, inset=0, mask_angle=90, excess=0.01, d, anchor=CENTER, s // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // Side Effects: -// Sets the default tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example(2D): 2D Chamfer Mask // mask2d_chamfer(x=10); // Example(2D): 2D Chamfer Mask by Width. @@ -283,7 +283,7 @@ function mask2d_chamfer(edge, angle=45, inset=0, excess=0.01, x, y, anchor=CENTE // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // Side Effects: -// Sets the default tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example(2D): 2D Rabbet Mask // mask2d_rabbet(size=10); // Example(2D): 2D Asymmetrical Rabbet Mask @@ -362,7 +362,7 @@ function mask2d_rabbet(size, mask_angle=90, excess=0.01, anchor=CTR, spin=0) = // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // Side Effects: -// Sets the default tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example(2D): 2D Dovetail Mask // mask2d_dovetail(x=10); // Example(2D): 2D Dovetail Mask by Width. @@ -442,7 +442,7 @@ function mask2d_dovetail(edge, angle=30, inset=0, shelf=0, excess=0.01, x, y, an // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // Side Effects: -// Sets the default tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example(2D): 2D Teardrop Mask // mask2d_teardrop(r=10); // Example(2D): 2D Teardrop Mask for a Non-Right Edge @@ -536,7 +536,7 @@ module mask2d_teardrop(r, angle=45, mask_angle=90, excess=0.01, d, anchor=CENTER // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // // Side Effects: -// Sets the default tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // // Example(2D): 2D Ogee Mask // mask2d_ogee([ diff --git a/masks3d.scad b/masks3d.scad index 67cae773..622a4a19 100644 --- a/masks3d.scad +++ b/masks3d.scad @@ -33,7 +33,7 @@ // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example: // chamfer_edge_mask(l=50, chamfer=10); // Example: @@ -77,7 +77,7 @@ module chamfer_edge_mask(l, chamfer=1, excess=0.1, h, length, height, anchor=CEN // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example: // chamfer_corner_mask(chamfer=10); // Example: @@ -125,7 +125,7 @@ module chamfer_corner_mask(chamfer=1, anchor=CENTER, spin=0, orient=UP) { // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example: // difference() { // cylinder(r=50, h=100, center=true); @@ -198,7 +198,7 @@ module chamfer_cylinder_mask(r, chamfer, d, ang=45, from_end=false, anchor=CENTE // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example(VPD=200,VPR=[55,0,120]): // rounding_edge_mask(l=50, r1=10, r2=25); // Example: @@ -277,7 +277,7 @@ module rounding_edge_mask(l, r, r1, r2, d, d1, d2, excess=0.1, anchor=CENTER, sp // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example: // rounding_corner_mask(r=20.0); // Example: @@ -340,7 +340,7 @@ module rounding_corner_mask(r, d, style="octa", excess=0.1, anchor=CENTER, spin= // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example: // difference() { // pie_slice(ang=70, h=50, d=100, center=true); @@ -410,7 +410,7 @@ module rounding_angled_edge_mask(h, r, r1, r2, d, d1, d2, ang=90, anchor=CENTER, // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example(Med): // ang=60; // difference() { @@ -467,7 +467,7 @@ module rounding_angled_corner_mask(r, ang=90, d, anchor=CENTER, spin=0, orient=U // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example: // difference() { // cylinder(r=50, h=50, center=false); @@ -524,7 +524,7 @@ module rounding_cylinder_mask(r, rounding, d, anchor=CENTER, spin=0, orient=UP) // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example: // rounding_hole_mask(r=40, rounding=20, $fa=2, $fs=2); // Example(Med): @@ -579,7 +579,7 @@ module rounding_hole_mask(r, rounding, excess=0.1, d, anchor=CENTER, spin=0, ori // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example(VPD=50,VPR=[55,0,120]): // teardrop_edge_mask(l=20, r=10, angle=40); // Example(VPD=300,VPR=[75,0,25]): @@ -625,7 +625,7 @@ module teardrop_edge_mask(l, r, angle=45, excess=0.1, d, anchor=CTR, spin=0, ori // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0` // orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP` // Side Effects: -// Sets the default_tag to "remove". +// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set. // Example: // teardrop_corner_mask(r=20, angle=40); // Example: