discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Show fonts

TL
Thomas Leonard Gertz
Mon, Dec 3, 2018 5:57 PM

Is there a easy way to show all fonts, how they looks and name?


Thomas Leonard Gertz
Kerteminde, Danmark

Sent from: http://forum.openscad.org/

Is there a easy way to show all fonts, how they looks and name? ----- Thomas Leonard Gertz Kerteminde, Danmark -- Sent from: http://forum.openscad.org/
TP
Torsten Paul
Mon, Dec 3, 2018 6:14 PM

On 03.12.18 18:57, Thomas Leonard Gertz wrote:

Is there a easy way to show all fonts, how they looks and name?

Yes and no, the list is available via Help->Font List and
you can drag&drop the name selection string from that list
into the editor.

There's no preview yet, but there's a feature request to
add this: https://github.com/openscad/openscad/issues/1395

ciao,
Torsten.

On 03.12.18 18:57, Thomas Leonard Gertz wrote: > Is there a easy way to show all fonts, how they looks and name? > Yes and no, the list is available via Help->Font List and you can drag&drop the name selection string from that list into the editor. There's no preview yet, but there's a feature request to add this: https://github.com/openscad/openscad/issues/1395 ciao, Torsten.
R
runsun
Mon, Dec 3, 2018 7:23 PM

would it be easier to have a builtin name like $fontnames containing all
font names, so it is easy for users to come up with examples themselves ?


$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer ); $ Tips ; $ Snippets

--
Sent from: http://forum.openscad.org/

would it be easier to have a builtin name like *$fontnames* containing all font names, so it is easy for users to come up with examples themselves ? ----- $ Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText ( OpenSCAD lexer ); $ Tips ; $ Snippets -- Sent from: http://forum.openscad.org/
P
Parkinbot
Fri, Dec 7, 2018 11:38 AM

wouldn't a feature like this violate the iron law that OpenSCAD doesn't allow
for queries?

As soon as this law softens I would immediately propose variables like:

  • $imports - reflect all imports as list_of(list_of(verts,faces))
  • $cmdline - reflect and set all command line arguments
  • $filename - reflect and set the actual filename for exports
  • $uselibs - reflect and set used libs and their order
  • $includelibs - reflect and set included libs
  • $functions - reflect and set resolutionpaths of functions
  • $modules - reflect resolutionpaths of modules
  • $constants reflect resolutionpaths of constants
  • $backgroundimage set image as background in viewport
  • $echo2clipboard - stream text into clipboard
    ...
  • $code - reflect and set(!) the actual code

and so on.

--
Sent from: http://forum.openscad.org/

wouldn't a feature like this violate the iron law that OpenSCAD doesn't allow for queries? As soon as this law softens I would immediately propose variables like: - $imports - reflect all imports as list_of(list_of(verts,faces)) - $cmdline - reflect and set all command line arguments - $filename - reflect and set the actual filename for exports - $uselibs - reflect and set used libs and their order - $includelibs - reflect and set included libs - $functions - reflect and set resolutionpaths of functions - $modules - reflect resolutionpaths of modules - $constants reflect resolutionpaths of constants - $backgroundimage set image as background in viewport - $echo2clipboard - stream text into clipboard ... - $code - reflect and set(!) the actual code and so on. -- Sent from: http://forum.openscad.org/
P
Parkinbot
Fri, Dec 7, 2018 3:37 PM

I forgot an important one:
$animation - read and set(!) animation parameters

--
Sent from: http://forum.openscad.org/

I forgot an important one: $animation - read and set(!) animation parameters -- Sent from: http://forum.openscad.org/
R
runsun
Fri, Dec 7, 2018 8:57 PM

I don't know about iron laws of OpenSCAD, but, for those queries you
mentioned, I want them all lol ...

Also add these:

$this => the name of func/mod in the current scope (but, I believe this is
incorporated into your $functions/$modules)
$arguments => the name and value of arguments inside a func/mod.

To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in
echo():

echo(abc=123);

The OpenSCAD is able to catch and present the argument name, "abc". Why not
release this feature to user functions ?


$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer ); $ Tips ; $ Snippets

--
Sent from: http://forum.openscad.org/

