discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

How do I use "cos(7)" in a variable declaration?

GH
gene heskett
Tue, Jun 28, 2022 10:11 PM

Greetings all;

My OpenSCAD is:

2022.04.29.ai11816 (git 68c63f61b)

on a debian bullseye install on a 6 core i5 with 32 Gigs of dram.

I am in the process of making a tapered shim to be placed under the spindle
motor mount of a 6040 mill, so that I can use the side of the milling tool
to cut the 7 degree angle commonly used as the loaded face angle of a
buttress thread I am carving in a hard maple stick for use with a 3d
printed
nut to drive a paddle style leg vise on a woodworking workbench.
Pix of the first pass are at the link in the sig plus 6040-stf, that screw
is around 50mm in diameter and 18" long. But while the printed nut does
have
that angle, the screw does not without another 20 line loop of gcode, taking
another hour or more to render, its time & effort better to tilt the
spindle
7 degrees.

But because the face holding the motor is at a 7 degree from the z axis
in openscad,
I need to offset the threaded holes, already at that angle, by the z
distance
plus or - by the product of cos(7). Which SWAGS at about .15mm up for
the bottom
pair of holes, and -.15mm down for the upper row. If that's too much,
and I have to
adjust the .scad to get it closer, I'd druther do it in the .scad with
one LOC if I
can as that will be exact. But I'm getting syntax errors.

Thank you all.  Take care and stay well.

Cheers, Gene Heskett.

"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.

Greetings all; My OpenSCAD is: 2022.04.29.ai11816 (git 68c63f61b) on a debian bullseye install on a 6 core i5 with 32 Gigs of dram. I am in the process of making a tapered shim to be placed under the spindle motor mount of a 6040 mill, so that I can use the side of the milling tool to cut the 7 degree angle commonly used as the loaded face angle of a buttress thread I am carving in a hard maple stick for use with a 3d printed nut to drive a paddle style leg vise on a woodworking workbench. Pix of the first pass are at the link in the sig plus 6040-stf, that screw is around 50mm in diameter and 18" long. But while the printed nut does have that angle, the screw does not without another 20 line loop of gcode, taking another hour or more to render, its time & effort better to tilt the spindle 7 degrees. But because the face holding the motor is at a 7 degree from the z axis in openscad, I need to offset the threaded holes, already at that angle, by the z distance plus or - by the product of cos(7). Which SWAGS at about .15mm up for the bottom pair of holes, and -.15mm down for the upper row. If that's too much, and I have to adjust the .scad to get it closer, I'd druther do it in the .scad with one LOC if I can as that will be exact. But I'm getting syntax errors. Thank you all.  Take care and stay well. Cheers, Gene Heskett. -- "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 Genes Web page<http://geneslinuxbox.net:6309/>
WH
Will Hardiman
Tue, Jun 28, 2022 10:19 PM

A minimal example:

x = cos(7);

echo(x = x);
y = 2 * cos(7);
echo(y = y);

On a side note, I was quite surprised by the behaviour of echo here.

On Tue, 28 Jun 2022 at 23:13, gene heskett gheskett@shentel.net wrote:

Greetings all;

My OpenSCAD is:

2022.04.29.ai11816 (git 68c63f61b)

on a debian bullseye install on a 6 core i5 with 32 Gigs of dram.

I am in the process of making a tapered shim to be placed under the
spindle
motor mount of a 6040 mill, so that I can use the side of the milling tool
to cut the 7 degree angle commonly used as the loaded face angle of a
buttress thread I am carving in a hard maple stick for use with a 3d
printed
nut to drive a paddle style leg vise on a woodworking workbench.
Pix of the first pass are at the link in the sig plus 6040-stf, that screw
is around 50mm in diameter and 18" long. But while the printed nut does
have
that angle, the screw does not without another 20 line loop of gcode,
taking
another hour or more to render, its time & effort better to tilt the
spindle
7 degrees.

But because the face holding the motor is at a 7 degree from the z axis in
openscad,
I need to offset the threaded holes, already at that angle, by the z
distance
plus or - by the product of cos(7). Which SWAGS at about .15mm up for the
bottom
pair of holes, and -.15mm down for the upper row. If that's too much, and
I have to
adjust the .scad to get it closer, I'd druther do it in the .scad with one
LOC if I
can as that will be exact. But I'm getting syntax errors.

Thank you all.  Take care and stay well.

Cheers, Gene Heskett.

"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.


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

