Merge pull request #1322 from RAMilewski/master

Error message in text3d() incorrect.
This commit is contained in:
Revar Desmera 2023-12-07 15:27:03 -08:00 committed by GitHub
commit 7c0500c486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -2946,7 +2946,7 @@ function onion(r, ang=45, cap_h, d, anchor=CENTER, spin=0, orient=UP) =
// direction = The text direction. `"ltr"` for left to right. `"rtl"` for right to left. `"ttb"` for top to bottom. `"btt"` for bottom to top. Default: `"ltr"`
// language = The language the text is in. Default: `"en"`
// script = The script the text is in. Default: `"latin"`
// atype = Change vertical center between "baseline" and "center". Default: "baseline"
// atype = Change vertical center between "baseline" and "ycenter". Default: "baseline"
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `"baseline"`
// center = Center the text. Equivalent to `atype="center", anchor=CENTER`. Default: false
// spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0`
@ -2966,7 +2966,7 @@ module text3d(text, h, size=10, font="Helvetica", spacing=1.0, direction="ltr",
anchor, spin=0, orient=UP) {
no_children($children);
h = one_defined([h,height,thickness],"h,height,thickness",dflt=1);
assert(is_undef(atype) || in_list(atype,["ycenter","baseline"]), "atype must be \"center\" or \"baseline\"");
assert(is_undef(atype) || in_list(atype,["ycenter","baseline"]), "atype must be \"ycenter\" or \"baseline\"");
assert(is_bool(center));
atype = default(atype, center?"ycenter":"baseline");
anchor = default(anchor, center?CENTER:LEFT);

View file

@ -9,7 +9,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,658];
BOSL_VERSION = [2,0,661];
// Section: BOSL Library Version Functions