Merge pull request #1492 from RAMilewski/master

Removed default "remove" tags from masks2d.scad
This commit is contained in:
Revar Desmera 2024-10-20 02:45:22 -07:00 committed by GitHub
commit eccdecca4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,8 +67,6 @@ function _inset_corner(corner, mask_angle, inset, excess, flat_top) =
// quarter_round = If true, make a roundover independent of the mask_angle, defined based on a quarter circle of the specified size. Creates mask with angle-independent height. Default: false.
// 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:
// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set.
//
// Example(2D): 2D Roundover Mask by Radius
// mask2d_roundover(r=10);
@ -131,11 +129,9 @@ function _inset_corner(corner, mask_angle, inset, excess, flat_top) =
module mask2d_roundover(r, inset=0, mask_angle=90, excess=0.01, flat_top, d, h, height, cut, quarter_round=false, joint, anchor=CENTER,spin=0) {
path = mask2d_roundover(r=r, d=d, h=h, height=height, cut=cut, joint=joint, inset=inset,
flat_top=flat_top, mask_angle=mask_angle, excess=excess, quarter_round=quarter_round);
default_tag("remove") {
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
}
@ -235,8 +231,6 @@ function mask2d_roundover(r, inset=0, mask_angle=90, excess=0.01, flat_top, quar
// flat_top = If true, the top inset of the mask will be horizontal instead of angled by the mask_angle. Default: true.
// 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:
// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set.
// Example(2D): 2D Teardrop Mask
// mask2d_teardrop(r=10,$fn=64);
// Example(2D): 2D Teardrop Mask for acute angle
@ -322,11 +316,9 @@ function mask2d_teardrop(r, angle=45, inset=[0,0], mask_angle=90, excess=0.01, f
module mask2d_teardrop(r, angle=45, mask_angle=90, excess=0.01, inset=0, flat_top=false, height, d, h, cut, joint, anchor=CENTER, spin=0) {
path = mask2d_teardrop(r=r, d=d, h=h, height=height, flat_top=flat_top, cut=cut, joint=joint, angle=angle,inset=inset, mask_angle=mask_angle, excess=excess);
default_tag("remove") {
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
}
@ -367,8 +359,6 @@ module mask2d_teardrop(r, angle=45, mask_angle=90, excess=0.01, inset=0, flat_to
// flat_top = If true, the top inset of the mask will be horizontal instead of angled by the mask_angle. In the case of obtuse angles force the mask to have a flat section at its left side instead of a circular arc. Default: true if quarter_round is set, false otherwise.
// 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:
// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set.
// Example(2D): 2D Cove Mask by Radius
// mask2d_cove(r=10);
// Example(2D): 2D Inset Cove Mask (not much different than a regular cove of larger radius)
@ -418,11 +408,9 @@ module mask2d_teardrop(r, angle=45, mask_angle=90, excess=0.01, inset=0, flat_to
module mask2d_cove(r, inset=0, mask_angle=90, excess=0.01, flat_top, bulge, d, h, height, quarter_round=false, anchor=CENTER, spin=0) {
path = mask2d_cove(r=r, d=d, h=h, height=height, bulge=bulge, flat_top=flat_top, quarter_round=quarter_round, inset=inset, mask_angle=mask_angle, excess=excess);
default_tag("remove") {
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
}
@ -524,8 +512,6 @@ function mask2d_cove(r, inset=0, mask_angle=90, excess=0.01, flat_top, d, h, hei
// flat_top = If true, the top inset of the mask will be horizontal instead of angled by the mask_angle. Default: true.
// 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:
// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set.
// Example(2D): 2D Chamfer Mask, at 45 deg by default
// mask2d_chamfer(x=10);
// Example(2D): 2D Chamfer Mask, at 30 deg (measured down from vertical)
@ -592,11 +578,9 @@ function mask2d_cove(r, inset=0, mask_angle=90, excess=0.01, flat_top, d, h, hei
module mask2d_chamfer(edge, angle, inset=0, excess=0.01, mask_angle=90, flat_top=false, x, y, h, w, height, width, anchor=CENTER,spin=0) {
path = mask2d_chamfer(x=x, y=y, edge=edge, angle=angle, height=height, h=h, excess=excess, w=w,
inset=inset, mask_angle=mask_angle, flat_top=flat_top,width=width);
default_tag("remove") {
attachable(anchor,spin, two_d=true, path=path, extent=true) {
polygon(path);
children();
}
attachable(anchor,spin, two_d=true, path=path, extent=true) {
polygon(path);
children();
}
}
@ -689,8 +673,6 @@ function mask2d_chamfer(edge, angle, inset=0, excess=0.01, mask_angle=90, flat_t
// ---
// 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:
// 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
@ -714,11 +696,9 @@ function mask2d_chamfer(edge, angle, inset=0, excess=0.01, mask_angle=90, flat_t
// 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);
default_tag("remove") {
attachable(anchor,spin, two_d=true, path=path, extent=false) {
polygon(path);
children();
}
attachable(anchor,spin, two_d=true, path=path, extent=false) {
polygon(path);
children();
}
}
@ -773,8 +753,6 @@ function mask2d_rabbet(size, mask_angle=90, excess=0.01, anchor=CTR, spin=0) =
// flat_top = If true, the top inset of the mask will be horizontal instead of angled by the mask_angle. Default: true.
// 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:
// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set.
// Example(2D): 2D Dovetail Mask
// mask2d_dovetail(width=10,angle=14);
// Example(2D): 2D Dovetail Mask by height and slope. A slope of 1/6 is a common choice.
@ -804,11 +782,9 @@ function mask2d_rabbet(size, mask_angle=90, excess=0.01, anchor=CTR, spin=0) =
// mask2d_dovetail(width=10,angle=30);
module mask2d_dovetail(edge, angle, shelf=0, inset=0, mask_angle=90, excess=0.01, flat_top=true, w,h,width,height, slope, anchor=CENTER, spin=0,x,y) {
path = mask2d_dovetail(w=w,width=width,h=h,height=height, edge=edge, angle=angle, inset=inset, shelf=shelf, excess=excess, slope=slope, flat_top=flat_top, mask_angle=mask_angle,x=x,y=y);
default_tag("remove") {
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
}
@ -884,9 +860,6 @@ function mask2d_dovetail(edge, angle, slope, shelf=0, inset=0, mask_angle=90, ex
// 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:
// Tags the children with "remove" (and hence sets `$tag`) if no tag is already set.
//
// Example(2D): 2D Ogee Mask
// mask2d_ogee([
// "xstep",1, "ystep",1, // Starting shoulder.
@ -916,11 +889,9 @@ function mask2d_dovetail(edge, angle, slope, shelf=0, inset=0, mask_angle=90, ex
// ]);
module mask2d_ogee(pattern, excess=0.01, anchor=CENTER,spin=0) {
path = mask2d_ogee(pattern, excess=excess);
default_tag("remove") {
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
attachable(anchor,spin, two_d=true, path=path) {
polygon(path);
children();
}
}