I don't know about iron laws of OpenSCAD, but, for those queries you mentioned, I want them all lol ... Also add these: $this => the name of func/mod in the current scope (but, I believe this is incorporated into your $functions/$modules) $arguments => the name and value of arguments inside a func/mod. To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in echo(): echo(abc=123); The OpenSCAD is able to catch and present the argument name, "abc". Why not release this feature to user functions ? ----- $ Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText ( OpenSCAD lexer ); $ Tips ; $ Snippets -- Sent from: http://forum.openscad.org/
NH
nop head
Fri, Dec 7, 2018 9:40 PM

LOL, it took a long argument to get $preview past the iron gates. Good luck
with this list.

As $ bestows dynamic scope there should really be another prefix for built
in variables that don't need to be dynamic. Probably one that isn't allowed
for user variables so there can be no clash when introducing a new one.

On Fri, 7 Dec 2018 at 20:58, runsun runsun@gmail.com wrote:

I don't know about iron laws of OpenSCAD, but, for those queries you
mentioned, I want them all lol ...

Also add these:

$this => the name of func/mod in the current scope (but, I believe this is
incorporated into your $functions/$modules)
$arguments => the name and value of arguments inside a func/mod.

To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in
echo():

echo(abc=123);

The OpenSCAD is able to catch and present the argument name, "abc". Why not
release this feature to user functions ?


$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc (
git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer
); $ Tips ; $ Snippets

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

LOL, it took a long argument to get $preview past the iron gates. Good luck with this list. As $ bestows dynamic scope there should really be another prefix for built in variables that don't need to be dynamic. Probably one that isn't allowed for user variables so there can be no clash when introducing a new one. On Fri, 7 Dec 2018 at 20:58, runsun <runsun@gmail.com> wrote: > I don't know about iron laws of OpenSCAD, but, for those queries you > mentioned, I want them all lol ... > > Also add these: > > $this => the name of func/mod in the current scope (but, I believe this is > incorporated into your $functions/$modules) > $arguments => the name and value of arguments inside a func/mod. > > To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in > echo(): > > echo(abc=123); > > The OpenSCAD is able to catch and present the argument name, "abc". Why not > release this feature to user functions ? > > > > ----- > > $ Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( > git ), runscad.py ( 2 , git ), editor of choice: CudaText ( OpenSCAD lexer > );&nbsp;$ Tips ;&nbsp;$ Snippets > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
MK
Marius Kintel
Fri, Dec 7, 2018 9:42 PM

On Dec 7, 2018, at 4:40 PM, nop head nop.head@gmail.com wrote:

As $ bestows dynamic scope there should really be another prefix for built in variables that don't need to be dynamic. Probably one that isn't allowed for user variables so there can be no clash when introducing a new one.

Yes, that would make it a lot easier to manage these special, read-only queries

-Marius

> On Dec 7, 2018, at 4:40 PM, nop head <nop.head@gmail.com> wrote: > > As $ bestows dynamic scope there should really be another prefix for built in variables that don't need to be dynamic. Probably one that isn't allowed for user variables so there can be no clash when introducing a new one. > Yes, that would make it a lot easier to manage these special, read-only queries -Marius
P
Parkinbot
Fri, Dec 7, 2018 10:25 PM

Most of them shouldn't be read-only. As a Windows user for example I find it
too inconvenient to write shell scripts, thus I hardly ever use cmdline
syntax for OpenSCAD. So I would love a possiblity to set cmdline args from
within OpenSCAD.

As for the new prefix, my keyboard tells me there are not many characters
left without OpenSCAD semantics.
@ ~  § € ' ^ ² ³ ° µ

Maybe also $$ can be used, which is currently not allowed.

--
Sent from: http://forum.openscad.org/

Most of them shouldn't be read-only. As a Windows user for example I find it too inconvenient to write shell scripts, thus I hardly ever use cmdline syntax for OpenSCAD. So I would love a possiblity to set cmdline args from within OpenSCAD. As for the new prefix, my keyboard tells me there are not many characters left without OpenSCAD semantics. @ ~ § € ' ^ ² ³ ° µ Maybe also $$ can be used, which is currently not allowed. -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Fri, Dec 7, 2018 10:25 PM

runsun wrote

I don't know about iron laws of OpenSCAD, but, for those queries you
mentioned, I want them all lol ...

Also add these:

$this => the name of func/mod in the current scope (but, I believe this is
incorporated into your $functions/$modules)
$arguments => the name and value of arguments inside a func/mod.

To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in
echo():

echo(abc=123);

The OpenSCAD is able to catch and present the argument name, "abc". Why
not
release this feature to user functions ?


$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc (
git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD
lexer ); $ Tips ; $ Snippets

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list

Discuss@.openscad