A minimal example: x = cos(7); > echo(x = x); > y = 2 * cos(7); > echo(y = y); > On a side note, I was quite surprised by the behaviour of echo here. On Tue, 28 Jun 2022 at 23:13, gene heskett <gheskett@shentel.net> wrote: > Greetings all; > > My OpenSCAD is: > > 2022.04.29.ai11816 (git 68c63f61b) > > on a debian bullseye install on a 6 core i5 with 32 Gigs of dram. > > I am in the process of making a tapered shim to be placed under the > spindle > motor mount of a 6040 mill, so that I can use the side of the milling tool > to cut the 7 degree angle commonly used as the loaded face angle of a > buttress thread I am carving in a hard maple stick for use with a 3d > printed > nut to drive a paddle style leg vise on a woodworking workbench. > Pix of the first pass are at the link in the sig plus 6040-stf, that screw > is around 50mm in diameter and 18" long. But while the printed nut does > have > that angle, the screw does not without another 20 line loop of gcode, > taking > another hour or more to render, its time & effort better to tilt the > spindle > 7 degrees. > > But because the face holding the motor is at a 7 degree from the z axis in > openscad, > I need to offset the threaded holes, already at that angle, by the z > distance > plus or - by the product of cos(7). Which SWAGS at about .15mm up for the > bottom > pair of holes, and -.15mm down for the upper row. If that's too much, and > I have to > adjust the .scad to get it closer, I'd druther do it in the .scad with one > LOC if I > can as that will be exact. But I'm getting syntax errors. > > Thank you all. Take care and stay well. > > Cheers, Gene Heskett. > -- > "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 > Genes Web page <http://geneslinuxbox.net:6309/> <http://geneslinuxbox.net:6309/> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
FH
Father Horton
Tue, Jun 28, 2022 10:33 PM

Everything is a function in OpenSCAD, so assignment returns a value.

On Tue, Jun 28, 2022 at 5:19 PM Will Hardiman bill.hardiman1995@gmail.com
wrote:

A minimal example:

x = cos(7);

echo(x = x);
y = 2 * cos(7);
echo(y = y);

On a side note, I was quite surprised by the behaviour of echo here.

On Tue, 28 Jun 2022 at 23:13, gene heskett gheskett@shentel.net wrote:

Greetings all;

My OpenSCAD is:

2022.04.29.ai11816 (git 68c63f61b)

on a debian bullseye install on a 6 core i5 with 32 Gigs of dram.

I am in the process of making a tapered shim to be placed under the
spindle
motor mount of a 6040 mill, so that I can use the side of the milling
tool
to cut the 7 degree angle commonly used as the loaded face angle of a
buttress thread I am carving in a hard maple stick for use with a 3d
printed
nut to drive a paddle style leg vise on a woodworking workbench.
Pix of the first pass are at the link in the sig plus 6040-stf, that
screw
is around 50mm in diameter and 18" long. But while the printed nut does
have
that angle, the screw does not without another 20 line loop of gcode,
taking
another hour or more to render, its time & effort better to tilt the
spindle
7 degrees.

But because the face holding the motor is at a 7 degree from the z axis
in openscad,
I need to offset the threaded holes, already at that angle, by the z
distance
plus or - by the product of cos(7). Which SWAGS at about .15mm up for the
bottom
pair of holes, and -.15mm down for the upper row. If that's too much, and
I have to
adjust the .scad to get it closer, I'd druther do it in the .scad with
one LOC if I
can as that will be exact. But I'm getting syntax errors.

Thank you all.  Take care and stay well.

Cheers, Gene Heskett.

"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.


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

Everything is a function in OpenSCAD, so assignment returns a value. On Tue, Jun 28, 2022 at 5:19 PM Will Hardiman <bill.hardiman1995@gmail.com> wrote: > A minimal example: > > x = cos(7); >> echo(x = x); >> y = 2 * cos(7); >> echo(y = y); >> > > On a side note, I was quite surprised by the behaviour of echo here. > > On Tue, 28 Jun 2022 at 23:13, gene heskett <gheskett@shentel.net> wrote: > >> Greetings all; >> >> My OpenSCAD is: >> >> 2022.04.29.ai11816 (git 68c63f61b) >> >> on a debian bullseye install on a 6 core i5 with 32 Gigs of dram. >> >> I am in the process of making a tapered shim to be placed under the >> spindle >> motor mount of a 6040 mill, so that I can use the side of the milling >> tool >> to cut the 7 degree angle commonly used as the loaded face angle of a >> buttress thread I am carving in a hard maple stick for use with a 3d >> printed >> nut to drive a paddle style leg vise on a woodworking workbench. >> Pix of the first pass are at the link in the sig plus 6040-stf, that >> screw >> is around 50mm in diameter and 18" long. But while the printed nut does >> have >> that angle, the screw does not without another 20 line loop of gcode, >> taking >> another hour or more to render, its time & effort better to tilt the >> spindle >> 7 degrees. >> >> But because the face holding the motor is at a 7 degree from the z axis >> in openscad, >> I need to offset the threaded holes, already at that angle, by the z >> distance >> plus or - by the product of cos(7). Which SWAGS at about .15mm up for the >> bottom >> pair of holes, and -.15mm down for the upper row. If that's too much, and >> I have to >> adjust the .scad to get it closer, I'd druther do it in the .scad with >> one LOC if I >> can as that will be exact. But I'm getting syntax errors. >> >> Thank you all. Take care and stay well. >> >> Cheers, Gene Heskett. >> -- >> "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 >> Genes Web page <http://geneslinuxbox.net:6309/> <http://geneslinuxbox.net:6309/> >> >> _______________________________________________ >> 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 >
AM
Adrian Mariano
Tue, Jun 28, 2022 11:52 PM

