discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Why does the attached NOT give me a 16x14 plate with 3mm rounded corners

JS
Jon S
Thu, Oct 15, 2026 8:56 AM

hull(){

cylinder(h=5,d=6,$fn=100);

translate(10,0)

cylinder(h=5,d=6,$fn=100);

translate(10,8)

cylinder(h=5,d=6,$fn=100);

  translate(0,8)

cylinder(h=5,d=6,$fn=100);

}

Please advise when you folks get a moment.

Thanks,

JonS

hull(){ cylinder(h=5,d=6,$fn=100); translate(10,0) cylinder(h=5,d=6,$fn=100); translate(10,8) cylinder(h=5,d=6,$fn=100); translate(0,8) cylinder(h=5,d=6,$fn=100); } Please advise when you folks get a moment. Thanks, JonS
GS
Guenther Sohler
Thu, Oct 15, 2026 9:00 AM

you need to place the translations in [] brackets like:

translate([10,8,0])

Guenther

On Thu, Oct 15, 2026 at 10:56 AM Jon S via Discuss <
discuss@lists.openscad.org> wrote:

hull(){

cylinder(h=5,d=6,$fn=100);

translate(10,0)

cylinder(h=5,d=6,$fn=100);

translate(10,8)

cylinder(h=5,d=6,$fn=100);

translate(0,8)

cylinder(h=5,d=6,$fn=100);

}

Please advise when you folks get a moment.

Thanks,

JonS


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

you need to place the translations in [] brackets like: translate([10,8,0]) Guenther On Thu, Oct 15, 2026 at 10:56 AM Jon S via Discuss < discuss@lists.openscad.org> wrote: > hull(){ > > cylinder(h=5,d=6,$fn=100); > > translate(10,0) > > cylinder(h=5,d=6,$fn=100); > > translate(10,8) > > cylinder(h=5,d=6,$fn=100); > > translate(0,8) > > cylinder(h=5,d=6,$fn=100); > > } > > Please advise when you folks get a moment. > > Thanks, > > JonS > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JS
Jon Sumpter
Thu, Oct 15, 2026 3:53 PM

Guenther,
Thank you.
JonS


From: Guenther Sohler via Discuss discuss@lists.openscad.org
Sent: Thursday, October 15, 2026 2:00 AM
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: Guenther Sohler guenther.sohler@gmail.com
Subject: [OpenSCAD] Re: Why does the attached NOT give me a 16x14 plate with 3mm rounded corners

you need to place the translations in [] brackets like:

translate([10,8,0])

Guenther

On Thu, Oct 15, 2026 at 10:56 AM Jon S via Discuss <discuss@lists.openscad.orgmailto:discuss@lists.openscad.org> wrote:

hull(){

cylinder(h=5,d=6,$fn=100);

translate(10,0)

cylinder(h=5,d=6,$fn=100);

translate(10,8)

cylinder(h=5,d=6,$fn=100);

translate(0,8)

cylinder(h=5,d=6,$fn=100);

}

Please advise when you folks get a moment.

Thanks,

JonS


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

Guenther, Thank you. JonS ________________________________ From: Guenther Sohler via Discuss <discuss@lists.openscad.org> Sent: Thursday, October 15, 2026 2:00 AM To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> Cc: Guenther Sohler <guenther.sohler@gmail.com> Subject: [OpenSCAD] Re: Why does the attached NOT give me a 16x14 plate with 3mm rounded corners you need to place the translations in [] brackets like: translate([10,8,0]) Guenther On Thu, Oct 15, 2026 at 10:56 AM Jon S via Discuss <discuss@lists.openscad.org<mailto:discuss@lists.openscad.org>> wrote: hull(){ cylinder(h=5,d=6,$fn=100); translate(10,0) cylinder(h=5,d=6,$fn=100); translate(10,8) cylinder(h=5,d=6,$fn=100); translate(0,8) cylinder(h=5,d=6,$fn=100); } Please advise when you folks get a moment. Thanks, JonS _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org<mailto:discuss-leave@lists.openscad.org>
JB
Jordan Brown
Thu, Oct 15, 2026 4:15 PM

As Guenter said, the one argument to translate is a single list of two
or three numbers, not two or three plain numbers.  That is:

translate([10,0]) ...

not

translate(10,0) ...

Note: It's not correct to say that the argument to translate() needs to
be in brackets, because it might be a variable or result from an
expression, e.g.:

pos = [10, 0];
translate(pos) something();
translate(pos + [5,5]) somethingElse();

You will see this same pattern in many places throughout the program: 
cube(), square(), translate(), rotate(), et cetera.  Some of them can
also take a single number - cube(10), for instance, is equivalent to
cube([10,10,10]) - but their 2D or 3D form always takes a list of
coordinates as a single argument.

But you should have gotten warnings in the console:

WARNING: Too many unnamed arguments supplied in file ., line 5
WARNING: Unable to convert translate(10) parameter to a vec3 or vec2 of numbers in file ., line 5
WARNING: Too many unnamed arguments supplied in file ., line 9
WARNING: Unable to convert translate(10) parameter to a vec3 or vec2 of numbers in file ., line 9
WARNING: Too many unnamed arguments supplied in file ., line 13
WARNING: Unable to convert translate(0) parameter to a vec3 or vec2 of numbers in file ., line 13

and in the Error Log pane:

and even if you've hidden those, you should have gotten an alert at the
top of the 3D view:

If you've hidden the console and the error log, and you've turned off
the warnings and errors in 3D view... don't do that.

Also:  DO turn on "Stop on the first warning" in
Edit/Preferences/Advanced/OpenSCAD Language Features/Warnings.  If
you've got a warning, you need to fix it.

As Guenter said, the one argument to translate is a single list of two or three numbers, not two or three plain numbers.  That is: translate([10,0]) ... not translate(10,0) ... Note: It's not correct to say that the argument to translate() needs to be in brackets, because it might be a variable or result from an expression, e.g.: pos = [10, 0]; translate(pos) something(); translate(pos + [5,5]) somethingElse(); You will see this same pattern in many places throughout the program:  cube(), square(), translate(), rotate(), et cetera.  Some of them can *also* take a single number - cube(10), for instance, is equivalent to cube([10,10,10]) - but their 2D or 3D form always takes a list of coordinates as a single argument. But you should have gotten warnings in the console: WARNING: Too many unnamed arguments supplied in file ., line 5 WARNING: Unable to convert translate(10) parameter to a vec3 or vec2 of numbers in file ., line 5 WARNING: Too many unnamed arguments supplied in file ., line 9 WARNING: Unable to convert translate(10) parameter to a vec3 or vec2 of numbers in file ., line 9 WARNING: Too many unnamed arguments supplied in file ., line 13 WARNING: Unable to convert translate(0) parameter to a vec3 or vec2 of numbers in file ., line 13 and in the Error Log pane: and even if you've hidden those, you should have gotten an alert at the top of the 3D view: If you've hidden the console and the error log, and you've turned off the warnings and errors in 3D view... don't do that. Also:  DO turn on "Stop on the first warning" in Edit/Preferences/Advanced/OpenSCAD Language Features/Warnings.  If you've got a warning, you need to fix it.