That is not some majical property, it was a hack to echo() AFAIK, for
example echo(str(a=1)); doesn't do the same.


Admin - email* me if you need anything, or if I've done something stupid...

  • click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

runsun wrote > I don't know about iron laws of OpenSCAD, but, for those queries you > mentioned, I want them all lol ... > > Also add these: > > $this => the name of func/mod in the current scope (but, I believe this is > incorporated into your $functions/$modules) > $arguments => the name and value of arguments inside a func/mod. > > To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in > echo(): > > echo(abc=123); > > The OpenSCAD is able to catch and present the argument name, "abc". Why > not > release this feature to user functions ? > > > > ----- > > $ Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( > git ), runscad.py ( 2 , git ), editor of choice: CudaText ( OpenSCAD > lexer );&nbsp;$ Tips ;&nbsp;$ Snippets > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@.openscad > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org That is not some majical property, it was a hack to echo() AFAIK, for example echo(str(a=1)); doesn't do the same. ----- Admin - email* me if you need anything, or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
NH
nop head
Fri, Dec 7, 2018 10:30 PM

I use Python to script the command line. Then it works on any OS as well.

On Fri, 7 Dec 2018 at 22:25, Parkinbot rudolf@digitaldocument.de wrote:

Most of them shouldn't be read-only. As a Windows user for example I find
it
too inconvenient to write shell scripts, thus I hardly ever use cmdline
syntax for OpenSCAD. So I would love a possiblity to set cmdline args from
within OpenSCAD.

As for the new prefix, my keyboard tells me there are not many characters
left without OpenSCAD semantics.
@ ~  § € ' ^ ² ³ ° µ

Maybe also $$ can be used, which is currently not allowed.

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I use Python to script the command line. Then it works on any OS as well. On Fri, 7 Dec 2018 at 22:25, Parkinbot <rudolf@digitaldocument.de> wrote: > Most of them shouldn't be read-only. As a Windows user for example I find > it > too inconvenient to write shell scripts, thus I hardly ever use cmdline > syntax for OpenSCAD. So I would love a possiblity to set cmdline args from > within OpenSCAD. > > As for the new prefix, my keyboard tells me there are not many characters > left without OpenSCAD semantics. > @ ~ § € ' ^ ² ³ ° µ > > Maybe also $$ can be used, which is currently not allowed. > > > > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
R
runsun
Sat, Dec 8, 2018 12:04 AM

Sure str() and echo() don't work the same. Only echo() has that hack.

What my point is that echo() can catch the argument name. It means
OpenSCAD already can do that, so it should not be totally new to let user
functions (or module) do that as well :

function f(len,width)=
echo( $arguments )
len_width;

a= f(5);
==> [ ["len",5], ["width", undef] ]

MichaelAtOz wrote

That is not some magical property, it was a hack to echo() AFAIK, for
example echo(str(a=1)); doesn't do the same.


$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer ); $ Tips ; $ Snippets

--
Sent from: http://forum.openscad.org/

Sure str() and echo() don't work the same. Only echo() has that hack. What my point is that echo() can catch the argument name. It means OpenSCAD already can do that, so it should not be totally new to let user functions (or module) do that as well : function f(len,width)= echo( $arguments ) len_width; a= f(5); ==> [ ["len",5], ["width", undef] ] MichaelAtOz wrote > That is not some magical property, it was a hack to echo() AFAIK, for > example echo(str(a=1)); doesn't do the same. ----- $ Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText ( OpenSCAD lexer );&nbsp;$ Tips ;&nbsp;$ Snippets -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Sat, Dec 8, 2018 1:03 AM

runsun wrote

function f(len,width)=
echo( $arguments )
len_width;

a= f(5);
==> [ ["len",5], ["width", undef] ]

so just for debugging shortcut instead of

function f(len,width)=
echo( len=len, width=width)
len_width;

?


Admin - email* me if you need anything, or if I've done something stupid...

  • click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

runsun wrote > function f(len,width)= > echo( $arguments ) > len_width; > > a= f(5); > ==> [ ["len",5], ["width", undef] ] so just for debugging shortcut instead of function f(len,width)= echo( len=len, width=width) len_width; ? ----- Admin - email* me if you need anything, or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Sat, Dec 8, 2018 1:07 AM

function f(len,width)=
[ ["len",len], ["width",width] ];

??


Admin - email* me if you need anything, or if I've done something stupid...

  • click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

