This seems dead simple, but the translate() call produces this error
message:
WARNING: Unable to convert translate([undef, undef, 0]) parameter to a
vec3 or vec2 of numbers in file , line 4
I cannot fathom how "r1" is "undefined"
module External(r1, r2, r3, r4) {
linear_extrude(4)
hull() {
translate([r1, r1, 0]) circle(r = r1);
circle(r = r2);
circle(r = r2);
circle(r = r4);
}
}
External();
On 31.12.23 20:15, jon via Discuss wrote:
External(); ^^^^^^^^^^^
Nothing given as value to r1 and it has no default.
ciao,
Torsten.
On Sun, 2023-12-31 at 14:15 -0500, jon via Discuss wrote:
This seems dead simple, but the translate() call produces this error
message:
WARNING: Unable to convert translate([undef, undef, 0]) parameter to
a vec3 or vec2 of numbers in file , line 4
I cannot fathom how "r1" is "undefined"
In all likelihood, it's because it has not been defined.
'undef' means that it has not been assigned a value.
You must either define it outside the model or call it using values in
all 4 positiions.
ie. External(1,2,3,4);
BTW, all but the first circle will be centred on 0,0.
module External(r1, r2, r3, r4) {
linear_extrude(4)
hull() {
translate([r1, r1, 0]) circle(r = r1);
circle(r = r2);
circle(r = r2);
circle(r = r4);
}
}
External();
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I knew I was doing something stupid; I just did not know what.
Thank you
Jon
On 12/31/2023 2:18 PM, Torsten Paul via Discuss wrote:
On 31.12.23 20:15, jon via Discuss wrote:
External(); ^^^^^^^^^^^
Nothing given as value to r1 and it has no default.
ciao,
Torsten.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org