discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Parameter order to text()

ME
Mark Erbaugh
Mon, Feb 9, 2026 4:02 PM

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

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
JB
Jordan Brown
Mon, Feb 9, 2026 10:01 PM

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.

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.
HW
Harvey white
Mon, Feb 9, 2026 11:48 PM

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

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
JB
Jordan Brown
Tue, Feb 10, 2026 1:00 AM

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.

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.