|
How To Import TrueType Fonts & Shapes into Alibre Design Models Using my Text Import Wizard for Alibre Design, you can easily import text in TrueType or OpenType fonts into Alibre Design, while accurately representing both the curves (splines) and lines that make up the font characters.
All images, text and code is ©1995-2008 by Alex Franke. All rights reserved. Published: Mar 27, 2006 Updated: Oct 28, 2006
In this article:
Text Import Wizard for Alibre Design Sample Imported Text
If you don't already have Alibre Design, you can get it here -- either by downloading
the a free version of their software called Alibre Design Xpress,
or by selecting a version below to purchase from Amazon.com. You must have Alibre Design
installed and running for the Dovetail Jig to work.
| Alibre Design Versions - Mouse over & click | 
| 
| 
|
Dovetail Jig for Alibre Design was build on the Microsoft .Net 2.0 framework. It
requires Windows with .Net 2.0, which can be installed with Microsoft
Update or by visiting Microsoft
and searching for "Installing .Net 2.0". The .Net 2.0 framework is free, easy to install,
and it only needs to be installed once.
Finally, the application uses a new deployment technology from Microsoft called "Click Once"
-- this makes it easy for you to download and install applications, and make sure
you always have the latest version available. If you're using Internet Explorer,
simply download
Text Import Wizard for Alibre Design, then follow the instructions to install.
If you're using Firefox, be sure you have the
Firefox Click Once Extension installed, then
download Text Import Wizard.
Once the application is installed on your computer, it will be available from your
Windows Start menu (whether or not you're online) by browsing to All Programs >
plans.theFrankes.com.
So to recap:
- Ensure you're running Windows with the .Net 2.0 Framework.
- Ensure you have Alibre Design installed.
- Start up an Alibre Design session.
- Download Text Import Wizard for Alibre Design.
- Register Text Import Wizard for Alibre Design.
- Start importing text!
CollegeFundware: What is it? Is it Free?
I have a bright little boy who I'm sure will want to go to college.
I estimated
the cost of this to be about $400,000 by the time he is ready. That's a heck of a lot
of cash, so I came up with
CollegeFundware to help.
The software is basically shareware with a twist. You're licensed to try it out for a
reasonable period of time, but if you want to keep using it after that, you need to
contribute
to my boy's college fund. =) So it's not really free, but rest assured: You're
not helping some billionaire get richer -- you're helping a bright little kid get
a decent education.
Register Now!
How Do I Do It?
Even though this is not the topic of this tutorial, I get this question enough to at least comment on
it here. Extracting and importing font curve data requires several intermediate to advanced
programming skills, as well as familiarity with the Alibre Design API, the Windows API (Win32
API), TrueType and OpenType font specifications, matrices, and computational geometry. Needless to say, a
full discussion on this is out of scope for a tutorial on importing text into Alibre Design, but
if you want to try to tackle the problem yourself, here are some reference books that might help you.
Getting Started
Start up Alibre Design or Alibre Design Xpress and create a new, empty part. Then from the Windows
Start menu, browse to
All Programs > plans.theFrankes.com > Text Import Wizard for Alibre Design
You should see a screen similar to this. (Except if you haven't yet registered,
you'll also see a picture or two of the boy who will benefit from your product registration.)
 Text Import Wizard
Once you've registered the software, you can resize this window even smaller. It
was designed to use very little space on your screen. You'll find the interface
straightforward and easy to use.
About The Interface (from left to right) | Menu Bar:
Click on the "?" at the left to get the main menu, including options to configure
the application, define and save preferences, and get additional help.
|  | Text Input Area: Type the text here that you want to import.
|  | Units: Select the units you will be using to define the size of
the text. (This happens in the next step.) These don't have to be the same units
as your drawing. The text will be scaled from TrueType font units, through
the units you choose here, and into the units you use in your drawing. So, if you
select Centimeters with a font size of 2.54, and your drawing uses inches, then
the resulting font will be about an inch high.
| |
Transform button | Transform: Choose any number of powerful text transformations, including offset, rotation, translation, mirror and more. This feature is described in detail below.
|  | Import Button: Once you have selected a sketch or design plane
in Alibre Design, click this button to start the import process. You first choose
a font, style and size, and then the Text Import Wizard will begin to import the
text.
|  | Progress Bar: This bar will "fill" from left to right while the
import is processing. Additionally, if the screen is wide enough, you'll also see
a message indicating which glyph (character) of the total number is currently being
imported.
| Selecting a Sketch or Plane
Text Import Wizard works with your running copy of Alibre Design by checking
to see what you currently have selected and then acting upon that object.
Select a sketch of plane by clicking on it in your Alibre Design session. If you
select a plane, a sketch based on that plane will be created automatically, and
the new sektch will be used for the imported text.
If you have more than one part session open, or if you select a part session with
more than one sketch or deskgn plane selected, Text Import Wizard will display a
selection window allowing you to target just one of the
items you have selected.
When selecting a plane, be sure the plane is selected (highlighted) in the main
design area, and not just in the Design Explorer.
Specifying Text & Units
Type the text you want to import into the Text Input Area. Start with just a few
characters so you can get accustomed to the speed at which Alibre Design imports
curves and polylines. Note that complicated fonts, such as decorative scripts or
fonts with "rough" edges (e.g. handwriting simulation), are defined by a large number
of lines and splines, and may take considerably longer to import.
Next select the units you wish to use to describe the height of the font when it's
imported. Text Import Wizard supports an unusually wide variety of units =). The
units you select need not be the units of your drawing. You'll actually specify
the font size in the next step.
- Centimeters (cm)
- Decimeters (dm)
- Meters (m)
- Inches (in)
- Feet (ft)
- Yards (yd)
- Links (surveying)
- Chains (ch, surveying)
- Fathoms (nautical)
- Hands (horses)
- Mils (tolerances)
- Points (typography)
- Rod (rd); Pole; Perch
Because of the variety of different ways fonts can be measured, the rendered font
will be approximately the size you specify.
Text Transformations
Click on "Transform" to open the Text Transformations dialog box, allows you to apply
any number of powerful text transformations on the imported text.
 Text Transformations dialog
First, set the initial position (in units) at which to start placing the characters.
In the example below, you can see that the base of the "R" is positioned
+4 units along X axis, and +2 units along the Y. This starting position setting is
independant of the other transformations.
Next, select your first transformation from the drop-down box. Some common transformations
(such as mirror) can actually be achieved with other transformations, but are included in
this list for convenience. Depending upon the type of transformation you select, you may
be given the option to add an angle or (X,Y) value. For example, if you choose the Rotate
tranformation, you'll need to specify how many degrees to rotate.
Now click Add to add the transformation to the list at the bottom of the dialog. You can add as
many transformations as you want, and each of the transformations will be applied in order.
Note that the order in which the transformations are applied can make a big difference in
how the text actually looks when it's imported.
There are several transformation to choose from:
- Mirror Horizontally - Reflect as if the mirror were placed on the horizontal axis.
- Mirror Vertically - Reflect as if the mirror were placed on the vertical axis.
- Rotate - Rotate the text about the starting position.
- Scale - Enlarge or reduce the output.
- Shear Horizontally - Slide the bottom edge horizontally. A value of 1 is the height.
- Shear Vertically - Slide the right edge vertically. A value of 1 is the width.
- Translate - Repositions each new character by the given offset.
When you're finished adding transformations, click "OK" to close the dialog. The
transformations will be applied in order after you click Import. Here's an example of the
output generated with the setting specified in the dialog box screenshot above.
 Mirrored and rotated textImporting the Text
Now Click Import. Text Import Wizard will tell you if you have not selected a sketch
or plane, or if your selection is ambiguous.
Text Import Wizard will prompt you to select a font, style and size using the screen
shown here. Remember that the size you specify here will be imported in the units
you specified in the previous step. The Text Import Wizard supports TrueType fonts, and
some OpenType fonts, but not all of them. (Unfortunately, this is a limitation of
Microsoft's .Net Framework.)
 Selecting a font
When you click OK, you'll see the progress bar and the status message begin to change
as the glyphs (characters) are imported one by one.
The Text Import Wizard also supports extended Unicode character sets, as well. Here's an example.
(I have no idea what these characters mean, so I hope they're not offensive. I just thought
they looked cool. If you happen to know what this means, please let me know!)
 Extended Unicode character setsAbout the Imported Text
Text Import Wizard imports text as a series of b-splines which are derived from
the curve data specified in the font files. Alibre Design natively supports these
b-spline curves. This means that the font outlines are very accurate, and because they
are not described mathematically as large sets of stright lines, they require less
memory and processing power to draw and manipulate.
Alibre Design does not see the text as text, but rather as a bunch of curves -- the
precise mathematical curves that the font designers used used to describe the font
in the first place. This can present a problem from time to time when you work with
fonts that were not designed to be extruded. For example, some fonts (script fonts
especially) have overlapping lines and characters, which Alibre Design cannot extrude or
cut. Some fonts are just designed very sloppily, and even they they don't appear
to have any problems, they actually do. You can often fix problem curves by zooming
in and editing them by hand, but this task can be a tedius task.
Though some fancy fonts can be imported and extruded with no problems at all, you may
need to experiment a bit to find the fonts that produce the best results for you and the
characters you're attempting to import.
There also appears to be a bug in Alibre Design that causes an FF_MERGE FAILURE error when
attempting to extrude or cut some complex b-spline curves, but only when the sketch the
curves are on lies on exactly the same plane as the surface you're trying to extrude from or
cut into. There is a simple solution for this if you encounter this error:
FF_MERGE_FAILURE Error
If you encounter an FF_MERGE_FAILURE error, it means that Alibre Design is having difficulty
calculating how to mathematically describe the intersection of the extruded (or cut) curves
and the face they're on. To solve this, simply slightly offset the plane that holds the
curves (or text) from the plane you wish to extrude from or cut into. If they are not the
exact same plane, Alibre Design can accurately perform this calculation and you won't see the
error. If you're extruding from a surface, place the curves on a plane that is set into the solid
just a tiny amount (0.001mm, for example); and if you're cutting into a surface, place the
curves on a plane that is slightly outside of the surface.
User Preferences
Text Import Wizard will store a variety of user preferences. In addition to the
preferences indicated in the menu below, when you click "Save Settings As Defaults"
(also shown in the menu below), Text Import Wizard will also store the text currently
displayed in the Text Input Area, the currently selected Units, and the current
dimensions of the Text Import Wizard window.
 Setting a default font
For registered users, all of the stored preferences will be loaded as defaults when
you start the application. For non-registered users, only some of them will.
Registering Text Import Wizard
Registering this software with even a small contribution will help a bright young
boy have an even brighter future, and it will allow you to freely use the software
with a clear conscience. Registration is easy and secure. It is handled by PayPal,
although you do not have to be a PayPal member to register.
Register Now
After you register, you'll receive a product Serial Number and Registration Key
via email. From the Tools menu, select Add Registration Code and enter the information
you received. It's usually best to copy and paste these values.
Important: Be sure to include the "REG:" at the begining of the registration key!
 Registering Text Import Wizard
|