mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
commit
456fcd8d8a
2 changed files with 6 additions and 6 deletions
|
@ -2021,7 +2021,7 @@ function reuleaux_polygon(n=3, r, d, anchor=CENTER, spin=0) =
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// text = Text to create.
|
// text = Text to create.
|
||||||
// size = The font will be created at this size divided by 0.72. Default: 10
|
// size = The font will be created at this size divided by 0.72. Default: 10
|
||||||
// font = Font to use. Default: "Liberation Sans"
|
// font = Font to use. Default: "Liberation Sans" (standard OpenSCAD default)
|
||||||
// ---
|
// ---
|
||||||
// halign = If given, specifies the horizontal alignment of the text. `"left"`, `"center"`, or `"right"`. Overrides `anchor=`.
|
// halign = If given, specifies the horizontal alignment of the text. `"left"`, `"center"`, or `"right"`. Overrides `anchor=`.
|
||||||
// valign = If given, specifies the vertical alignment of the text. `"top"`, `"center"`, `"baseline"` or `"bottom"`. Overrides `anchor=`.
|
// valign = If given, specifies the vertical alignment of the text. `"top"`, `"center"`, `"baseline"` or `"bottom"`. Overrides `anchor=`.
|
||||||
|
@ -2036,7 +2036,7 @@ function reuleaux_polygon(n=3, r, d, anchor=CENTER, spin=0) =
|
||||||
// str("baseline",VECTOR) = Anchors at the baseline of the text, modified by the X and Z components of the appended vector.
|
// str("baseline",VECTOR) = Anchors at the baseline of the text, modified by the X and Z components of the appended vector.
|
||||||
// Examples(2D):
|
// Examples(2D):
|
||||||
// text("Foobar", size=10);
|
// text("Foobar", size=10);
|
||||||
// text("Foobar", size=12, font="Helvetica");
|
// text("Foobar", size=12, font="Courier");
|
||||||
// text("Foobar", anchor=CENTER);
|
// text("Foobar", anchor=CENTER);
|
||||||
// text("Foobar", anchor=str("baseline",CENTER));
|
// text("Foobar", anchor=str("baseline",CENTER));
|
||||||
// Example: Using line_copies() distributor
|
// Example: Using line_copies() distributor
|
||||||
|
@ -2047,7 +2047,7 @@ function reuleaux_polygon(n=3, r, d, anchor=CENTER, spin=0) =
|
||||||
// txt = "This is the string";
|
// txt = "This is the string";
|
||||||
// arc_copies(r=50, n=len(txt), sa=0, ea=180)
|
// arc_copies(r=50, n=len(txt), sa=0, ea=180)
|
||||||
// text(select(txt,-1-$idx), size=10, anchor=str("baseline",CENTER), spin=-90);
|
// text(select(txt,-1-$idx), size=10, anchor=str("baseline",CENTER), spin=-90);
|
||||||
module text(text, size=10, font="Helvetica", halign, valign, spacing=1.0, direction="ltr", language="en", script="latin", anchor="baseline", spin=0) {
|
module text(text, size=10, font, halign, valign, spacing=1.0, direction="ltr", language="en", script="latin", anchor="baseline", spin=0) {
|
||||||
no_children($children);
|
no_children($children);
|
||||||
dummy1 =
|
dummy1 =
|
||||||
assert(is_undef(anchor) || is_vector(anchor) || is_string(anchor), str("Got: ",anchor))
|
assert(is_undef(anchor) || is_vector(anchor) || is_string(anchor), str("Got: ",anchor))
|
||||||
|
|
|
@ -3355,12 +3355,12 @@ function onion(r, ang=45, cap_h, d, anchor=CENTER, spin=0, orient=UP) =
|
||||||
// ycenter = Anchor center is relative to the actualy y direction center of the text
|
// ycenter = Anchor center is relative to the actualy y direction center of the text
|
||||||
// Examples:
|
// Examples:
|
||||||
// text3d("Fogmobar", h=3, size=10);
|
// text3d("Fogmobar", h=3, size=10);
|
||||||
// text3d("Fogmobar", h=2, size=12, font="Helvetica");
|
// text3d("Fogmobar", h=2, size=12, font="Courier");
|
||||||
// text3d("Fogmobar", h=2, anchor=CENTER);
|
// text3d("Fogmobar", h=2, anchor=CENTER);
|
||||||
// text3d("Fogmobar", h=2, anchor=CENTER, atype="ycenter");
|
// text3d("Fogmobar", h=2, anchor=CENTER, atype="ycenter");
|
||||||
// text3d("Fogmobar", h=2, anchor=RIGHT);
|
// text3d("Fogmobar", h=2, anchor=RIGHT);
|
||||||
// text3d("Fogmobar", h=2, anchor=RIGHT+BOT, atype="ycenter");
|
// text3d("Fogmobar", h=2, anchor=RIGHT+BOT, atype="ycenter");
|
||||||
module text3d(text, h, size=10, font="Helvetica", spacing=1.0, direction="ltr", language="en", script="latin",
|
module text3d(text, h, size=10, font, spacing=1.0, direction="ltr", language="en", script="latin",
|
||||||
height, thickness, atype, center=false,
|
height, thickness, atype, center=false,
|
||||||
anchor, spin=0, orient=UP) {
|
anchor, spin=0, orient=UP) {
|
||||||
no_children($children);
|
no_children($children);
|
||||||
|
@ -3475,7 +3475,7 @@ function _cut_interp(pathcut, path, data) =
|
||||||
// text = text to create
|
// text = text to create
|
||||||
// size = The font will be created at this size divided by 0.72.
|
// size = The font will be created at this size divided by 0.72.
|
||||||
// thickness / h / height = thickness of letters (not allowed for 2D path)
|
// thickness / h / height = thickness of letters (not allowed for 2D path)
|
||||||
// font = font to use. Default: "Liberation Sans"
|
// font = Font to use. Default: "Liberation Sans" (standard OpenSCAD default)
|
||||||
// ---
|
// ---
|
||||||
// lettersize = scalar or array giving size of letters
|
// lettersize = scalar or array giving size of letters
|
||||||
// center = center text on the path instead of starting at the first point. Default: false
|
// center = center text on the path instead of starting at the first point. Default: false
|
||||||
|
|
Loading…
Reference in a new issue