I don't understand what is surprising here.  You assign x to cosine of
7 and get that value.  Where is the surprise?  The only thing that's
weird about that code is the syntax of echo where you can write
echo(foo=expression) and have it print out "foo=...." in the output.
Save you from having to type quotes in your echo statements, I
suppose.  Note that everything is not a function:  assignment doesn't
return anything.  a=(b=c) is an error.

On Tue, Jun 28, 2022 at 6:34 PM Father Horton fatherhorton@gmail.com wrote:

Everything is a function in OpenSCAD, so assignment returns a value.

On Tue, Jun 28, 2022 at 5:19 PM Will Hardiman bill.hardiman1995@gmail.com wrote:

A minimal example:

x = cos(7);
echo(x = x);
y = 2 * cos(7);
echo(y = y);

On a side note, I was quite surprised by the behaviour of echo here.

On Tue, 28 Jun 2022 at 23:13, gene heskett gheskett@shentel.net wrote:

Greetings all;

My OpenSCAD is:

2022.04.29.ai11816 (git 68c63f61b)

on a debian bullseye install on a 6 core i5 with 32 Gigs of dram.

I am in the process of making a tapered shim to be placed under the spindle
motor mount of a 6040 mill, so that I can use the side of the milling tool
to cut the 7 degree angle commonly used as the loaded face angle of a
buttress thread I am carving in a hard maple stick for use with a 3d printed
nut to drive a paddle style leg vise on a woodworking workbench.
Pix of the first pass are at the link in the sig plus 6040-stf, that screw
is around 50mm in diameter and 18" long. But while the printed nut does have
that angle, the screw does not without another 20 line loop of gcode, taking
another hour or more to render, its time & effort better to tilt the spindle
7 degrees.

But because the face holding the motor is at a 7 degree from the z axis in openscad,
I need to offset the threaded holes, already at that angle, by the z distance
plus or - by the product of cos(7). Which SWAGS at about .15mm up for the bottom
pair of holes, and -.15mm down for the upper row. If that's too much, and I have to
adjust the .scad to get it closer, I'd druther do it in the .scad with one LOC if I
can as that will be exact. But I'm getting syntax errors.

Thank you all.  Take care and stay well.

Cheers, Gene Heskett.

"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.


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 to discuss-leave@lists.openscad.org

I don't understand what is surprising here. You assign x to cosine of 7 and get that value. Where is the surprise? The only thing that's weird about that code is the syntax of echo where you can write echo(foo=expression) and have it print out "foo=...." in the output. Save you from having to type quotes in your echo statements, I suppose. Note that everything is not a function: assignment doesn't return anything. a=(b=c) is an error. On Tue, Jun 28, 2022 at 6:34 PM Father Horton <fatherhorton@gmail.com> wrote: > > Everything is a function in OpenSCAD, so assignment returns a value. > > On Tue, Jun 28, 2022 at 5:19 PM Will Hardiman <bill.hardiman1995@gmail.com> wrote: >> >> A minimal example: >> >>> x = cos(7); >>> echo(x = x); >>> y = 2 * cos(7); >>> echo(y = y); >> >> >> On a side note, I was quite surprised by the behaviour of echo here. >> >> On Tue, 28 Jun 2022 at 23:13, gene heskett <gheskett@shentel.net> wrote: >>> >>> Greetings all; >>> >>> My OpenSCAD is: >>> >>> 2022.04.29.ai11816 (git 68c63f61b) >>> >>> on a debian bullseye install on a 6 core i5 with 32 Gigs of dram. >>> >>> >>> I am in the process of making a tapered shim to be placed under the spindle >>> motor mount of a 6040 mill, so that I can use the side of the milling tool >>> to cut the 7 degree angle commonly used as the loaded face angle of a >>> buttress thread I am carving in a hard maple stick for use with a 3d printed >>> nut to drive a paddle style leg vise on a woodworking workbench. >>> Pix of the first pass are at the link in the sig plus 6040-stf, that screw >>> is around 50mm in diameter and 18" long. But while the printed nut does have >>> that angle, the screw does not without another 20 line loop of gcode, taking >>> another hour or more to render, its time & effort better to tilt the spindle >>> 7 degrees. >>> >>> But because the face holding the motor is at a 7 degree from the z axis in openscad, >>> I need to offset the threaded holes, already at that angle, by the z distance >>> plus or - by the product of cos(7). Which SWAGS at about .15mm up for the bottom >>> pair of holes, and -.15mm down for the upper row. If that's too much, and I have to >>> adjust the .scad to get it closer, I'd druther do it in the .scad with one LOC if I >>> can as that will be exact. But I'm getting syntax errors. >>> >>> Thank you all. Take care and stay well. >>> >>> Cheers, Gene Heskett. >>> -- >>> "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 >>> Genes Web page <http://geneslinuxbox.net:6309/> >>> >>> _______________________________________________ >>> 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 to discuss-leave@lists.openscad.org
FH
Father Horton
Wed, Jun 29, 2022 12:30 AM

