discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

multiplier question

GH
gene heskett
Thu, May 9, 2024 10:47 AM

Greetings all;

In a momentary flash of brilliance I realized I could make a tapered
square out of a cylinder, advantageous for the application which is a
re-enforcing ring around a maple vise screws square end which I am now
making by placing 4 sides at a very slight angle, or filing the edges so
it can be driven onto the wood w/o the edge shaving wood, but I could do
the same thing a bit more elegantly with cylinders d1/d2 functions.

But a 50x50 cube would need multiplied by what factor to get that same
50x50 cube for d1/d2 calculations with an \$fn=4?

Thanks all.

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

• Louis D. Brandeis
Greetings all; In a momentary flash of brilliance I realized I could make a tapered square out of a cylinder, advantageous for the application which is a re-enforcing ring around a maple vise screws square end which I am now making by placing 4 sides at a very slight angle, or filing the edges so it can be driven onto the wood w/o the edge shaving wood, but I could do the same thing a bit more elegantly with cylinders d1/d2 functions. But a 50x50 cube would need multiplied by what factor to get that same 50x50 cube for d1/d2 calculations with an \$fn=4? Thanks all. Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis
LH
Lenore Horner
Thu, May 9, 2024 11:20 AM

Shouldn't center of square to a corner be radius of circle?  If so, then calling s the side of the square and d the diameter of the circle the square is inscribed in so d = 2 sqrt(2)*(s/2).

On May 9, 2024, at 06:47, gene heskett via Discuss discuss@lists.openscad.org wrote:

Greetings all;

In a momentary flash of brilliance I realized I could make a tapered square out of a cylinder, advantageous for the application which is a re-enforcing ring around a maple vise screws square end which I am now making by placing 4 sides at a very slight angle, or filing the edges so it can be driven onto the wood w/o the edge shaving wood, but I could do the same thing a bit more elegantly with cylinders d1/d2 functions.

But a 50x50 cube would need multiplied by what factor to get that same 50x50 cube for d1/d2 calculations with an \$fn=4?

Thanks all.

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

• Louis D. Brandeis

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Shouldn't center of square to a corner be radius of circle? If so, then calling s the side of the square and d the diameter of the circle the square is inscribed in so d = 2 sqrt(2)*(s/2). > On May 9, 2024, at 06:47, gene heskett via Discuss <discuss@lists.openscad.org> wrote: > > Greetings all; > > In a momentary flash of brilliance I realized I could make a tapered square out of a cylinder, advantageous for the application which is a re-enforcing ring around a maple vise screws square end which I am now making by placing 4 sides at a very slight angle, or filing the edges so it can be driven onto the wood w/o the edge shaving wood, but I could do the same thing a bit more elegantly with cylinders d1/d2 functions. > > But a 50x50 cube would need multiplied by what factor to get that same 50x50 cube for d1/d2 calculations with an \$fn=4? > > Thanks all. > > Cheers, Gene Heskett, CET. > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
RW
Raymond West
Thu, May 9, 2024 1:42 PM

where s is side of square,

you probably need something like cylinder(h= length_of_wedge,d1=
1.142s, d2=1.1422 - a_bit,\$fn=4)

if you want rounded edges, then make s a bit smaller, say s-2, then use
minkowski, with sphere(2), and chop off the top and bottom rounded ends.

09/05/2024 11:47, gene heskett via Discuss wrote:

Greetings all;

In a momentary flash of brilliance I realized I could make a tapered
square out of a cylinder, advantageous for the application which is a
re-enforcing ring around a maple vise screws square end which I am now
making by placing 4 sides at a very slight angle, or filing the edges
so it can be driven onto the wood w/o the edge shaving wood, but I
could do the same thing a bit more elegantly with cylinders d1/d2
functions.

But a 50x50 cube would need multiplied by what factor to get that same
50x50 cube for d1/d2 calculations with an \$fn=4?

Thanks all.

Cheers, Gene Heskett, CET.

where s is side of square, you probably need something like cylinder(h= length_of_wedge,d1= 1.142*s, d2=1.142*2 - a_bit,\$fn=4) if you want rounded edges, then make s a bit smaller, say s-2, then use minkowski, with sphere(2), and chop off the top and bottom rounded ends. 09/05/2024 11:47, gene heskett via Discuss wrote: > Greetings all; > > In a momentary flash of brilliance I realized I could make a tapered > square out of a cylinder, advantageous for the application which is a > re-enforcing ring around a maple vise screws square end which I am now > making by placing 4 sides at a very slight angle, or filing the edges > so it can be driven onto the wood w/o the edge shaving wood, but I > could do the same thing a bit more elegantly with cylinders d1/d2 > functions. > > But a 50x50 cube would need multiplied by what factor to get that same > 50x50 cube for d1/d2 calculations with an \$fn=4? > > Thanks all. > > Cheers, Gene Heskett, CET.
TP
Torsten Paul
Thu, May 9, 2024 2:33 PM