function f(len,width)= [ ["len",len], ["width",width] ]; ?? ----- Admin - email* me if you need anything, or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
P
Parkinbot
Sat, Dec 8, 2018 11:58 AM

MichaelAtOz,

in OpenSCAD you can call functions and modules with an unlimited number of
arguments - e.g. you don't get an error with misspelled paraemeter names,
which can be nasty problem when it comes to tracking an error.
However, the good news (with respect to $arguments) is: Those arguments that
are not defined in the prototype are currently ignored. The bad news is:
they are not accessible at all. So you can't implement functions and modules
with a variable number of arguments unless you pack them into a list, parse
this list and solve the naming problem.

myfunc(1,2,3,a=4,b=5,c=6);

module myfunc()  echo("works but no args declared");

So the new $arguments variable would allow for:

module myfunc()  echo("works withargs ", $arguments);

and give access to any provided parameters and its names which can also be
"$argument_x" if anonymous, as is the case in the call
myfunc(1,2,3,a=4,b=5,c=6);

But let me mention that OpenSCAD already provides an even wierder mechanism.
You don't have to declare parameters at all. Why not just use them and trust
on the caller?

myfunc(1,2,3,a=4,b=5,c=6);

module myfunc()  echo("works even no args were declared: ", a, b, c);

--
Sent from: http://forum.openscad.org/

MichaelAtOz, in OpenSCAD you can call functions and modules with an unlimited number of arguments - e.g. you don't get an error with misspelled paraemeter names, which can be nasty problem when it comes to tracking an error. However, the good news (with respect to $arguments) is: Those arguments that are not defined in the prototype are currently ignored. The bad news is: they are not accessible at all. So you can't implement functions and modules with a variable number of arguments unless you pack them into a list, parse this list and solve the naming problem. myfunc(1,2,3,a=4,b=5,c=6); module myfunc() echo("works but no args declared"); So the new $arguments variable would allow for: module myfunc() echo("works withargs ", $arguments); and give access to any provided parameters and its names which can also be "$argument_x" if anonymous, as is the case in the call myfunc(1,2,3,a=4,b=5,c=6); But let me mention that OpenSCAD already provides an even wierder mechanism. You don't have to declare parameters at all. Why not just use them and trust on the caller? myfunc(1,2,3,a=4,b=5,c=6); module myfunc() echo("works even no args were declared: ", a, b, c); -- Sent from: http://forum.openscad.org/
R
runsun
Sat, Dec 8, 2018 6:36 PM

Sorry there's a typo in my post. I was meant to say

function f(len,width)=
echo( $arguments )
len+width;  // not len_width;

It's to return len+width.

The "[ ["len",5], ["width", undef] ]" is to be displayed in the console due
to echo( $arguments )

MichaelAtOz wrote

runsun wrote

function f(len,width)=
echo( $arguments )
len_width;

a= f(5);
==> [ ["len",5], ["width", undef] ]

so just for debugging shortcut instead of

function f(len,width)=
echo( len=len, width=width)
len_width;

?


Admin - email* me if you need anything, or if I've done something
stupid...

  • click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/


OpenSCAD mailing list

Discuss@.openscad


$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer ); $ Tips ; $ Snippets

--
Sent from: http://forum.openscad.org/

Sorry there's a typo in my post. I was meant to say function f(len,width)= echo( $arguments ) len+width; // not len_width; It's to return len+width. The "[ ["len",5], ["width", undef] ]" is to be displayed in the console due to echo( $arguments ) MichaelAtOz wrote > runsun wrote >> function f(len,width)= >> echo( $arguments ) >> len_width; >> >> a= f(5); >> ==> [ ["len",5], ["width", undef] ] > > so just for debugging shortcut instead of > > function f(len,width)= > echo( len=len, width=width) > len_width; > > ? > > > > ----- > Admin - email* me if you need anything, or if I've done something > stupid... > > * click on my MichaelAtOz label, there is a link to email me. > > Unless specifically shown otherwise above, my contribution is in the > Public Domain; to the extent possible under law, I have waived all > copyright and related or neighbouring rights to this work. Obviously > inclusion of works of previous authors is not included in the above. > > The TPP is no simple “trade agreement.” Fight it! > http://www.ourfairdeal.org/ time is running out! > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@.openscad > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org ----- $ Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText ( OpenSCAD lexer );&nbsp;$ Tips ;&nbsp;$ Snippets -- Sent from: http://forum.openscad.org/
HJ
Hugo Jackson
Sat, Dec 8, 2018 7:26 PM