Oops. Now I know.

On Tue, Jun 28, 2022 at 6:53 PM Adrian Mariano avm4@cornell.edu wrote:

I don't understand what is surprising here.  You assign x to cosine of
7 and get that value.  Where is the surprise?  The only thing that's
weird about that code is the syntax of echo where you can write
echo(foo=expression) and have it print out "foo=...." in the output.
Save you from having to type quotes in your echo statements, I
suppose.  Note that everything is not a function:  assignment doesn't
return anything.  a=(b=c) is an error.

On Tue, Jun 28, 2022 at 6:34 PM Father Horton fatherhorton@gmail.com
wrote:

Everything is a function in OpenSCAD, so assignment returns a value.

On Tue, Jun 28, 2022 at 5:19 PM Will Hardiman <

A minimal example:

x = cos(7);
echo(x = x);
y = 2 * cos(7);
echo(y = y);

On a side note, I was quite surprised by the behaviour of echo here.

On Tue, 28 Jun 2022 at 23:13, gene heskett gheskett@shentel.net

wrote:

Greetings all;

My OpenSCAD is:

2022.04.29.ai11816 (git 68c63f61b)

on a debian bullseye install on a 6 core i5 with 32 Gigs of dram.

I am in the process of making a tapered shim to be placed under the

spindle

motor mount of a 6040 mill, so that I can use the side of the milling

tool

to cut the 7 degree angle commonly used as the loaded face angle of a
buttress thread I am carving in a hard maple stick for use with a 3d

printed

nut to drive a paddle style leg vise on a woodworking workbench.
Pix of the first pass are at the link in the sig plus 6040-stf, that

screw

is around 50mm in diameter and 18" long. But while the printed nut

does have

that angle, the screw does not without another 20 line loop of gcode,

taking

another hour or more to render, its time & effort better to tilt the

spindle

7 degrees.

But because the face holding the motor is at a 7 degree from the z

axis in openscad,

I need to offset the threaded holes, already at that angle, by the z

distance

plus or - by the product of cos(7). Which SWAGS at about .15mm up for

the bottom

pair of holes, and -.15mm down for the upper row. If that's too much,

and I have to

adjust the .scad to get it closer, I'd druther do it in the .scad with

one LOC if I

can as that will be exact. But I'm getting syntax errors.

Thank you all.  Take care and stay well.

Cheers, Gene Heskett.

"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.


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 to discuss-leave@lists.openscad.org


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

Oops. Now I know. On Tue, Jun 28, 2022 at 6:53 PM Adrian Mariano <avm4@cornell.edu> wrote: > I don't understand what is surprising here. You assign x to cosine of > 7 and get that value. Where is the surprise? The only thing that's > weird about that code is the syntax of echo where you can write > echo(foo=expression) and have it print out "foo=...." in the output. > Save you from having to type quotes in your echo statements, I > suppose. Note that everything is not a function: assignment doesn't > return anything. a=(b=c) is an error. > > > On Tue, Jun 28, 2022 at 6:34 PM Father Horton <fatherhorton@gmail.com> > wrote: > > > > Everything is a function in OpenSCAD, so assignment returns a value. > > > > On Tue, Jun 28, 2022 at 5:19 PM Will Hardiman < > bill.hardiman1995@gmail.com> wrote: > >> > >> A minimal example: > >> > >>> x = cos(7); > >>> echo(x = x); > >>> y = 2 * cos(7); > >>> echo(y = y); > >> > >> > >> On a side note, I was quite surprised by the behaviour of echo here. > >> > >> On Tue, 28 Jun 2022 at 23:13, gene heskett <gheskett@shentel.net> > wrote: > >>> > >>> Greetings all; > >>> > >>> My OpenSCAD is: > >>> > >>> 2022.04.29.ai11816 (git 68c63f61b) > >>> > >>> on a debian bullseye install on a 6 core i5 with 32 Gigs of dram. > >>> > >>> > >>> I am in the process of making a tapered shim to be placed under the > spindle > >>> motor mount of a 6040 mill, so that I can use the side of the milling > tool > >>> to cut the 7 degree angle commonly used as the loaded face angle of a > >>> buttress thread I am carving in a hard maple stick for use with a 3d > printed > >>> nut to drive a paddle style leg vise on a woodworking workbench. > >>> Pix of the first pass are at the link in the sig plus 6040-stf, that > screw > >>> is around 50mm in diameter and 18" long. But while the printed nut > does have > >>> that angle, the screw does not without another 20 line loop of gcode, > taking > >>> another hour or more to render, its time & effort better to tilt the > spindle > >>> 7 degrees. > >>> > >>> But because the face holding the motor is at a 7 degree from the z > axis in openscad, > >>> I need to offset the threaded holes, already at that angle, by the z > distance > >>> plus or - by the product of cos(7). Which SWAGS at about .15mm up for > the bottom > >>> pair of holes, and -.15mm down for the upper row. If that's too much, > and I have to > >>> adjust the .scad to get it closer, I'd druther do it in the .scad with > one LOC if I > >>> can as that will be exact. But I'm getting syntax errors. > >>> > >>> Thank you all. Take care and stay well. > >>> > >>> Cheers, Gene Heskett. > >>> -- > >>> "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 > >>> Genes Web page <http://geneslinuxbox.net:6309/> > >>> > >>> _______________________________________________ > >>> 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 to discuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GH
gene heskett
Wed, Jun 29, 2022 1:43 AM

