I am using version 2025.12.21 on a Mac.
The order of the parameters to the text() module without naming parameters doesn’t seem to agree the documentation or pop-up list. According to the documentation the order is:
t (text to display)
size
font
halign
valign
spacing
direction
language
script
[$fn]
But my testing indicates the order is:
t (text to display)
size
font
direction
language
script
halign
valign
spacing
[$fn]
Mark
On 2/9/2026 8:02 AM, Mark Erbaugh via Discuss wrote:
The order of the parameters to the text() module without naming parameters doesn’t seem to agree the documentation or pop-up list.
Indeed. The documentation and popup have always been wrong; the order
today is the same as the order when direction and the following args
were added in 2018.
I would personally never use positional arguments for something with
that many arguments; I can't count that high or remember the order of
that many arguments, and usually I don't want to supply all of them
anyway. In OpenSCAD I don't usually use more than one positional argument.
The list that you give - text, size, font, direction, language, script,
halign, valign, spacing - is correct. $fn, $fa, and/or $fs must always
be named and can appear anywhere.
I'll see about fixing the various mismatches.
One solution to that is to enumerate the index values , so you have
case[height] to think of, where you've previously defined height as, say 0.
Certainly works in C++.
Harvey
On 2/9/2026 5:01 PM, Jordan Brown via Discuss wrote:
On 2/9/2026 8:02 AM, Mark Erbaugh via Discuss wrote:
The order of the parameters to the text() module without naming parameters doesn’t seem to agree the documentation or pop-up list.
Indeed. The documentation and popup have always been wrong; the order
today is the same as the order when direction and the following args
were added in 2018.
I would personally never use positional arguments for something with
that many arguments; I can't count that high or remember the order of
that many arguments, and usually I don't want to supply all of them
anyway. In OpenSCAD I don't usually use more than one positional
argument.
The list that you give - text, size, font, direction, language,
script, halign, valign, spacing - is correct. $fn, $fa, and/or $fs
must always be named and can appear anywhere.
I'll see about fixing the various mismatches.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On 2/9/2026 3:48 PM, Harvey white via Discuss wrote:
One solution to that is to enumerate the index values , so you have
case[height] to think of, where you've previously defined height as,
say 0.
Certainly works in C++.
When you're forced to pass things around as arrays, that is indeed a
viable technique. And indeed people sometimes use it when they want to
pass mixed data around in lists before the introduction of object().
But since OpenSCAD lets you directly specify the arguments by name, it's
not really applicable to this particular problem.