It's getting late and I'm probably missing something obvious. I want two
almost identical cylindrical caps; the only difference is that one has a
hole in the middle. So I can do this:
module cap(hole = false) {
if (hole) {
difference() {
cylinder(h = 4, r = 50);
cylinder(h = 4, r = 4); // fix z-fighting later
};
}
else
cylinder(h = t4, r = 50);
};
But repeating the cylinder statement looks really ugly.
What should I be doing?
Oops. h = t4 is a typo. It should be h = 4.
On Mon, Feb 13, 2023 at 9:36 PM Father Horton fatherhorton@gmail.com
wrote:
It's getting late and I'm probably missing something obvious. I want two
almost identical cylindrical caps; the only difference is that one has a
hole in the middle. So I can do this:
module cap(hole = false) {
if (hole) {
difference() {
cylinder(h = 4, r = 50);
cylinder(h = 4, r = 4); // fix z-fighting later
};
}
else
cylinder(h = t4, r = 50);
};
But repeating the cylinder statement looks really ugly.
What should I be doing?
module cap(hole = false) {
difference() {
cylinder(h = 4, r = 50);
if (hole) cylinder(h = 4, r = 4); // fix z-fighting later
};
};
On Mon, Feb 13, 2023 at 10:40 PM Father Horton fatherhorton@gmail.com
wrote:
Oops. h = t4 is a typo. It should be h = 4.
On Mon, Feb 13, 2023 at 9:36 PM Father Horton fatherhorton@gmail.com
wrote:
It's getting late and I'm probably missing something obvious. I want two
almost identical cylindrical caps; the only difference is that one has a
hole in the middle. So I can do this:
module cap(hole = false) {
if (hole) {
difference() {
cylinder(h = 4, r = 50);
cylinder(h = 4, r = 4); // fix z-fighting later
};
}
else
cylinder(h = t4, r = 50);
};
But repeating the cylinder statement looks really ugly.
What should I be doing?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Like I said, obvious. Thanks!
On Mon, Feb 13, 2023 at 9:45 PM Adrian Mariano avm4@cornell.edu wrote:
module cap(hole = false) {
difference() {
cylinder(h = 4, r = 50);
if (hole) cylinder(h = 4, r = 4); // fix z-fighting later
};
};
On Mon, Feb 13, 2023 at 10:40 PM Father Horton fatherhorton@gmail.com
wrote:
Oops. h = t4 is a typo. It should be h = 4.
On Mon, Feb 13, 2023 at 9:36 PM Father Horton fatherhorton@gmail.com
wrote:
It's getting late and I'm probably missing something obvious. I want two
almost identical cylindrical caps; the only difference is that one has a
hole in the middle. So I can do this:
module cap(hole = false) {
if (hole) {
difference() {
cylinder(h = 4, r = 50);
cylinder(h = 4, r = 4); // fix z-fighting later
};
}
else
cylinder(h = t4, r = 50);
};
But repeating the cylinder statement looks really ugly.
What should I be doing?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
module cap(hole) {
difference() {
cylinder(h = 4, r = 50);
if (hole) cylinder(h = 4, r = 4); // fix z-fighting later
};
};
cap(hole = true);
translate([0,0,20])
cap(hole = false);
On 2023-02-14 14:53, Father Horton wrote:
Like I said, obvious. Thanks!
On Mon, Feb 13, 2023 at 9:45 PM Adrian Mariano avm4@cornell.edu wrote:
module cap(hole = false) {
difference() {
cylinder(h = 4, r = 50);
if (hole) cylinder(h = 4, r = 4); // fix z-fighting later
};
};
On Mon, Feb 13, 2023 at 10:40 PM Father Horton
<fatherhorton@gmail.com> wrote:
Oops. h = t4 is a typo. It should be h = 4.
On Mon, Feb 13, 2023 at 9:36 PM Father Horton
<fatherhorton@gmail.com> wrote:
It's getting late and I'm probably missing something
obvious. I want two almost identical cylindrical caps; the
only difference is that one has a hole in the middle. So I
can do this:
module cap(hole = false) {
if (hole) {
difference() {
cylinder(h = 4, r = 50);
cylinder(h = 4, r = 4); // fix z-fighting later
};
}
else
cylinder(h = t4, r = 50);
};
But repeating the cylinder statement looks really ugly.
What should I be doing?
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.