On 6/28/22 18:26, Will Hardiman wrote:

A minimal example:

x = cos(7);

echo(x = x);
y = 2 * cos(7);
echo(y = y);

On a side note, I was quite surprised by the behaviour of echo here.

On Tue, 28 Jun 2022 at 23:13, gene heskettgheskett@shentel.net  wrote:

Greetings all;

My OpenSCAD is:

2022.04.29.ai11816 (git 68c63f61b)

on a debian bullseye install on a 6 core i5 with 32 Gigs of dram.

I am in the process of making a tapered shim to be placed under the
spindle
motor mount of a 6040 mill, so that I can use the side of the milling tool
to cut the 7 degree angle commonly used as the loaded face angle of a
buttress thread I am carving in a hard maple stick for use with a 3d
printed
nut to drive a paddle style leg vise on a woodworking workbench.
Pix of the first pass are at the link in the sig plus 6040-stf, that screw
is around 50mm in diameter and 18" long. But while the printed nut does
have
that angle, the screw does not without another 20 line loop of gcode,
taking
another hour or more to render, its time & effort better to tilt the
spindle
7 degrees.

But because the face holding the motor is at a 7 degree from the z axis in
openscad,
I need to offset the threaded holes, already at that angle, by the z
distance
plus or - by the product of cos(7). Which SWAGS at about .15mm up for the
bottom
pair of holes, and -.15mm down for the upper row. If that's too much, and
I have to
adjust the .scad to get it closer, I'd druther do it in the .scad with one
LOC if I
can as that will be exact. But I'm getting syntax errors.

Thank you all.  Take care and stay well.

So:
zz = cos(7);
echo(14, zz); gives 0.992546

then:
translate([-xof,-5,-zoffzz])rotate([90,0,0])tiltbolt();//lower right
 translate([ xof,-5,-zoff
zz])rotate([90,0,0])tiltbolt(); //lower left
 translate([-xof,-4, zzffzz])rotate([90,0,0])tiltbolt(); //upper
right,lower
 translate([ xof,-4, zzff
zz])rotate([90,0,0])tiltbolt(); // upper
left, lower

hit F6 and the holes didn't even move a red one. threads I'll make
with a tap. In about an hour, after it cools. IF by then I'm not
taking a nap. Its been a looong day.

Thank you Bill.

Cheers, Gene Heskett.

"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.

On 6/28/22 18:26, Will Hardiman wrote: > A minimal example: > > x = cos(7); >> echo(x = x); >> y = 2 * cos(7); >> echo(y = y); >> > On a side note, I was quite surprised by the behaviour of echo here. > > On Tue, 28 Jun 2022 at 23:13, gene heskett<gheskett@shentel.net> wrote: > >> Greetings all; >> >> My OpenSCAD is: >> >> 2022.04.29.ai11816 (git 68c63f61b) >> >> on a debian bullseye install on a 6 core i5 with 32 Gigs of dram. >> >> I am in the process of making a tapered shim to be placed under the >> spindle >> motor mount of a 6040 mill, so that I can use the side of the milling tool >> to cut the 7 degree angle commonly used as the loaded face angle of a >> buttress thread I am carving in a hard maple stick for use with a 3d >> printed >> nut to drive a paddle style leg vise on a woodworking workbench. >> Pix of the first pass are at the link in the sig plus 6040-stf, that screw >> is around 50mm in diameter and 18" long. But while the printed nut does >> have >> that angle, the screw does not without another 20 line loop of gcode, >> taking >> another hour or more to render, its time & effort better to tilt the >> spindle >> 7 degrees. >> >> But because the face holding the motor is at a 7 degree from the z axis in >> openscad, >> I need to offset the threaded holes, already at that angle, by the z >> distance >> plus or - by the product of cos(7). Which SWAGS at about .15mm up for the >> bottom >> pair of holes, and -.15mm down for the upper row. If that's too much, and >> I have to >> adjust the .scad to get it closer, I'd druther do it in the .scad with one >> LOC if I >> can as that will be exact. But I'm getting syntax errors. >> >> Thank you all. Take care and stay well. So: zz = cos(7); echo(14, zz); gives 0.992546 then: translate([-xof,-5,-zoff*zz])rotate([90,0,0])tiltbolt();//lower right  translate([ xof,-5,-zoff*zz])rotate([90,0,0])tiltbolt(); //lower left  translate([-xof,-4, zzff*zz])rotate([90,0,0])tiltbolt(); //upper right,lower  translate([ xof,-4, zzff*zz])rotate([90,0,0])tiltbolt(); // upper left, lower hit F6 and the holes didn't even move a red one. threads I'll make with a tap. In about an hour, after it cools. IF by then I'm not taking a nap. Its been a looong day. Thank you Bill. Cheers, Gene Heskett. -- "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 Genes Web page<http://geneslinuxbox.net:6309/>
GH
gene heskett
Wed, Jun 29, 2022 7:30 AM

