Skip to content

Feature ShapeString

DeepSOIC edited this page Dec 27, 2015 · 1 revision

Feature (document object)

ShapeString is a feature for conveniently generating a set of strings as shapes. Internally, it uses Draft ShapeString, and inherits many of its properties.

ShapeString renders an array of strings (stored in Strings porperty) and joins the results into a compound. Children of compounds are substrings. The typical compounding structure looks like this:

Compound (2 objects):
    Compound ("String1"):
        Compound (Letter "S"):
            Face (<Plane object>)
        ...
        Compound (Letter "i"):
            Face (<Plane object>)
            Face (<Plane object>)
        ...
    Compound ("String2"):
        Compound (Letter "S"):
            Face (<Plane object>)
        ...
        Compound (Letter "i"):
            Face (<Plane object>)
            Face (<Plane object>)
        ...

Properties

AlignPrecisionBoundBox

If 'true', a precision bounding box is computed for substrings, for purposes of alignment. It is recommended to keep this property set to 'false', since computation of precise bounding boxes can be seriously slow.

ArrayLink

Link to an array of placments, to distibute the strings. It provides a shortcut to using ShapeString to create the strings and pupulate an array of placements with them (PopulateChildren)

FontFile

File name, or full path, of a font file to use. If relative path is specified (or just the file name), the font file is sought for in the following locations:

  • in installation of Lattice workbench, in path/to/Lattice2/fonts
  • in folder, where FCStd file is saved
  • in current directory

File extension must be included.

The following fonts are bundled with Lattice2 workbench:

  • FreeUniversal-Bold.ttf
  • FreeUniversal-BoldItalic.ttf
  • FreeUniversal-Italic.ttf
  • FreeUniversal-Regular.ttf

FullPathToFont

Displays the full path to font file actually used. This property is read-only.

Size

(inherited from Draft ShapeString)

Sets the font size, in mm. Font size is approximately equal to the height of small letters; I'm not entirely sure, what exactly is the font size.

Strings

List of strings to make shapes. Each line will be converted into a shape, and all the resulting strings are put into a compound.

Tracking

(inherited from Draft ShapeString)

Tracking is extra spacing between characters. It can be negative; the string is shrinked then.

Although the unit is mm, Draft ShapeString seems to interpret it somehow differently. I'm not sure, how exactly it is interpreted; you'll probably have to find the right value by trial-and-error.

XAlign

Horizontal alignment of the strings. Possible values:

  • 'None': no alignment is applied; each string is output as-generated by Draft ShapeString
  • 'Left': the left side of string's bounding box is made pass through origin (origin of local coordinate system, either that of ShapeString object, or of the placement the string is populated into).
  • 'Right': the right side of string's bounding box is made pass through origin
  • 'Center': the vertical centerline of string's bounding box is made pass through origin

YAlign

Vertical alignment of the strings. Possible values:

  • 'None': no alignment is applied; each string is output as-generated by Draft ShapeString
  • 'Top': the top side of string's bounding box is made pass through origin (origin of local coordinate system, either that of ShapeString object, or of the placement the string is populated into).
  • 'Bottom': the bottom side of string's bounding box is made pass through origin
  • 'Middle': the horizontal centerline of string's bounding box is made pass through origin

(click the title)

Because ShapeString always outputs a shape, common properties related to arrays of placements are defunct.

GUI Command (toolbar button)

feat-linarray.files/LinearArrayToolbar.png

Clicking the toolbar button creates a new ShapeString. If an array of placements is selected when the button is clicked, the resulting ShapeString is built on the array (the selected object is linked into ArrayLink property).

Clone this wiki locally