I'd recommend looking at using linear_extrude() instead.

1. it does not need faking \$fn = 4 cylinders
2. it allow usage of 2d-offset for chamfers

\$fa = 2; \$fs = 0.2;

linear_extrude(5, scale = 0.5)
offset(delta = 2, chamfer = true)
square(10, center = true);

translate([15, 0, 0])
linear_extrude(5, scale = 0.5)
offset(2)
square(10, center = true);

I'd recommend looking at using linear_extrude() instead. 1) it does not need faking \$fn = 4 cylinders 2) it allow usage of 2d-offset for chamfers \$fa = 2; \$fs = 0.2; linear_extrude(5, scale = 0.5) offset(delta = 2, chamfer = true) square(10, center = true); translate([15, 0, 0]) linear_extrude(5, scale = 0.5) offset(2) square(10, center = true);
GH
gene heskett
Thu, May 9, 2024 3:43 PM

On 5/9/24 07:20, Lenore Horner via Discuss wrote:

Shouldn't center of square to a corner be radius of circle?  If so, then calling s the side of the square and d the diameter of the circle the square is inscribed in so d = 2 sqrt(2)*(s/2).

Which looks like a hell of a lot of cpu cycles when it ought to be a
fixed multiplier. I went and stuck my mitotuyo across the square to get
a side and got 49.88mm then measured diagonally across it and got 69.84
which would be the diameter needed to get that 49.88mm square when \$fn=4.

My TI-36X Pro says that is a ratio of 1.400160385, call it 1.4 and its
close enough. There should not be a non-linear factor and that's only 1
multiply for d1 and one addition to get d2 from that.  Does that sound
right? The starter stick isn't square, but within .1mm which is as close
as I can reset my planer.

Thanks for the insight/help, I appreciate it.

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

• Louis D. Brandeis
On 5/9/24 07:20, Lenore Horner via Discuss wrote: > Shouldn't center of square to a corner be radius of circle? If so, then calling s the side of the square and d the diameter of the circle the square is inscribed in so d = 2 sqrt(2)*(s/2). > Which looks like a hell of a lot of cpu cycles when it ought to be a fixed multiplier. I went and stuck my mitotuyo across the square to get a side and got 49.88mm then measured diagonally across it and got 69.84 which would be the diameter needed to get that 49.88mm square when \$fn=4. My TI-36X Pro says that is a ratio of 1.400160385, call it 1.4 and its close enough. There should not be a non-linear factor and that's only 1 multiply for d1 and one addition to get d2 from that. Does that sound right? The starter stick isn't square, but within .1mm which is as close as I can reset my planer. Thanks for the insight/help, I appreciate it. Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis
RW
Raymond West
Thu, May 9, 2024 3:54 PM

Interesting, different approaches. I tend to initially think of an
openscad solution  as subtractive, i.e. got a lump of wood, shave bits
off until it fits, or machine it away. Whereas I see your approach as
being more additive, start with a base, and add to it. It is relatively
recent that an additive approach in manufacturing has been more
appropriate, before that it was assembly or construction.

That aside, the rounded edge you create will be tapered, whereas my
version would be straight, not sure which was needed, or why one would
be better than t'other.

On 09/05/2024 15:33, Torsten Paul via Discuss wrote:

I'd recommend looking at using linear_extrude() instead.

1. it does not need faking \$fn = 4 cylinders
2. it allow usage of 2d-offset for chamfers

\$fa = 2; \$fs = 0.2;

linear_extrude(5, scale = 0.5)
offset(delta = 2, chamfer = true)
square(10, center = true);

translate([15, 0, 0])
linear_extrude(5, scale = 0.5)
offset(2)
square(10, center = true);

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Interesting, different approaches. I tend to initially think of an openscad solution  as subtractive, i.e. got a lump of wood, shave bits off until it fits, or machine it away. Whereas I see your approach as being more additive, start with a base, and add to it. It is relatively recent that an additive approach in manufacturing has been more appropriate, before that it was assembly or construction. That aside, the rounded edge you create will be tapered, whereas my version would be straight, not sure which was needed, or why one would be better than t'other. On 09/05/2024 15:33, Torsten Paul via Discuss wrote: > I'd recommend looking at using linear_extrude() instead. > > 1) it does not need faking \$fn = 4 cylinders > 2) it allow usage of 2d-offset for chamfers > > \$fa = 2; \$fs = 0.2; > > linear_extrude(5, scale = 0.5) >     offset(delta = 2, chamfer = true) >         square(10, center = true); > > translate([15, 0, 0]) > linear_extrude(5, scale = 0.5) >     offset(2) >         square(10, center = true); > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
GH
gene heskett
Thu, May 9, 2024 3:56 PM