On 6/28/22 21:47, gene heskett wrote:

On 6/28/22 18:26, Will Hardiman wrote:

A minimal example:

x = cos(7);

echo(x = x);
y = 2 * cos(7);
echo(y = y);

On a side note, I was quite surprised by the behaviour of echo here.

On Tue, 28 Jun 2022 at 23:13, gene heskettgheskett@shentel.net  wrote:

Greetings all;

My OpenSCAD is:

2022.04.29.ai11816 (git 68c63f61b)

on a debian bullseye install on a 6 core i5 with 32 Gigs of dram.

I am in the process of making a tapered shim to be placed under the
spindle
motor mount of a 6040 mill, so that I can use the side of the
milling tool
to cut the 7 degree angle commonly used as the loaded face angle of a
buttress thread I am carving in a hard maple stick for use with a 3d
printed
nut to drive a paddle style leg vise on a woodworking workbench.
Pix of the first pass are at the link in the sig plus 6040-stf, that
screw
is around 50mm in diameter and 18" long. But while the printed nut does
have
that angle, the screw does not without another 20 line loop of gcode,
taking
another hour or more to render, its time & effort better to tilt the
spindle
7 degrees.

But because the face holding the motor is at a 7 degree from the z
axis in
openscad,
I need to offset the threaded holes, already at that angle, by the z
distance
plus or - by the product of cos(7). Which SWAGS at about .15mm up
for the
bottom
pair of holes, and -.15mm down for the upper row. If that's too
much, and
I have to
adjust the .scad to get it closer, I'd druther do it in the .scad
with one
LOC if I
can as that will be exact. But I'm getting syntax errors.

Thank you all.  Take care and stay well.

So:
zz = cos(7);
echo(14, zz); gives 0.992546

then:
translate([-xof,-5,-zoffzz])rotate([90,0,0])tiltbolt();//lower right
 translate([ xof,-5,-zoff
zz])rotate([90,0,0])tiltbolt(); //lower left
 translate([-xof,-4, zzffzz])rotate([90,0,0])tiltbolt(); //upper
right,lower
 translate([ xof,-4, zzff
zz])rotate([90,0,0])tiltbolt(); // upper
left, lower

hit F6 and the holes didn't even move a red one. threads I'll make
with a tap. In about an hour, after it cools. IF by then I'm not
taking a nap. Its been a looong day.

Thank you Bill.

Then, 2nd pass failed cuz I can't measure the distance between 2 holes
accurately
enough. And also because my choice of starting block sizes made it tall
enough to
interfere with the heads of bolts above it. So at 3am, a third pass is
60% done.
RE measured, re centered on the available real estate, made the cap
screw pockets
.1mm bigger and started a third try.

Given a casting with bolt holes at each of its 4 corners, how do you
folks get an
accurate measurement of the distances in x and y directions?

I've been measuring with both caliper faces by measuring between the inside
faces of the holes with the outside tongs of the caliper, then between
the outside
faces with the inside tongs, adding them, and /4 to get the center offsets.
The backside of the calipers tongs not being ground to a knife edge
causes 3 point
contact with one offset, error because the caliper is then off center in
the hole,
giving a longer than actual measerement. Which was the direction of the
error
when I tried to install pass #2 last night.

Is there a better way? Grind a knife edge on the backside of the outside
tongs perhaps?

Cheers, Gene Heskett.

"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.