I like some of the suggestions for adding some new system special variables… so I just thought I’d put forward my own.

$system … returns the system time in seconds a la unix.

I’m sure you’re all a lot more organized than I am in making your creations… but for my part I’m often looking at a desktop (literal… not virtual) of a whole bunch of test pieces I’ve printed and unable to tell which one is which.
I’ve taken to embedding some text in my models with a ‘build number’ but naturally I keep on forgetting to update the variable I use to set the build number. <sigh>
If there were a system special variable like $systime then I could easily massage that into a unique string variable to be included in my designs so that in the prototyping stage I’d be able to differentiate between all the test pieces I’d printed off.

Just my two cents.

I like some of the suggestions for adding some new system special variables… so I just thought I’d put forward my own. $system … returns the system time in seconds a la unix. I’m sure you’re all a lot more organized than I am in making your creations… but for my part I’m often looking at a desktop (literal… not virtual) of a whole bunch of test pieces I’ve printed and unable to tell which one is which. I’ve taken to embedding some text in my models with a ‘build number’ but naturally I keep on forgetting to update the variable I use to set the build number. <sigh> If there were a system special variable like $systime then I could easily massage that into a unique string variable to be included in my designs so that in the prototyping stage I’d be able to differentiate between all the test pieces I’d printed off. Just my two cents.
M
MichaelAtOz
Sat, Dec 8, 2018 9:55 PM

boxcarmib wrote

If there were a system special variable like $systime then I could easily
massage that into a unique string variable to be included in my designs so
that in the prototyping stage I’d be able to differentiate between all the
test pieces I’d printed off.

It is possible ATM with some fiddling.
You need a process somewhere, which just puts "$anyvariable=<whatever you want>;" into a somename.scad file, repeatedly or on demand, for your case
every minute (say, to reduce potential file conflicts*).

Then "include <somename.scad>", and you have somewhat dynamic external
variables.

*I'm presuming, pretty firmly, that files are not locked on reading by
OpenSCAD; depending on the process used to update, there is a potential tiny
time when a file may be deleted just before the new one is created. And
OpenSCAD caches, but checks for updated files, so some experimentation is
required before using this for flight control purposes.


Admin - email* me if you need anything, or if I've done something stupid...

  • click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

boxcarmib wrote > If there were a system special variable like $systime then I could easily > massage that into a unique string variable to be included in my designs so > that in the prototyping stage I’d be able to differentiate between all the > test pieces I’d printed off. It is possible ATM with some fiddling. You need a process somewhere, which just puts "$anyvariable=<whatever you want>;" into a somename.scad file, repeatedly or on demand, for your case every minute (say, to reduce potential file conflicts*). Then "include <somename.scad>", and you have somewhat dynamic external variables. *I'm presuming, pretty firmly, that files are not locked on reading by OpenSCAD; depending on the process used to update, there is a potential tiny time when a file may be deleted just before the new one is created. And OpenSCAD caches, but checks for updated files, so some experimentation is required before using this for flight control purposes. ----- Admin - email* me if you need anything, or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Sat, Dec 8, 2018 10:13 PM

Note for GitHub users https://github.com/openscad/openscad/issues/380, I'll
add a pointer back to this discussion.


Admin - email* me if you need anything, or if I've done something stupid...

  • click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

Note for GitHub users https://github.com/openscad/openscad/issues/380, I'll add a pointer back to this discussion. ----- Admin - email* me if you need anything, or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
HJ
Hugo Jackson
Sat, Dec 8, 2018 10:17 PM

Thanks for this. Sorry… I should have done a more comprehensive search of existing topics before throwing my hat in the ring.

On Dec 8, 2018, at 2:13 PM, MichaelAtOz oz.at.michael@gmail.com wrote:

Note for GitHub users https://github.com/openscad/openscad/issues/380, I'll
add a pointer back to this discussion.


Admin - email* me if you need anything, or if I've done something stupid...

  • click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Thanks for this. Sorry… I should have done a more comprehensive search of existing topics before throwing my hat in the ring. > On Dec 8, 2018, at 2:13 PM, MichaelAtOz <oz.at.michael@gmail.com> wrote: > > Note for GitHub users https://github.com/openscad/openscad/issues/380, I'll > add a pointer back to this discussion. > > > > ----- > Admin - email* me if you need anything, or if I've done something stupid... > > * click on my MichaelAtOz label, there is a link to email me. > > Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. > > The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org