On 5/9/24 09:43, Raymond West via Discuss wrote:

where s is side of square,

you probably need something like cylinder(h= length_of_wedge,d1=
1.142s, d2=1.1422 - a_bit,\$fn=4)

if you want rounded edges, then make s a bit smaller, say s-2, then use
minkowski, with sphere(2), and chop off the top and bottom rounded ends.

That looks useful but not as easily visualized as the \$fn=4; solution.
How does that compare in render time?

Thanks Raymond.

09/05/2024 11:47, gene heskett via Discuss wrote:

Greetings all;

In a momentary flash of brilliance I realized I could make a tapered
square out of a cylinder, advantageous for the application which is a
re-enforcing ring around a maple vise screws square end which I am now
making by placing 4 sides at a very slight angle, or filing the edges
so it can be driven onto the wood w/o the edge shaving wood, but I
could do the same thing a bit more elegantly with cylinders d1/d2
functions.

But a 50x50 cube would need multiplied by what factor to get that same
50x50 cube for d1/d2 calculations with an \$fn=4?

Thanks all.

Cheers, Gene Heskett, CET.

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
.

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

• Louis D. Brandeis
On 5/9/24 09:43, Raymond West via Discuss wrote: > > where s is side of square, > > you probably need something like cylinder(h= length_of_wedge,d1= > 1.142*s, d2=1.142*2 - a_bit,\$fn=4) > > if you want rounded edges, then make s a bit smaller, say s-2, then use > minkowski, with sphere(2), and chop off the top and bottom rounded ends. That looks useful but not as easily visualized as the \$fn=4; solution. How does that compare in render time? Thanks Raymond. > > > 09/05/2024 11:47, gene heskett via Discuss wrote: > >> Greetings all; >> >> In a momentary flash of brilliance I realized I could make a tapered >> square out of a cylinder, advantageous for the application which is a >> re-enforcing ring around a maple vise screws square end which I am now >> making by placing 4 sides at a very slight angle, or filing the edges >> so it can be driven onto the wood w/o the edge shaving wood, but I >> could do the same thing a bit more elegantly with cylinders d1/d2 >> functions. >> >> But a 50x50 cube would need multiplied by what factor to get that same >> 50x50 cube for d1/d2 calculations with an \$fn=4? >> >> Thanks all. >> >> Cheers, Gene Heskett, CET. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > . Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis
GH
gene heskett
Thu, May 9, 2024 4:11 PM

On 5/9/24 11:54, Raymond West via Discuss wrote:

Interesting, different approaches. I tend to initially think of an
openscad solution  as subtractive, i.e. got a lump of wood, shave bits
off until it fits, or machine it away. Whereas I see your approach as
being more additive, start with a base, and add to it. It is relatively
recent that an additive approach in manufacturing has been more
appropriate, before that it was assembly or construction.

That aside, the rounded edge you create will be tapered, whereas my
version would be straight, not sure which was needed, or why one would
be better than t'other.

In this case, Raymond, the idea is to put pressure on the wood so as to
discourage the eventual splitting of the maple  by the 3/4" red oak
handle between the rings doing the squeezing. What I have been doing is
filing a nearly invisible ramp at the entry of the pocket, it is about
1/2" deep, just enough to be able to drive it on with a dead blow, w/o
the sharp edge peeling a layer of wood off. The plastic will eventually
cold flow, relieving some of the pressure but every little bit helps.

On 09/05/2024 15:33, Torsten Paul via Discuss wrote:

I'd recommend looking at using linear_extrude() instead.

1. it does not need faking \$fn = 4 cylinders
2. it allow usage of 2d-offset for chamfers

\$fa = 2; \$fs = 0.2;

linear_extrude(5, scale = 0.5)
offset(delta = 2, chamfer = true)
square(10, center = true);

translate([15, 0, 0])
linear_extrude(5, scale = 0.5)
offset(2)
square(10, center = true);

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

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