On 6/28/22 21:47, gene heskett wrote: > On 6/28/22 18:26, Will Hardiman wrote: >> A minimal example: >> >> x = cos(7); >>> echo(x = x); >>> y = 2 * cos(7); >>> echo(y = y); >>> >> On a side note, I was quite surprised by the behaviour of echo here. >> >> On Tue, 28 Jun 2022 at 23:13, gene heskett<gheskett@shentel.net>  wrote: >> >>> Greetings all; >>> >>> My OpenSCAD is: >>> >>> 2022.04.29.ai11816 (git 68c63f61b) >>> >>> on a debian bullseye install on a 6 core i5 with 32 Gigs of dram. >>> >>> I am in the process of making a tapered shim to be placed under the >>> spindle >>> motor mount of a 6040 mill, so that I can use the side of the >>> milling tool >>> to cut the 7 degree angle commonly used as the loaded face angle of a >>> buttress thread I am carving in a hard maple stick for use with a 3d >>> printed >>> nut to drive a paddle style leg vise on a woodworking workbench. >>> Pix of the first pass are at the link in the sig plus 6040-stf, that >>> screw >>> is around 50mm in diameter and 18" long. But while the printed nut does >>> have >>> that angle, the screw does not without another 20 line loop of gcode, >>> taking >>> another hour or more to render, its time & effort better to tilt the >>> spindle >>> 7 degrees. >>> >>> But because the face holding the motor is at a 7 degree from the z >>> axis in >>> openscad, >>> I need to offset the threaded holes, already at that angle, by the z >>> distance >>> plus or - by the product of cos(7). Which SWAGS at about .15mm up >>> for the >>> bottom >>> pair of holes, and -.15mm down for the upper row. If that's too >>> much, and >>> I have to >>> adjust the .scad to get it closer, I'd druther do it in the .scad >>> with one >>> LOC if I >>> can as that will be exact. But I'm getting syntax errors. >>> >>> Thank you all.  Take care and stay well. > So: > zz = cos(7); > echo(14, zz); gives 0.992546 > > then: > translate([-xof,-5,-zoff*zz])rotate([90,0,0])tiltbolt();//lower right >  translate([ xof,-5,-zoff*zz])rotate([90,0,0])tiltbolt(); //lower left >  translate([-xof,-4, zzff*zz])rotate([90,0,0])tiltbolt(); //upper > right,lower >  translate([ xof,-4, zzff*zz])rotate([90,0,0])tiltbolt(); // upper > left, lower > > hit F6 and the holes didn't even move a red one. threads I'll make > with a tap. In about an hour, after it cools. IF by then I'm not > taking a nap. Its been a looong day. > > Thank you Bill. > Then, 2nd pass failed cuz I can't measure the distance between 2 holes accurately enough. And also because my choice of starting block sizes made it tall enough to interfere with the heads of bolts above it. So at 3am, a third pass is 60% done. RE measured, re centered on the available real estate, made the cap screw pockets .1mm bigger and started a third try. Given a casting with bolt holes at each of its 4 corners, how do you folks get an accurate measurement of the distances in x and y directions? I've been measuring with both caliper faces by measuring between the inside faces of the holes with the outside tongs of the caliper, then between the outside faces with the inside tongs, adding them, and /4 to get the center offsets. The backside of the calipers tongs not being ground to a knife edge causes 3 point contact with one offset, error because the caliper is then off center in the hole, giving a longer than actual measerement. Which was the direction of the error when I tried to install pass #2 last night. Is there a better way? Grind a knife edge on the backside of the outside tongs perhaps? Cheers, Gene Heskett. -- "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 Genes Web page <http://geneslinuxbox.net:6309/>
RW
Raymond West
Wed, Jun 29, 2022 9:37 AM

On 29/06/2022 08:30, gene heskett wrote:

Is there a better way? Grind a knife edge on the backside of the
outside tongs perhaps?

the advantage of the cheap Chinese digital calipers, grind them to
whatever shape you need.

Or you could fit dowel pins in the holes, and just use external
measurements, or use a bore gauge or the simple firm joint inside
calipers to get the hole diameter.

The chances are, you don't need the accuracy you think you need,
particularly if you are bolting metal to wood, or metal to metal, unless
the holes are for dowel pins, (and then you'd not need four of them).
You can always use cad - cardboard aided design - do a 'brass rubbing '
of the cast iron on a bit of card, and use as a template, measure with a
ruler whatever.

On 29/06/2022 08:30, gene heskett wrote: > Is there a better way? Grind a knife edge on the backside of the > outside tongs perhaps? the advantage of the cheap Chinese digital calipers, grind them to whatever shape you need. Or you could fit dowel pins in the holes, and just use external measurements, or use a bore gauge or the simple firm joint inside calipers to get the hole diameter. The chances are, you don't need the accuracy you think you need, particularly if you are bolting metal to wood, or metal to metal, unless the holes are for dowel pins, (and then you'd not need four of them). You can always use cad - cardboard aided design - do a 'brass rubbing ' of the cast iron on a bit of card, and use as a template, measure with a ruler whatever.
GH
gene heskett
Wed, Jun 29, 2022 12:12 PM

On 6/29/22 05:41, Raymond West wrote:

On 29/06/2022 08:30, gene heskett wrote: >> Is there a better way?

Grind a knife edge on the backside of the >> outside tongs perhaps? > >
the advantage of the cheap Chinese digital calipers, grind them to >
whatever shape you need. > > Or you could fit dowel pins in the holes,
and just use external > measurements, or use a bore gauge or the simple
firm joint inside > calipers to get the hole diameter. > > The chances
are, you don't need the accuracy you think you need, > particularly if
you are bolting metal to wood, or metal to metal, > unless the holes are
for dowel pins, (and then you'd not need four of > them). You can always
use cad - cardboard aided design - do a 'brass > rubbing ' of the cast
iron on a bit of card, and use as a template, > measure with a ruler
whatever. It's not the hole size that is messing me up, Ray, it is the
distance
between the holes.  The holes clear or self thread 5mm bolts so there
are 5.5mm to clear, or 4.3mm to self thread tightly.

But pass #3 worked, its on the mill and its carving wood as I type.

Pix on my web page in the sig, look in the 6040-stf/pix directory to see
it installed and working.

And while the linuxcnc files there are from that machine, that machine no
longer has the electronics it shipped with, it was all an example that
invented the BBLB abbreviation. With decent electronics, and a home-made
B axis, that pix was taken while Y was moving about 50mm/minute, and B was
spinning at around 250 rpm. Tool is a 1/16" ball nose, spinning about 20
grand.
Saw dust is powder.
All in perfect to the degree, synch. My 3d printer made the stick holder
and the
parts that adapted the motor to a 5/1 worm drive. In OpenSCAD.

Couple pix of the first screw and nut I made there too. its 50mm in diameter
and 18" long. Whats on the machine when the wedge pix was taken is the
2nd one, still has a couple small flats from being round, then I let the
code
move on to thread it. Its going to be a blond one smaller, so I'll have
to make
the nuts from measurements of the finished stick. The nuts you see were
composed in OpenSCAD, takes about 12 hours to make two halves at a time.
That wedge was just under 8 hours.

Once I found a printer that actually works in PETG, its now a routine piece
of cake, but I've blown 5G's finding it, a BIQU BX, with a titanium heat
break
and a diamondback PCD nozzle.  That brings it up to about $750.

OpenSCAD? Best thing that's ever come my way. The only thing I could
really use, would be a converter that spits out gcode for subtractive
machining. OTOH I generally write my own g-code, this whole file to prep
and carve this stick of hard maple is under 150 LOC. Pretty good for a
ROF* of 87 years. OpenSCAD has allowed me to do things that weren't even
on the menu 5 years ago. Many many thanks to the coders.

*ROF=Retired Old Fart :o)> (a smiley with some chin whiskers)

Thanks Ray, Take care and stay well.

Cheers, Gene Heskett.

"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
Genes Web page http://geneslinuxbox.net:6309/

On 6/29/22 05:41, Raymond West wrote: > > On 29/06/2022 08:30, gene heskett wrote: >> Is there a better way? Grind a knife edge on the backside of the >> outside tongs perhaps? > > the advantage of the cheap Chinese digital calipers, grind them to > whatever shape you need. > > Or you could fit dowel pins in the holes, and just use external > measurements, or use a bore gauge or the simple firm joint inside > calipers to get the hole diameter. > > The chances are, you don't need the accuracy you think you need, > particularly if you are bolting metal to wood, or metal to metal, > unless the holes are for dowel pins, (and then you'd not need four of > them). You can always use cad - cardboard aided design - do a 'brass > rubbing ' of the cast iron on a bit of card, and use as a template, > measure with a ruler whatever. It's not the hole size that is messing me up, Ray, it is the distance between the holes.  The holes clear or self thread 5mm bolts so there are 5.5mm to clear, or 4.3mm to self thread tightly. But pass #3 worked, its on the mill and its carving wood as I type. Pix on my web page in the sig, look in the 6040-stf/pix directory to see it installed and working. And while the linuxcnc files there are from that machine, that machine no longer has the electronics it shipped with, it was all an example that invented the BBLB abbreviation. With decent electronics, and a home-made B axis, that pix was taken while Y was moving about 50mm/minute, and B was spinning at around 250 rpm. Tool is a 1/16" ball nose, spinning about 20 grand. Saw dust is powder. All in perfect to the degree, synch. My 3d printer made the stick holder and the parts that adapted the motor to a 5/1 worm drive. In OpenSCAD. Couple pix of the first screw and nut I made there too. its 50mm in diameter and 18" long. Whats on the machine when the wedge pix was taken is the 2nd one, still has a couple small flats from being round, then I let the code move on to thread it. Its going to be a blond one smaller, so I'll have to make the nuts from measurements of the finished stick. The nuts you see were composed in OpenSCAD, takes about 12 hours to make two halves at a time. That wedge was just under 8 hours. Once I found a printer that actually works in PETG, its now a routine piece of cake, but I've blown 5G's finding it, a BIQU BX, with a titanium heat break and a diamondback PCD nozzle.  That brings it up to about $750. OpenSCAD? Best thing that's ever come my way. The only thing I could really use, would be a converter that spits out gcode for subtractive machining. OTOH I generally write my own g-code, this whole file to prep and carve this stick of hard maple is under 150 LOC. Pretty good for a ROF* of 87 years. OpenSCAD has allowed me to do things that weren't even on the menu 5 years ago. Many many thanks to the coders. *ROF=Retired Old Fart :o)> (a smiley with some chin whiskers) Thanks Ray, Take care and stay well. Cheers, Gene Heskett. -- "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 Genes Web page <http://geneslinuxbox.net:6309/>