Using the Alias Batch File Translator

The Alias Batch File Translator is a command line invocation of Alias that allows unattended data file translation. Using this interface to Alias in a UNIX shell script allows for multiple file translations to occur unattended, perhaps in an overnight batch job. All file formats supported by Alias retrieve/save features are supported with the exception of Filter.

User Interface

The command-line interface is quite simple, but requires the knowledge of how to create an executable UNIX shell script if an entire directory tree of files is to be converted. The syntax to invoke the batch translator to retrieve a file (or files) and then save the resulting Alias model in another file is as follows:

ALIAS -B -W -R<optimize flag> -SDL -o<options file> -p<project> -s<save file> <file1> <file2>... <file N> where:

-B signifies that Alias is to be run in batch mode, which means that there will be no graphics and Alias will exit after retrieving and/or saving any files.
-W tells Alias to overwrite the file to save if it already exists. By default, Alias will not overwrite existing data files in batch mode.
-R<optimize flag> turns on the desired retrieve optimization.

SDL Batch File Translation

Support for output of SDL files has been added to the Batch File Translation mode. To convert to SDL in this mode, the command line arguments to Alias are:

Alias -B [-W] -SDL -s <output file name> <input_filename...> For example, Alias -B -SDL -smy_anim.sdl my_anim.wire

The output SDL file will be written to the "sdl" sub-directory of the current project.

There are currently two retrieve optimizations supported; -R1 and -R2. These retrieve optimizations are for retrieval of Alias version 3.2.2 wire files with trim surfaces only, and are described later in this section.

Note: Several files can be retrieved, but only one file can be saved per invocation. When converting very large IGES files to WIRE format, only one IGES file should be retrieved per invocation of Alias in batch mode.

Options File

The retrieve and save operations in batch mode are controlled by an Alias options file. If no options file is specified on the command line, then either the system default options will be used (ALIAS_options), or if a user_options file is created, then these options will be used.

The options are set for batch translation by running the interactive version of Alias and performing these steps:

  • Select File Retrieve- to open the Retrieve Options window.
  • Set the Basic Retrieve Options for the type of file being retrieved, then click Cancel. This will abort the retrieve operation, but retain the chosen options.
  • Select File Save all as- to open the Save All Options window.
  • Set the file type to save (Basic Save Options), and set any other save options for this file type.
  • Select Preferences Save Options and save an options file to disk. The options file used for the batch invocation of Alias must reside in the option directory of the project specified with the -p option. Alias will look in the option directory of the default project if -p is not specified. The default project is the project that was in use during the last invocation of Alias.
  • Filenames and Project Directory

    The filenames are either absolute UNIX path names, or are the names of files that can be found in the wire directory of the default project, or the project specified with the -p option.

    Messages and Errors

    All messages that are presented in interactive mode are redirected to standard output when Alias is run in batch mode. This means messages that appear on the prompt line, in the errlog file, and in confirm windows are displayed in the window from which the Alias batch program is executed.

    Supported File Formats

    All file formats that are supported by the Alias Retrieve and Save all as functions are supported in batch mode, with the exception of Filter. In batch mode, if Alias detects that the save file format is Filter, then this will be treated as an error and no file will be saved.

    Retrieve Optimizations for V3.2.2 Wire Files

    These retrieve optimizations are very specialized and should only be used to alleviate the following problem.

    Models retrieved via IGES from certain solid modeling applications (for example, ProEngineer) tend to be constructed entirely of trimmed surfaces. Some of these trimmed surfaces are over-represented; that is, the trim curves are superfluous and the same shape can be represented using a smaller surface, rather than trimming a larger surface. Similarly, trimmed planar surfaces can be represented using Alias FACE geometry. The model-space trim curves representing the trim boundaries can be translated to Alias FACE curves. Converting trimmed surfaces to surfaces or face geometry results in a "lighter" representation of the model; that is, less memory is used so the performance of Alias for larger models improves.

    These optimizations are built into the Alias IGES translator in V5.1, and can be enabled/disabled via the retrieve option window. For IGES data that was retrieved into versions of Alias prior to and including V3.2.2, these optimizations did not exist. Consequently, a large number of trimmed surfaces that currently exist in V3.2.2 Wire files, that originated as IGES data, could benefit from these optimizations.

    The -R1 and -R2 command line options are provided to optimize trimmed surface models when V3.2.2 Wire files are retrieved. This includes Wire files created by versions of Alias prior to V3.2.2. These options do not apply to any other file format.

    When the -R1 option is specified as a command line option, then trimmed surface data in V3.2.2 Wire files will be converted to simpler surface data based on the following criteria:

    Note: The surface data of a planar trimmed surface is lost when this option is used, but the resulting FACE geometry can still be rendered.

    Each region of a trimmed surface with multiple disjoint regions will become a separate FACE.

    This option is intended to be used for models which do not require much geometry editing, but will be rendered using Alias. If any of the resulting FACEs need to be edited as surfaces, then they can be individually turned back into trimmed surfaces using Surfaces Set planar .

    Example

    This is an example of how to invoke Alias in batch mode:

    ALIAS -B -W -pdemo -oiges_to_wire_options -spro_e_file.wire pro_e.igs This is the generated output of this command after completion:

    No user_windows.view file found. Using default ALIAS_windows.view. (C) Copyright 1995, ALIAS|Wavefront. Retrieving IGES file... PTC IGES file: pro_e.igs IGES file retrieved successfully. Done retrieving. Saving WIRE file "/usr/u/aldemo/user_data/demo/wire/pro_e_file.wire"... WIRE file saved successfully.

    Command Line Options

    Usage:

    info only: Alias [-h] [-i] [-c]

    interactive: Alias [-mb] [-p<ProjDir>] [-o<OptFile>] [RetFile ...]

    batch mode: Alias -B [-W -SDL -R1 -R2] [-p...] [-o...] -s<SavFile> RetFile...

    -h display this help information, then exit

    -i show product name, version, and cut number, then exit

    -c show copyright message, then exit; also implies -i

    -m enable mouse, disable tablet; this is the default

    -b enable tablet (bitpad), disable mouse

    (when Alias is running, use the F1 key to switch between mouse and tablet)

    -p<ProjDir> start in project ProjDir (path: $ALIAS_WORKENV/user_data/ProjDir

    or ./user_data/ProjDir if ALIAS_WORKENV not set)

    if no -p flag, use project in environment variable ALIAS_PROJECT

    if env. var. not set, use last project set from List Project Set current

    if none was set from within Alias, use project \Qdemo'

    -o<OptFile> load options file OptFile (path: ProjDir/option/OptFile)

    if no -o flag, use file \Quser_options'

    if no \Quser_options' file, use the standard \QAlias_options' file

    -B batch file translation: read in RetFile, translate according to settings in options file, write out as SavFile, then exit; flags below used with -B:

    -s<SavFile> write output in SavFile; compulsory

    -W overwrite SavFile if it exists

    -SDL set format to SDL; overrides the save format in the options file

    -R1 optimize redundant pre-V5.0 trimmed surfaces by converting to surfaces

    -R2 optimize redundant pre-V5.0 trimmed surfaces by converting to face geom.

    RetFile files to retrieve at start up (wire, DXF, IGES, etc.)





    [email protected]

    Copyright © 1998, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.