• Louis D. Brandeis
On 5/9/24 11:54, Raymond West via Discuss wrote: > Interesting, different approaches. I tend to initially think of an > openscad solution  as subtractive, i.e. got a lump of wood, shave bits > off until it fits, or machine it away. Whereas I see your approach as > being more additive, start with a base, and add to it. It is relatively > recent that an additive approach in manufacturing has been more > appropriate, before that it was assembly or construction. > > That aside, the rounded edge you create will be tapered, whereas my > version would be straight, not sure which was needed, or why one would > be better than t'other. > In this case, Raymond, the idea is to put pressure on the wood so as to discourage the eventual splitting of the maple by the 3/4" red oak handle between the rings doing the squeezing. What I have been doing is filing a nearly invisible ramp at the entry of the pocket, it is about 1/2" deep, just enough to be able to drive it on with a dead blow, w/o the sharp edge peeling a layer of wood off. The plastic will eventually cold flow, relieving some of the pressure but every little bit helps. > > On 09/05/2024 15:33, Torsten Paul via Discuss wrote: >> I'd recommend looking at using linear_extrude() instead. >> >> 1) it does not need faking \$fn = 4 cylinders >> 2) it allow usage of 2d-offset for chamfers >> >> \$fa = 2; \$fs = 0.2; >> >> linear_extrude(5, scale = 0.5) >>     offset(delta = 2, chamfer = true) >>         square(10, center = true); >> >> translate([15, 0, 0]) >> linear_extrude(5, scale = 0.5) >>     offset(2) >>         square(10, center = true); >> _______________________________________________ >> 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 Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis
RD
Revar Desmera
Thu, May 9, 2024 6:11 PM

The ratio should be about 1.414, which is roughly the square root of 2. As for how expensive it is to do extra math calculations, you should know that the cost of the linear extrude is two or three of orders of magnitude more expensive than the square root. Actually pretty much all geometry calls (union, difference, etc) are far, far more expensive than just doing math.

-Revar

On May 9, 2024, at 8:43 AM, gene heskett via Discuss discuss@lists.openscad.org wrote:

﻿On 5/9/24 07:20, Lenore Horner via Discuss wrote:

Shouldn't center of square to a corner be radius of circle?  If so, then calling s the side of the square and d the diameter of the circle the square is inscribed in so d = 2 sqrt(2)*(s/2).
Which looks like a hell of a lot of cpu cycles when it ought to be a fixed multiplier. I went and stuck my mitotuyo across the square to get a side and got 49.88mm then measured diagonally across it and got 69.84 which would be the diameter needed to get that 49.88mm square when \$fn=4.

My TI-36X Pro says that is a ratio of 1.400160385, call it 1.4 and its close enough. There should not be a non-linear factor and that's only 1 multiply for d1 and one addition to get d2 from that.  Does that sound right? The starter stick isn't square, but within .1mm which is as close as I can reset my planer.

Thanks for the insight/help, I appreciate it.

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

• Louis D. Brandeis

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

The ratio should be about 1.414, which is roughly the square root of 2. As for how expensive it is to do extra math calculations, you should know that the cost of the linear extrude is two or three of orders of magnitude more expensive than the square root. Actually pretty much all geometry calls (union, difference, etc) are far, far more expensive than just doing math. -Revar > On May 9, 2024, at 8:43 AM, gene heskett via Discuss <discuss@lists.openscad.org> wrote: > > ﻿On 5/9/24 07:20, Lenore Horner via Discuss wrote: >> Shouldn't center of square to a corner be radius of circle? If so, then calling s the side of the square and d the diameter of the circle the square is inscribed in so d = 2 sqrt(2)*(s/2). > Which looks like a hell of a lot of cpu cycles when it ought to be a fixed multiplier. I went and stuck my mitotuyo across the square to get a side and got 49.88mm then measured diagonally across it and got 69.84 which would be the diameter needed to get that 49.88mm square when \$fn=4. > > My TI-36X Pro says that is a ratio of 1.400160385, call it 1.4 and its close enough. There should not be a non-linear factor and that's only 1 multiply for d1 and one addition to get d2 from that. Does that sound right? The starter stick isn't square, but within .1mm which is as close as I can reset my planer. > > Thanks for the insight/help, I appreciate it. > > Cheers, Gene Heskett, CET. > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
RW
Raymond West
Thu, May 9, 2024 7:59 PM

I made a typo in my first reply - and copied it 🙁.

cylinder(h= length_of_wedge,d1= 1.142s, d2=1.1422 - a_bit,\$fn=4)

should be

cylinder(h= length_of_wedge,d1= 1.4142s, d2=1.41422 - a_bit,\$fn=4)

On 09/05/2024 19:11, Revar Desmera via Discuss wrote:

The ratio should be about 1.414,

I made a typo in my first reply - and copied it 🙁. cylinder(h= length_of_wedge,d1= 1.142*s, d2=1.142*2 - a_bit,\$fn=4) should be cylinder(h= length_of_wedge,d1= 1.4142*s, d2=1.4142*2 - a_bit,\$fn=4) On 09/05/2024 19:11, Revar Desmera via Discuss wrote: > The ratio should be about 1.414,
Replying to: