On Monday 15 March 2021 17:10:43 Dr. Nikolaus Klepp wrote:
> Anno domini 2021 Mon, 15 Mar 16:50:59 -0400
>
> Gene Heskett scripsit:
> > Greetings all;
> >
> > I need help in understanding OpenSCAD's version of a variables
> > scope. I can assign an $XX variable at the top of a .scad file but
> > it doesn't get passed into subsequent constructs inside of {}
> > isolated functions's.
> >
> > So how is this done in OpenSCAD?
>
> Global variables are visible everywhere. e.g.:
> $fn=180;
> a=10;
This does not jib with what I have observed:
a=64.55
b=9.75
25 lines of code later, with no intervening use of a or b, both are now
undefind.
cylinder([a, b, $fn=3); echo ( a, b);
(and both are undef. And openscad may, or may not crash and go away.
However, it ocurred to that I may be using some internal var names, and
that was the secret, I can now adjust anything fron the top 10 lines of
the file. My test 60 tooth outer ring was a bit big so I now have
another slightly smaller internal size being laid down. Test fit about 4
tomorrow, I've not worked that out yet but the tsrget is going to be
able to spec the tooth tip diameter, for both the inner wrong side out
belt, and in a separate file, the outside diameter, and the tooth tip
diameter, and everything else is autocalculated from those 3
measurements, Same idea for the bearing carrier that drives the inside
of the flex belt. I know it can be done, the question is, can I do it?
Getting a semi-working handle on openscad will be a giant step for me.
So will finding the right temps for PETG, 250 is so hot its burning the
stuff, looks like 230C for the nozzle is much better.
Thanks Nik. For giving me the elbow in the ribs to tackle it again.
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)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users