DeskArtes

Rapid Tools

 

 

 

Utilities

User Manuals

 

 

DeskArtes Rapid Tools Manual

The Utility Programs

Copyright

Published by DeskArtes Oy, Spring 1998.

Third Edition, for system version 4.0.7.

© 1996-1998 DeskArtes Oy. All rights reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language in any form by any means without the written permission of DeskArtes Oy.

DeskArtes Oy reserves the right to revise this publication and to make changes from time to time without the obligation to notify any person of such revisions and changes.

Trademarks

DeskArtes, Rapid Tools and the DA symbol are trademarks of DeskArtes Oy. Other brand and product names are trademarks and registered trademarks of their respective owners.

Contact Address

DeskArtes Oy

Kalevankatu 3 A
FIN-00100 Helsinki, Finland

 

Tel. +358–9–644335
Fax +358–9–644330

E-mail: DA@deskartes.fi

URL:http//www.deskartes.fi

 

Contents

FOREWORD *

About Rapid Tools *

About The Utility Programs *

About this Manual *

Notation *

Part I: SYSTEM OVERVIEW *

Getting Started *

The Utilities Directory *

Using the Utilities under Windows NT *

A light introduction to UNIX *

General Principles *

Advanced UNIX Usage *

Installing the programs *

Manipulating Surface Models *

IGES Files *

VDAFS Files *

Manipulating STL Models *

shelling *

sos *

stl2igs *

stlcut *

stlredu *

stlrefine and stlrefine2 *

tr2slice *

tr2stl *

trbool *

troffs and troffs2 *

Manipulating contours *

Part II: COMMAND REFERENCE *

CLITOOL *

Option Reference Guide *

IGS2VDA *

Processed and unprocessed entities *

Partially supported entities *

Orphans *

Approximations *

Translating a subset of the IGES file *

The temporary database *

Special CAD Systems *

Option Reference Guide *

SHELLING *

Option Reference Guide *

Troubleshooting *

SOS *

Option Reference Guide *

STL2IGS *

Option Reference Guide *

STLCUT *

Examples *

Troubleshooting *

Option Reference Guide *

STLREDU *

Examples *

Option Reference Guide *

STLREFINE *

Examples *

Option Reference Guide *

STLREFINE2 *

Option Reference Guide *

STLSEP *

Examples *

Option Reference Guide *

TR2SLICE *

Uniform slicing *

Semi-adaptive slicing *

Adaptive slicing *

Range slicing *

Storing open slices *

Option Reference Guide *

TR2STL *

Handling multiple input files *

Troubleshooting *

Option Reference Guide *

TRBOOL *

Examples *

Option Reference Guide *

TROFFS AND TROFFS2 *

Examples *

Controlling the offset *

Option Reference Guide *

VDA2IGS *

CATIA *

GRADE *

HP/Solid Designer *

I-DEAS *

IGRIP *

PRO/Engineer *

Option Reference Guide *

VDA2TR *

Tolerances *

Multiple input files *

Automatic component separation *

Troubleshooting *

Option Reference Guide *

VDASELECT *

Option Reference Guide *

APPENDICES *

Glossary *

Faces and trimming curves *

Topological information and components *

Components vs. shells *

Holes and gaps *

Model, object, and part *

Data Exchange Formats *

The STL Standard *

The VDAFS Standards *

Regular expressions *

 

FOREWORD

 

About Rapid Tools

DeskArtes Rapid Tools provides you with all the necessary commands to triangulate, verify and correct surface models for rapid prototyping (RP), or any other application that requires excellent STL files. You may process surface models, triangulate them, cut triangulated models in parts, offset them, and slice into contours for the RP machine. You may pick individual surfaces or triangles, delete them, and add new triangles when required. Various general purpose command are available, such as transformations, viewing and shading. Results of each command are displayed to you as the commands are executed, and possible problem areas are separated as their own elements in the DeskArtes work space.

 

About The Utility Programs

When one talks about RAPID TOOLS, one talks about the entire system. RAPID TOOLS is centered around a Graphical User Interface (GUI) and the User Manual explains how to use that portion of the system. Many of the functions explained in that Manual are performed by external, batch programs which can be invoked separately, stand-alone, using UNIX commands.

These programs are collectively called the Utilities.

 

About this Manual

The first part this Manual begins a light introduction to UNIX and how the Utilities are used in that environment. It is a good idea to read through these pages if you are not familiar with UNIX.

The first part also includes an overview to general functionality and operation principles of the Utilities. While reading the text, you may try out the features with one of your own models, or use the example model which is provided with the system.

The second part gives detailed explanations to all the Utilities. The programs are listed in alphabetical order. Use it as reference whenever you wish to know more about the parameters and other information of how each program works.

 

Notation

Pay attention to the text in the margin: it contains information of importance to you as you progress.

Important words and phrases are emphasized with plain italic.

The names of menus, commands and buttons, as well as other computer terminology, are printed in This Typeface.

Part I: SYSTEM OVERVIEW

Getting Started

The Utilities Directory

The suit of programs you have at your disposal are, in alphabetical order:

clitool

Converts contour geometry from one format to another. Formats supported include CLI (EOS), SLC(3D Systems), and SSL (Stratasys).

igs2vda

Converts IGES files to VDAFS.

shelling

Computes a rough offset in a "turn-key" fashion.

sos

Slices support structures.

stl2igs

Converts STL files to IGES.

stlcut

Cuts quickly STL files.

stlredu

Reduces the number of triangles in STL models.

stlrefine

stlrefine2

Refines an STL model.

trbool

Computes Boolean operations between STL files.

troofs

troofs2

Computes an offset to a given STL file.

tr2stl

Repairs STL files.

tr2slice

Slices STL files.

vdaselect

Extracts a subset of a VDAFS file.

vda2igs

Converts VDAFS files to IGES.

vda2tr

Converts VDAFS files to STL.

To use them, you must know how to launch them in a UNIX environment. You can then proceed to the Section A light introduction to UNIX. If you are already familiar with UNIX, skip over to the section titled General principles.

If you are using Windows NT instead, the following Section is for you.

 

Using the Utilities under Windows NT

Under Windows NT, you must use the Utilities under an MS-DOS window.

The DOS command interpreter works very much like a UNIX shell interpreter except that it is far more restrictive.

Therefore, if you have never used an MS-DOS window before, most of the information in the following sections can be useful but we recommend that you also consult Microsoft's documentation too for detailed and specific information on MS-DOS commands.

 

A light introduction to UNIX

It is most likely that you are using some kind of Window System. We will assume that you are able to obtain a window with a shell prompt.

There is a chance you never used a shell interpreter. Or maybe you have but you know it by another name ("Command interpreter", perhaps?). If you have never used UNIX but MS-DOS instead, then you have certainly used one.

The shell interpreter you use when you login a UNIX system is determined by the individual who created your account. It varies from one system to another. We will assume in this Manual that you are using csh.

 

Launching a program

If DeskArtes Rapid Tools has been installed correctly, each one of the programs listed above can be launched from any window containing a UNIX shell prompt. A program is launched by simply typing the program name followed by a list of options.

Options are single letters preceded by a minus "-" sign. Please note that all UNIX shell interpreters are case sensitive. Example:

% igs2vda -f dino.igs -o dino.vda

This example has the following components:

 

%

The prompt produced by the UNIX shell command interpreter. It does not have to be typed.

igs2vda

The name of the program to be launched.

-f dino.igs

The option -f with argument dino.igs.

-o dino.vda

Another option, this time -o, with argument dino.vda.

_

White spaces that separate the different options.

White spaces, or the lack of them, are important. For instance,

% igs2vda -f dino.igs-o dino.vda

would mean something quite different because then the argument to the option -f would be dino.igs-o, which is a legal file name. On the other hand, -f cannot be written as -_f. A white space between the hyphen and the option letter will confuse the command interpreter.

The order of options in a command line seldom has any relevance for the Utilities. Usually, if an option is given a second time, it overrides any value previously given. For instance, if the -f option is specified twice, the second one will prevail.

 

File names and extensions

In UNIX, a path to a file has two components: the directory and the file name. The directory is everything before the last slash "/" and the file name is everything after the same slash. For example, in /usr/people/da/dino.igs, the file named dino.igs is located in the directory /usr/people/da.

A file name has an extension if a dot is present. In the previous example, .igs is the file name’s extension.

If no directory is given, files are searched or created in the current working directory. The command pwd will list it.

Certain symbols are related to certain directories and are recognized by all shell interpreters:

• The dot "." refers to the current working directory.

• The double dots ".." refer to the parent directory where the current one resides. In the example above, people is the parent directory of da.

• The tilde "~" refers to the home directory of a registered user and it is defined by the person who created the account.

 

General Principles

The batch programs follow general principles that are now summarized.

All the programs act on input file(s) that describe the geometry of a CAD model in some neutral file format and generate one or more output files containing geometry and a textual log file explaining how the processing was performed.

The option -f always specifies the input file name and the option -o the output file name. Either can be omitted, and in that case, they are assigned to stdin and stdout, respectively. All UNIX shell interpreters know about these default files and "special effects" can be obtained using them. For example,

% zcat dino.igs.Z | igs2vda -o dino.vda

converts a compressed IGES file to VDAFS. The vertical bar "|" tells the shell interpreter to connect the output of one program to the input of the other one. In UNIX jargon, the output of zcat is "piped" into igs2vda. The output file of zcat is stdout and the input file of igs2vda is stdin. One interesting aspect of this example is that the intermediary uncompressed file never exists on disk!

Never name the output file with the same name as the input file. If you do, you will loose the contents of the input file.

The log file is always written onto stderr. None of the programs have an option to direct the messages to a named file. But, again, stderr is another file known to all shell interpreters, and it is possible to instruct them to redirect the messages to a named file. For example,

% igs2vda -f dino.igs -o dino.vda >& dino.log

places all the messages into the file dino.log.

 

Default Extensions

Certain extensions are associated, by default, to files if none is given. For instance, if a program expects the option -f to refer to an STL file and no extension is given, the program will first search for the named file with extension .stl and only if that file is not found will it search for the file named exactly as given in the command line.

Here is a specific example. The command

% tr2stl -f dino -o dino_o

will cause tr2stl to search for the file dino.stl in the current working directory. Only if it is not found will it try the file named dino with no extension. Default file extensions apply to output files too. The name of the output file will be dino_o.stl.

The following Table shows which extensions are associated to certain file types:

 

CFL

.cfl

CLI

.cli

CLI (hatches only)

_s.cli

IGES

.igs

SLC (3D Systems)

.slc

SLI (EOS GmbH)

.sli

SSL (Stratasys)

.ssl

ASCII STL

.astl

binary STL

.stl

Support structures

_s.stl

VDAFS

.vda

 

Progress windows and the CANCEL button

Most Utilities will pop-up a window displaying a one or two line message, a percentage bar, and a CANCEL button.

The percentage bar indicates the amount of work already done but it should not be regarded as an exact value.

Once the CANCEL button is pressed, the program will abort as soon as it detects the event without asking for a confirmation.

 

On-line help

RAPID TOOLS Utilities have two kinds of on-line help.

• A brief description of the available options can be obtained using either the option -H or -V0.

man pages are located under System/bin/bin.*/man in the home directory of DESKARTES RAPID TOOLS.

 

Advanced UNIX Usage

It is possible to redirect stdout and stderr separately using the following syntax:

% (igs2vda -f test ... >test.vda) >&test.log

Using sh or ksh, the same effect can be obtained with:

% igs2vda -f test ... >test.vda 2>test.log

It may the case that a user employs the same options each time. Using the alias facility available in most UNIX command interpreters can make life more comfortable because it enables the user to define shortcuts. Instead of typing, say,

% igs2vda -C ...

which may be boring and error-prone, the user can type instead:

% alias i2v 'igs2vda -C'

% i2v ...

With a little more work, one can also avoid using the options -f and -o options:

% alias i2v 'igs2vda -C -f \!:1 -o \!:1'

Thus defined, i2v file is equivalent to

% igs2vda -C -f file -o file

Another application for an alias is to define one's own default extensions. For instance, if the default extension for IGES files is .if and for VDAFS files it is .dat, then the following alias is useful:

% alias i2v 'igs2vda -f \!:1.if -o \!:1.dat'

For an alias to be valid across login sessions it must be included in the .cshrc file located in the user's home directory. Consult the man pages for more information on how to define aliases under a given command interpreter.

 

Running on the background

Placing the symbol "&" at the end of a command causes it to be executed in the background. You can then continue to type other commands. In this fashion you can perform several tasks concurrently. For example;

% tr2stl -f file1.stl ... >&file1.log&

% tr2stl -f file2.stl ... >&file2.log&

executes two jobs in the background. Once they are completed, you can inspect the log files.

 

Compressing/uncompressing files in a directory tree

Compressing can save a significant amount of disk space. We will show how to compress all the IGES (or VDAFS) files in a directory tree. Uncompressing the files is done analogously. Simply substitute compress by uncompress.

Assuming they all have a consistent naming, e.g. they all have the extension .igs, the following command may be used:

% find . -type f -name "*.igs" -print -exec /bin/compress '{}' ';'

Starting at the current directory (indicated by the dot, "."), the find utility will search for all the (data) files that match *.igs which are not directories (directories are excluded by the "-type f" option). When one is found, the command /bin/compress will be executed with the file name as argument. When the search in one directory is completed, it will resume the search in the sub-directories.

The files being processed are printed (-print option). Consult the appropriate man page entry for more information.

 

Installing the programs

Here we give general remarks on how to install the Utilities. The instructions on how to extract the program from the media should accompany the media itself on a separate sheet of paper.

Normally, the batch tools should be installed in a public directory such as /usr/local/bin. The installation procedure of RAPID TOOLS puts them in System/bin/bin.* in the home directory of RAPID TOOLS. Execute permissions must be granted to users using the chmod command, e.g. chmod a+x. Remember to check the permissions of the entire path.

Please disable all read and write permissions using chmod a-rw in order to discourage unauthorised copying of the program. The command ls -l can be used to check file permissions.

Regardless of the home directory for the batch tools, it is convenient that the path be in the user's PATH environment variable.

 

The license and environment variables

The environment is a concept related to the shell, or command interpreter, one uses. For instance, under csh, the command printenv (or env) prints the environment variables. The commands used to create or delete a variable are shell-dependent.

All the programs can use at least one environment variable, RAPIDS_LICENSE, to locate the license. To list it use

% echo $RAPIDS_LICENSE

or

% printenv | grep RAPIDS_LICENSE

The license should be installed in a directory to which users have read permission along the entire path. To check file permissions for a directory use the command ls -ld. Remember to disable write permissions in order to minimize the chances of losing the license either accidentally or maliciously. Keep a backup in safe place and away from the kids!

The latest versions of the Utilities no longer need this environment variable. If it is not defined, then DA_SYSTEM is used to locate the license file dalic.xxx, where "xxx" is the unique identification for the computer. That environment variable is always defined if the installation procedure is carried out successfully.

 

 

Manipulating Surface Models

 

IGES Files

IGES files can be converted to VDAFS using igs2vda. Only the geometrical information about the model is converted. The VDAFS file can then be processed by tools that manipulate that file format, and converted to STL, or even back to IGES:

Generate STL files

This is accomplished using the resulting VDAFS file with vda2tr, a program that is capable of generating an STL file from a given set of VDAFS files.

Data transfer

This utility can also be used by CAD users that cannot process IGES files, but are capable of processing VDAFS files. It can also be used to generate a VDAFS file without having to re-load the IGES file into a CAD system.

Some CAD systems have difficulties handling all entity types that may exist in an IGES file. If the IGES file is first converted to VDAFS, and converted back to IGES using DESKARTES RAPID TOOLS, the final result is easier to handle.

A typical usage of igs2vda is:

% igs2vda -f test -o test

 

 

VDAFS Files

The batch tools provide the following functions for VDAFS files:

 

If you wish to...

Use...

Analyze their suitability for manufacturing via Rapid Prototyping processes.

vda2tr

Generate faceted models in the form of STL or CFL files.

vda2tr

Convert them to IGES taking into account special requirements of certain CAD systems.

vda2igs

Take a subset of the file and create a new, valid VDAFS file.

vdaselect

vda2tr

What vda2tr can do for you. The purpose of vda2tr is to transform a model represented in VDAFS form so that the result can be used as input to manufacturing processes such Stereolithography, CNC machining, CAE applications, and visualization. The input model is approximated by a set of facets such that the distance between the them and the original model is bounded by a user-supplied tolerance. In addition, vda2tr can eliminate gaps, and help the user find errors in the input model.

What vda2tr cannot do for you. VDAFS files may exhibit errors that are impossible to correct automatically. In these cases, the model must be inspected and manipulated using the Graphical User Interface of DESKARTES RAPID TOOLS. For example, freeform surfaces may be missing, or surfaces may intersect each other in complex ways. However, vda2tr can still be of use to detect and understand the mistakes.

 

Using vda2tr to verify a model

% vda2tr -f test -w test -Nw -Nt -R.05 -A.5

The -w option creates a file named test-wf.vda containing only a graphical description of the gaps, if they exist. The values 0.05 and 0.5 are tolerances expressed in millimeters.

The first tolerance is called the refinement tolerance and it is used to create polygonal description of the boundaries of the model.

The second tolerance is called the gap tolerance and it specifies the maximum gap size to expect in the model. Only gaps larger than the specified tolerance will be reported.

 

Using vda2tr to triangulate a model

% vda2tr -f test -o test -R.05 -A.5 -T.05

To triangulate the model, an additional tolerance must be given using the option -T. The triangulation tolerance specifies the maximum Euclidean distance between the facets and the original model. Again, the tolerance value is assumed to be in millimeters.

Before a slice processor can use the output it must be modified further, e.g. by tr2stl. The output it is not a strictly correct binary STL file because the normals are not consistently oriented. Other file formats such as ASCII STL and CFL files can also be generated.

 

vda2igs

This program serves two purposes. It converts VDAFS files to IGES but at the same time it can tailor the IGES file to the particular requirements of some major CAD systems.

It was made specifically to operate on VDAFS files generated by the User Interface and, for this reason, it cannot process all entity types that may be present in an arbitrary file. In spite of some of its limitations, it can do some nice tricks with VDAFS files generated by any CAD system.

The IGES standard is fairly complex in that it allows for a wide range of geometrical and non-geometrical entity types, with the end result that different CAD systems have limitations on the kind of IGES files that they can process. There are two kinds of limitations:

• The CAD system may not support certain entity types at all.

• The CAD system may not support certain entities very well. For instance, the entity may be loaded into the receiving CAD system, but there may be limitations on what the user can do with it.

vda2igs attempts to address both of these limitations.

 

vdaselect

This is a very simple program. Its sole purpose is to take a subset of a VDAFS file, and place this subset into another VDAFS file without altering in any way the geometry. The extraction process is text-based, meaning that even rounding errors that could occur by converting floating-point numbers from ASCII to binary does not happen.

The only information it needs is the name of the input and output files, and the names of the elements to extract. The names of the elements are given in the form of regular expressions.

 

 

Manipulating STL Models

The biggest strength of the Utilities is the extensive number of functions that are available for STL models:

 

If you wish to...

Use...

Orient the normals in the input file.

tr2stl

Output triangulated models in various different formats.

tr2stl

Reporting and/or correcting gaps, intersections and overlaps.

tr2stl

Find and separate the input file into different components.

tr2stl

Translate the models to position them in the workspace of the machine, or scale them.

tr2stl

Smoothen areas parallel to the xy-plane.

tr2stl

Refine the model to smaller triangles.

stlrefine

stlrefine2

Reduce the number of triangles.

stlredu

Slice or cut the model.

tr2slice

sos

stlcut

Evaluate Boolean operations.

trbool

Compute an offset.

troffs

troffs2

shelling

Make a hollow part by creating an offset towards the inside.

troffs

troffs2

shelling

Convert the model to IGES.

stl2igs

 

shelling

Shelling is another term commonly used to refer to offsetting. The shelling utility is different from troffs and troffs2 (see bellow) in the following way:

• It can be used even with poor quality STL files

• The result is not smooth

• It cannot be used to create a solid from an open model

 

sos

Sos stands for Slicer Of Supports. Unlike tr2slice which is a general slicer, sos has been optimized for slicing support structures.

 

stl2igs

The purpose of stl2igs is to convert an STL file to IGES. It maps each triangle to one of two IGES entities, namely Bounded Surfaces or Ruled Surfaces. The default entity is Ruled Surfaces because they are more widely supported and the resulting file is smaller.

 

stlcut

The purpose of stlcut is to cut quickly a triangulated model into separate pieces. It is the best game in town to cut too large models into smaller, acceptable pieces. Cutting may be needed for at least two reasons:

• The model may be too big for a given machine to manufacture.

• The height must be reduced so that the model can be built more quickly.

It differs from trbool since it uses infinite planes. In addition, the planes must be perpendicular to one of the main axis. On the other hand, trbool allows models to be cut arbitrarily, there are no limitations on the shape of the parting surface.

 

stlredu

Sometimes an STL model just has too many triangles. Very large models can cause the following problems:

• It is difficult or not possible to load the model in the system provided by your RP vendor.

• The simulation package you use accepts STL models but the number of triangles will make the simulation too slow.

• You may have used stlrefine/stlrefine2 to change the shape of the triangulation and now the number of triangles must be reduced.

 

stlrefine and stlrefine2

The purpose of both programs is to make the size of the triangles more or less the same across the entire model and, together with stlredu, eliminate thin triangles. They can also be used to improve the accuracy of offsets created by troffs or troffs2.

stlrefine splits the STL model using a grid, whereas stlrefine2 uses an alternative, optimal approach which is much faster.

 

tr2slice

This program creates contours from an STL model. The most simple function it provides is slice the model uniformly such that the layer thickness is the same across the entire height of the model. There are various other slicing modes which may, or may not, be useful depending on the RP process that you use.

 

tr2stl

The major purpose of tr2stl is to analyse and repair STL models. It can also convert an STL file to different formats, translate, scale, separate or combine models, but these functions are better covered in the Command Reference portion of this Manual.

When using tr2stl to analyse and repair a model, you will need to consider the following:

How carefully should the verification be done?

Normally, only "cheap" checks are done, such as finding gaps and duplicates, and, by default, the normals are always oriented. Checking for intersections is very expensive in terms of time and, if the model is large, it should be done only if necessary.

How should the gap elimination be done?

Gaps are eliminated by adding triangles. The triangles are created by connecting non-adjacent points along the curve surrounding the gap. You can control this process by supplying a tolerance that either limits the length of the longest edge or the height of the triangle. You must also be careful if the model is open because in that case certain gaps are intentional.

 

trbool

The purpose of trbool is to intersect triangulated models with each other. This enables the creation of new triangle topologies, like cutting models with free form triangulated surfaces, making holes and adding pins to existing models.

There are two ways it can be used:

• The triangles that are selected to be written into the output file is based on the orientation of the normals.

• The two models are intersected and split "four-ways" and the user composes the final result.

 

troffs and troffs2

troffs is an older version of the offsetter which generates smooth offsets. It should no longer be used and has been replaced by troffs2.

troffs2 can be used to give a thickness to a model, an operation that is also called offsetting. It is absolutely essential that the normals of the STL model be oriented before an offset is computed. Offsetting can be used for the following applications:

• Converting a solid model into a hollow one.

• Compensate the geometry for downstream applications such as coating or shrinkage.

• Converting a non-solid, open surface into a solid model.

If the model is already a solid, the normals will be indicating the outside of the model. If the offset is computed towards the inside and the result is combined with the original model, the model becomes hollow.

An offset computed towards the same direction of the normals can be useful to compensate for some downstream application such shrinkage or thin coatings.

It may be necessary to change the shape of the triangulation before an offset if computed. Very large triangles close to small ones can cause problems. It is possible to overcome these difficulties by changing the shape of the triangulation using stlrefine and stlredu.

Converting a non-solid to a solid model should be done using the User Interface because usually it is not possible to know in advance the direction of the normals.

 

 

Manipulating contours

Contour manipulation is currently carried out by a simple program called clitool. In spite of its name, it is capable of dealing with contours represented in three file formats, CLI, SLC (3D Systems), and SSL (Stratasys). The functionality it provides is the following:

• Convert to and from CLI, SLC, and SSL.

• Move the contours to positive space

• Reverse the orientation of the contours

The user interface is equipped with tools to eliminate gaps, edit or create contours, and it supports other file formats as well (IGES, HPGL, DXF, VDAFS).

Part II: COMMAND REFERENCE

This Part of the Manual provides you with detailed information about each program. The programs are listed in alphabetical order.

 

CLITOOL

 

Option Reference Guide

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -F: specifying the input format

At this time, CLI, SLC and SSL are supported. The argument to the option -F is a single letter identifying the input file format:

 

C

CLI (EOS)

F

SSL (Stratasys)

S

SLC (3D Systems)

Defaults. By default, the input file is assumed to be CLI unless the file extensions specifies otherwise.

 

Option -o: specifying the output file

Specifies the location of the output file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -O: specifying the output format

At this time, CLI, SLC and SSL are supported. The argument to the option -O is a single letter identifying the output file format:

 

A

ASCII CLI

a

aligned binary CLI

b

binary CLI

s

short binary CLI

F

SSL (Stratasys)

S

SLC (3D Systems)

The argument "b" specifies non-aligned, long binary CLI. A specific binary CLI flavor can be obtained using the arguments "a" and "s". For instance, -Obs, or simply -Os, specifies the short variant of the binary CLI format.

Defaults. By default, the output file is assumed to be binary CLI (not aligned, long) unless the file extension specifies otherwise.

 

Option -P: move positive

If the model contains negative co-ordinates, the model is moved such that the smallest co-ordinate is moved to the origin.

 

Option -R: enable/disable contour reversal

By default, whenever a file is converted from CLI to SLC, or vice-versa, the direction of the contours is reversed. On the other hand, converting a file from CLI to CLI, contours are not reversed, by default.

This option can alter the default behavior. If the argument is "1", the direction of the contours is reversed overriding any defaults. Alternatively, if the argument is "0", contour directions remain intact after file conversion regardless of any defaults.

 

IGS2VDA

 

Processed and unprocessed entities

Given the application we have in mind, it suffices to translate and/or convert only the geometrical entities in the given IGES file, and ignore almost completely the non-geometrical ones.

Most of the non-geometrical entities are immediately discarded when the Directory Section is read, and they are listed in stderr under the title summary of entities rejected.

IGES allows for a wide variety of geometrical entities, and most of them can be handled by igs2vda. The following table lists the entity types that are supported together with an indication whether any restrictions apply.

Circular Arc

100

no

Composite Curve

102

no

Conic Arc

104

no

Copious Data

106

no

Bounded Planes

108

no

Unbounded Planes

108/0

yes

Line

110

no

Parametric Spline Curve

112

no

Parametric Spline Surface

114

no

Point

116

no

Ruled Surface

118

no

Surface of Revolution

120

no

Tabulated Cylinder

122

no

Rational B-Spline Curve

126

no

Rational B-Spline Surface

128

no

Offset Surface

140

no

Boundary

141

no

Curve on a Parametric Surface

142

no

Bounded Surface

143

no

Trimmed (Parametric) Surface

144

no

Manifold Solid B-Rep Object

186

no

Subfigure Definition

308

no

Network Subfigure Definition

320

no

Associativity Instance

402

yes

Singular Subfigure Instance

408

no

Network Subfigure Instance

420

no

Vertex

502

no

Edge

504

no

Loop

508

no

Face

510

no

Shell

514

no

The following table lists the geometrical entities that are not supported:

 

Offset Curve

130

CSG Primitives

150-180

Plane Surface

190

Right Circular Cylindrical Surface

192

Right Circular Conical Surface

194

Sherical Surface

196

Toroidal Surface

198

An entity may be unprocessed for several reasons:

• The file may be incomplete (truncated). It does happen sometimes that a truncated file is delivered and the parameters associated to many, perhaps all entities are missing.

• The entity may be flagged as subordinate or child of another entity which is not in the file. These entities are refereed to in this document as orphans. The sender may have forgotten to include the parent entity. Sometimes the entity is intentionally placed in the file and it should not be processed by the receiver.

• The entity may have errors that have never been encountered before and your release of igs2vda cannot handle it.

• The entity is not supported by your release of igs2vda.

 

Partially supported entities

 

Unbounded Plane Entity

Planes come in two flavors: bounded and unbounded. It is not possible to convert unbounded planes to VDAFS, unless they are trimmed. This is an extension, because the IGES standard does not allow the use of unbounded planes to construct the geometry of surface models. Ignoring unbounded planes that are not trimmed does not result in loss of modeling information.

 

Associativity Instance

Associativity Instance entities are used to group related entities according to some user-defined criteria. They do not affect the geometry of the model represented in the input file.

 

Orphans

An orphan is an entity flagged as subordinate to another entity that either was not found in the file or was not processed for some reason. By default, orphan entities are not processed. You must explicitly request that they be processed using the option -Od.

 

Approximations

In general, there are several situations when approximations take place:

• Some IGES entities have no equivalent, exact representation in VDAFS form. Consequently, they must be approximated. Typical examples are rational polynomial functions, i.e. functions of the form P/Q, where both P and Q are polynomials. Such functions are represented in IGES as non-uniform rational B-Spline (NURBS) functions (curves and surfaces). Other examples are surfaces of revolution, and circular arcs used to construct composite or parameterized curves.

Offset surfaces are represented in IGES implicitly. In order to compute their explicit representation, they must be approximated. An approximation would be required even if their explicit representation were needed in IGES form instead of VDAFS.

When describing trimmed surfaces or faces, it is necessary to obtain the parametric representation of the trimming curves in order to generate the equivalent VDAFS file. Some CAD systems do not include this information, and, therefore, they must be derived from the given 3D representation of the trimming curves.

Command line options are available to control how and to which accuracy the approximations are done. The most important one is the option -t.

 

Approximating trimming curves

When the file contains trimmed surfaces or faces without the corresponding 2D parametric trimming curves, then the later must be re-computed.

The information concerning the parametric representation of the 3D trimming curve is lacking either because the sender is using a CAD system that is not capable of placing it in the file or the user has not used properly the options available in the CAD system.

The quality of the approximation is affected by the tolerance given in the option -t. It is impossible to guarantee that the distance between the approximation and the given trimming curve be bounded by the required tolerance because the original trimming curve may be any distance away from the surface. Consequently, the approximation may be far from the original 3D curve.

A summary containing information about the quality of the approximation is given after the file has been processed.

Some CAD systems, notably CATIA, can generate IGES files with incorrect trimming curves. Fortunately, the 3D representation of the trimming curve is correct, but the 2D representation is not. The current implementation of igs2vda can generate correct 2D representations but the user must include the option -O with argument i or a.

 

Translating a subset of the IGES file

In some situations, it be desirable to translate only a subset of the IGES file. Several options are available for this purpose giving the user the possibility to selected or excluded entities.

• Entities may be selected or excluded by number.

• Entities may be selected or excluded by label.

• Entities may be selected or excluded by type and form number.

Here are a few examples:

igs2vda -f test -o test -T 112 -T 114

Selects and converts all (cubic) spline curves and surfaces in the input file, i.e. all entities of type 112 and 114. All other entities are ignored, except those needed to convert the selected ones.

igs2vda -f test -o test -Z curves

Convert everything except curves. A curve will only be converted if it is needed in the conversion of an entity which as been selected, e.g. a trimmed surface.

igs2vda -f test -o test -s 3

Selects and converts only the entity number 3 if it is not dependent on another entity. All other entities are ignored, except those needed to convert entity number 3.

 

The temporary database

The entities that have been accepted from the IGES file are placed in a temporary database. By default, this database is kept resident in main memory to improve performance. If for some reason this is not possible, the user can request instead that it be kept in a file on disk. In that case, the file is located in the user's current working directory. The name of the file where it is placed is randomly generated, but it always begins with the prefix .IGSD. Its size is always smaller than the original, uncompressed IGES file.

This file is automatically deleted, but if the user aborts the program, or if the program crashes, then this file will remain, and disk storage will be wasted.

Using the vanilla settings of the UNIX command ls will not list this file because the name begins with a dot; the user must use instead the command ls with option -a.

 

Special CAD Systems

This translator has been tailored to behave in special ways when the data file indicates it has been created by the following CAD systems:

These CAD systems are detected by using information contained in the header of the IGES file. If the file is first loaded into another CAD system and re-written, this information is lost and igs2vda may no longer behave as expected.

 

 

Option Reference Guide

The various options available with igs2vda can be separated into 6 groups:

• Options to specify the input and output files: -f and -o.

• Options to filter the entities that are to be converted, while ignoring (almost) completely the remaining ones: -s, -x, -F, -N, -T, -X, and -Z.

• Options that affect how certain entities are converted: -d, -r, -t, -C, and -O.

• Option that affects unit conversion: -S.

• Options that affect how computer resources are consumed: -K and -M.

• Miscellaneous options: -H, -L, and -V.

 

Option -C: converting Copious Data

This option affects how the Copious Data entity types are translated to VDAFS format. All forms are affected, except form number 13, which is always represented using the MDI entity type in the VDAFS file.

Most forms of this entity type are used to represent 3D piece wise linear curves. In VDAFS, there is an entity type called PSET which can be used for this purpose. However, some CAD systems like STRIM interpret PSET's as point sets, not as a piece wise linear curves. In this case, it is necessary to use this option so that the geometry is represented in the VDAFS file using CURVE's instead.

Although CURVE's are the lowest common denominator they require, in this case, significantly more storage.

Defaults. The default action is to use PSET elements.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -H: getting (compact) on-line help

Outputs a short help message, and then causes igs2vda to exit.

 

Option -K: enable database caching

If the file is very large and a temporary database is being used on disk, using this option will result in some improvements in performance. Certain entities are kept in main memory for a while avoiding continuous fetches from the database.

Related options. Option -M.

 

Option -L: specifying the location of the license

The argument is a path indicating the location of the license. It overrides the environment variable RAPIDS_LICENSE.

If the installation procedures are followed, it is not necessary to use this option.

 

Option -M: putting the database on disk

The temporary database is not used if the option -M is specified with a positive argument. Instead, all data is kept in main memory. Although the amount of CPU time used will not decrease significantly, the elapsed, wall-clock time will probably be much less.

To place it on disk, you must use a value equal to zero, i.e. -M0. This is needed when the file is too large to keep in memory. If this is the case, you may want to have a long break while waiting for the results.

Defaults. By default, the temporary database is kept in memory.

 

Option -o: specifying the output file

Specifies the location of the output file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -O: changing the behavior of igs2vda

This option modifies the behavior of igs2vda concerning the following:

• Computation of the trimming curves

• Conversion of dependent entities

The argument is a sequence of lowercase or uppercase letters, and each letter is associated to one of the items listed above. The uppercase letters are associated to the default behavior whereas the lowercase letters specify the alternative behavior in each case. The following Table lists the possible arguments:

 

A

Disables -Oi if it was active.

a

Re-compute the 2D representation of trimming curves the entities which are potentially incorrect. The remaining ones are taken as-is. This is usually better than using -Oi.

D

Dependent entities are not converted if the parent is not converted too.

d

If the entity has been selected, convert it even if it is dependent on a parent which is not in the file.

I

The default is to compute the 2D representation of the trimming curves only when it is missing in the input file.

i

Re-compute all the 2D representation of trimming curves all the selected entities.

N

Disables the NOTE message.

n

Enables the NOTE message indicating the program has terminated.

The options -Oi and -Oa exists in order to correct mistakes introduced by the sending system, notably CATIA and some releases of UNIGRAPHICS.

Defaults. By default, only missing information is computed and dependent entities are not converted if the parent is not converted too. The option -OACDIN represents the default.

 

Option -r: degree reduction

Enables degree reduction, affecting the behavior of the program concerning integral function. If an integral function of degree greater than 3 is found, it is approximated by a cubic function.

The argument can to restrict the degree reduction to certain geometries. If it is the letter "c", then only the curves are degree reduced, and if it is the letter "s", then only the surfaces are degree reduced.

Defaults. The default action is not to perform degree reduction. Only true rational functions are approximated to cubic, integral ones. If no argument is supplied, all functions–curves and surfaces–will be degree reduced, if necessary.

Recommendation. A general and very important guideline is to avoid unnecessary conversions. This translates into using carefully the option -r. If the system that will use the resulting VDAFS file can processes arbitrary degree parametric curves and surfaces, then the option -r should not be used.

 

Options -s, -x, -N, -F, -T, -X, and -Z

These comprise the selection mechanism which is explained in the section titled The selection mechanism.

 

Option -S: scaling the model

The VDA-FS standard states that models represented in this format must be expressed in millimeters. The IGES standard, on the other hand, allows for various units. Consequently, the default action is to scale the model, if necessary.

The option -S lets the user change this behaviour. The argument is a flag which must equal 0 or 1. An argument equal to 0 disables scaling the model into millimetres. If equal to 1–the default–the model is scaled, if necessary.

Defaults. The default value is 1 meaning that the model is scaled.

Related options. The units used to express the argument to the option -t depend on whether scaling is enabled or disabled.

 

Option -t: specifying the approximation tolerance

It must be used to specify the tolerance used in approximations. The tolerance places an upper bound in the maximum Euclidean distance between the original function and the approximated one. The argument must be a real number, and the units in which it is expressed depends on whether unit conversion takes place or not (see below under Related options).

The tolerance is used when approximating NURBS, Offset Surface entities, and conic arcs, including circular ones. It is also used when approximating trimming curves.

The usual problem faced by the user is deciding whether the default value is sufficient for the application at hand, and, if not, which value to use. Guidelines for specific applications are given here.

• For visualization purposes, the default value is an overkill. The user can probably use 0.1 instead.

• For modeling purposes, it very much depends on the kind of modeling that will be done; the default could be adequate, but an even smaller value should be considered.

• For manufacturing purposes, it very much depends on the accuracy of the process and if the resulting VDAFS file will undergo further processing. For instance, if the VDAFS file will be triangulated and converted to STL form, and the desired tolerance is t, then the tolerance used here must be t/2, and the tolerance used for the STL conversion t/2 as well.

Defaults. The default value is 0.005 units.

Related options. The option -S controls whether scaling or unit conversion takes place or not. If units are converted to millimeters, then the tolerance is expressed in millimeters and it is applied after the model is scaled. If no unit conversion is required, the tolerance is expressed in the same units as the input file.

 

Option -V: controlling the verbosity

This option controls the verbosity level of igs2vda, i.e. the type of information messages that are issued to the user. The argument is an integer where the lower its value, the more messages are given.

Each information messages is associated to a verbosity level. If the verbosity level is, say, 3, then all the messages associated to the levels 3 through 6 are also printed.

Values in the range 1--6 have an interpretation; a value greater than 6 renders the program silent regarding information messages. The following Table summarises the association between verbosity levels and information messages.

1

Details including each entity as it is converted

2

The program's id, including version number

3

Information contained in the Global Section

4

Timings for each phase

5

Default values and actions

6

The summary lists

Defaults. The default value is 3.

Recommendations. Verbosity level 1 outputs a line for each entity that is about to be converted. Consequently, it slows down the program, and should be used only if necessary.

 

The selection mechanism

It would seem natural to select or exclude entities by name, or label. However, most often, entities will be selected or excluded using their number, or, more rarely, their type. This is because the field in Directory Section reserved for entity labels seldom serves its purpose, i.e. provide a unique name to an entity. Most often, this field contains an abbreviation of the entity's type in textual form, say BSURF when the entity is of type B-Spline Surface.

 

Selecting by number

For each entity in the IGES file, there are two lines in the Directory Entry Section. The number associated to the first line is called the entity pointer, and provides an unique identification that may be used with the option -s and option -x.

The argument to these options is, then, this unique identification number which must be, evidently, an odd number, and cannot be a regular expression.

The option -s indicates which elements should be taken from the input file, whereas the option -x indicates which ones should be excluded. The option -x takes precedence over -s, meaning that if both refer to the same entity, it will be excluded.

There is one exception concerning excluded entities: if the entity is needed to construct another selected entity, the excluded entity is processed in the context of the selected one. For instance, an excluded curve can be used to build a selected, Composite Curve entity.

As many options as needed may be used in the command line.

 

Selecting by type and form number

The purpose of this selection mechanism is to provide a means to extract only certain geometries from the input file. For instance, the user might be interested only in 3D curves, or 3D surfaces. Selecting a subset of entity types is done using the option -T whereas exclusion is done using the option -Z.

It would be a nuisance if the user where required to list all the entity types needed to cover all 3D curves using several, say, -T options. Instead of typing, say:

% igs2vda -T 100 -T 102 -T 104 -T 106 -T 110 -T 112 -T 126

it is possible to type:

% igs2vda -T "100|102|104|106|110|112|126"

The command may be even shorter:

% igs2vda -T "10[0|2|4|6]|110|112|126"

And even shorter still:

% igs2vda -T curves

The string curves–or, simply the letter c–is an alias for the regular expression 100|102|104|106|110|112|126. The following Table lists the possible aliases and their corresponding regular expressions.

 

curves

100|102|104|106|110|112|126

nurbs

126|128

surfaces

108|114|118|120|122|128|140|143|144

Observe that the alias for surfaces includes Trimmed Parametric Surfaces (type 144), and it is not necessary to include the Curve on a Parametric Surface entity types (type 142) because they will be taken from the input file if needed.

It is not possible to use an alias within a regular expression, e.g. curves|144. Instead, use separate -T options. If the alias is mistyped, no error message is given. Because characters like "[ ]|" have special meaning to most command interpreters, it is best and usually necessary to enclose all regular expression by quotes, single or double.

 

The selection mechanism and Subfigure Definitions

Subfigure Definition entities implement the concept of a collection of entities that can be used in several (hopefully) different places.

If a Subfigure Definition is selected, all the entities it references are also selected and converted. The reason is that if an entity is converted, all its children must also be converted.

SHELLING

Creates a shell around the part at a distance which varies depending on a user supplied tolerance. Given a distance D and a tolerance T, the shell is roughly in the range of D and D+TÖ 2.

The input file does not need to be a perfect STL file but it cannot contain problem areas such as gaps which are larger than the tolerance T.

The output file does not include the triangles from the input file. To create a hollow part, for instance, you must combine both.

 

Option Reference Guide

 

Option -d: specifying the offset distance

The argument is a real number specifying the minimum offset distance.

Related options. This option and the option –g determine the maximum offset distance.

Recommendations. If the purpose is to create a hollow part, the following recommendations apply:

• For DTM users utilizing the TrueForm process, a shell thickness of 0.75 to 1mm using the default tolerance is recommended.

• For Stereolithography users, a shell thickness of 3 to 5mm using the default tolerance should be sufficient for most applications.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. None, except for the default file extension. This program cannot read files from stdin. Therefore, this option is required.

 

Option -g: specifying the tolerance

Specifies how much the offset can deviate from the minimum distance.

Defaults. Half of the minimum distance.

 

Option -o: specifying the output file

Specifies the location of the output file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Troubleshooting

If you run into memory problems and you need a hollow part, simply split the model in pieces, shell each piece separately, and then combine the original STL model with the various results of the shelling.

On the other hand, if you are generating an offset towards the outside to add stock to the part, splitting the model helps but then you must use union operations to combine the various results. You can also try using a larger tolerance or try using troffs2 instead.

SOS

Slices support structures. The input file is assumed to be expressed in millimeters, and the resulting CLI file will be created accordingly. As a result, the slice thickness must be specified in millimeters.

Slicing begins at z-level zero and proceeds in increments of the slice thickness.

 

Option Reference Guide

 

Option -c: specifying the slice thickness

The argument is a real number specifying the distance between consecutive slices taken at values equal to z=constant. It is assumed all units are millimeters.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. None, except for the default file extension. This program cannot read files from stdin. Therefore, this option is required.

 

Option -o: specifying the output file

Specifies the location of the output file.

Defaults. The defaults explained in Default extensions apply to this option.

 

STL2IGS

Converts an STL file to IGES. You can choose between two entities that are used to represent each triangle, Bounded Surfaces or Ruled Surfaces, using the option -e.

 

Option Reference Guide

 

Option -e: selecting the target entity type

The argument is a single lowercase letter, "b" or "r" that selects between Bounded Surfaces or Ruled Surfaces, respectively.

Defaults. The default entity type is Ruled Surfaces.

Recommendations. Ruled Surfaces results in smaller files.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -o: specifying the output file

Specifies the location of the output file.

Defaults. The defaults explained in Default extensions apply to this option.

 

STLCUT

 

Examples

Assuming the input file is a solid, the following command

% stlcut -f ifile -o ofile -x 20.0 -x 40.0

cuts the input model into three parts with parting planes with x-values equal to 20.0mm and 40.0mm. The planes are perpendicular to the x-axis. The resulting output files will be closed but the triangle normals are not oriented, and they must be post processed with tr2stl before manufacturing.

Open, non-solid models can also be cut with the default settings if the cutting planes do not pass the gaps. If they do, attempting to close the model after the cutting operation will fail. In this case, the option -S must be used so stlcut leaves the resulting models open.

 

Troubleshooting

An incorrect model cannot be arbitrarily cut with stlcut. If the model has gaps, for instance, they should be eliminated using the User Interface or tr2stl. If the input model has gap(s), a message is displayed:

% stlcut(WARNING): gaps(s) in the original triangle mesh.

If the location of the gaps is known, the slice planes can be placed so that they will not intersect any gaps. The location of gaps can be obtained, for example, using tr2stl.

Due to rounding errors, it is possible that stlcut produces unintentionally a triangle mesh which has gaps. In this case, a warning message is given:

% stlcut(WARNING): gaps(s) in the resulting triangle mesh

The user must then try to fill the gaps with tr2stl or to move slightly the slice planes.

 

Option Reference Guide

 

Option -b: "cookie" operations

The cookie operation is meant to separate the desired region from an object for detailed inspection. The arguments to the cookie operation command are the xyz-minimum values of the bounding box followed by the xyz-maximum values. Negative values are not allowed.

The output file consists of an open model, including those triangles which intersect the given bounding box.

Restrictions. This option must be the last one in the command line. Options placed after the xyz-minimum and maximum values will not be recognized.

 

Option -C: taking only the cut area

This option causes only those triangles which intersect the cut area to be written to the output file. This function it is only useful for specific debugging operations.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -L: large vs. small mode

stlcut has two different working modes according to the size of the input file. The default mode is to handle large models and the other mode is to handle small models, say, less than 5000 facets.

The difference between the two modes is that in large mode only those triangles which are cut are stored into main memory. This allows the cutting of very large models, up to several hundreds of thousands of triangles. Because only those triangles which are cut are processed, orienting the normals of the result is not possible. This makes the cutting faster, but the resulting files must be oriented with tr2stl post processor.

In small mode, all triangles are stored into main memory, triangles are oriented, and the final output files are also oriented.

Default. The default mode is large.

 

Option -m: merging triangle vertices

Those triangle vertices which lay near enough to each other are merged into one vertex after the triangles are read into stlcut. The maximum distance between the points to be joined can be given with command line option -m.

Defaults. The default value for the distance is 0.001 units.

Recommendations. The successful merging of vertices is essential for the neighbour finding and later the orientation of triangles in stlcut. The default value for merge distance might be too small for some input files causing gaps to appear in the final result. One indication of this is a large number of separate components found in a presumably simple input file. The user can try to enlarge the value in order to fill these gaps. Large values cause triangle edges smaller than the value to disappear, changing the geometry of the model.

 

Option -N: normal data in OBJ files

Requests that normal information be written to the OBJ file. This option only applies to OBJ output files.

Default. Normal information is not included in OBJ output files.

Related option. Option -O.

Recommendation. The WAVEFRONT Personal Visualizer is capable to create missing normal information when necessary, and better results are obtained if the normal information is not included in the file.

 

Option -o: specifying the output file

Specifies the base name of the output files. A number is added to base name to differentiate between the various pieces. If the option -o= is used, i.e. the equal sign "=" is used as file name, the base name will be the same as input file name.

Defaults. The defaults explained in Default extensions apply to this option.

Related options. The option -O specifies the format of the output file.

 

Option -O: specifying the output file format

This option is analogous to the option -F except that it applies to the output file. The argument is a single letter the meaning of which is given bellow:

 

a

ASCII STL

b

binary STL

w

WAVEFRONT OBJ

This option overrides defaults associated to the file extension.

Defaults. If not specified, stlcut derives the output file format from the file extension.

Related options. Options -o and -N.

 

Option -S: creating an open model

The gaps generated by slicing are filled resulting a solid or volume and normal information is generated. The user can override this operation by specifying the option -S. In this case, the filling operation will not take place and the result will be an open model.

 

Option -V: controlling the verbosity

It has the same effect as when used with tr2stl. Check the Option Reference Guide of that program for more information.

 

Option -x, -y, -z: specifying the cutting plane

The argument is the location of the slicing plane. The three options are mutually exclusive, i.e. only one slice plane direction can be used at a time. Any number of slice planes can be used, but the planes must be given in ascending order. Slice planes with negative co-ordinate values can also be given, but the negative value must be written immediately after the option letter, e.g. "-z-10".

 

STLREDU

 

Examples

The triangle reduction is done based on user supplied parameters. In the command

% stlredu -f ifile -o ofile -c .71 -r .1 -P -p 5

two controlling parameters are given. The option -c gives the angle tolerance and the option -r the distance tolerance. The option -P sets the multiple pass mode on and the option -p the limit for multiple pass.

The command

% stlredu -f ifile -o ofile -c .7 -r .1 -P -i 2.0

does not produce triangles with longer than 2.0mm edges, set with option -i. The multiple pass is limited with default 5%.

 

Option Reference Guide

 

Option -c: angle tolerance

Consider a vertex and all the triangles that have this vertex in common. Consider now the maximum angle between all pairs of normals associated to each triangle

• If the maximum angle is larger than the angle tolerance, then the vertex will not be removed.

• If the maximum angle is less, then the vertex will be removed if the distance tolerance is satisfied.

Defining a small angle prevents shape changes near sharp corners and, consequently, less changes are likely to the original model. A larger angle may cause the removal of sharp corners, which may lead to significant changes in the shape of the model.

Note. the angle tolerance is given as a cosine of the actual angle, i.e. for 45 degree angle use -c 0.71 (cos(45) = 0.71).

Related options. Options -h, -i and -r.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -g: grid size

If the model is refined with the stlrefine the option -g can be used to define the grid points at slice planes. The points which cooridinate values divide evenly with the given value are not removed during the reduction.

Related options. Options -c, -h, -i and -r.

 

Option -h: height ratio

If the option -h is specified triangle aspect ratios are considered when removing the vertices. Triangle height ratio is the ratio between the minimum triangle height against the corresponding base edge (edge opposite to the vertex with the largest angle >90). A triangle which aspect ratio is larger than given value is considered a good triangle.

Before a triangle vertex is removed all the aspect ratios of the triangles attached to the vertex are evaluated. If the number of triangles with good aspect ratios would reduce when the vertex is removed the removal is not allowed.

Usable values: The usable values are between 0.87 - 0.0. The upper limit corresponds to a triangle with 60 degree angles at vertices i.e. triangle with even edges. The lower value corresponds to a degenerated triangle.

Related options. Options -c, -i and -r.

 

Option -i: maximum edge length

All triangle edges which are shorter than maximum edge length can be removed, if the constraints given with options -c and -r are respected and the removal does not produce edges longer than given value. Edges which are longer cannot be removed. The aspect ratios of the resulting triangles will get better for simulation purposes.

Note. The triangle mesh can be refined using stlrefine before reduction is done with this option.'

Related options. Options -c, -h and -r.

 

Option -j: short edge

The option -j causes the removal of all edges which are shorter than the given value. This option overruns all other reducing criteria and solemnly controls the reduction.

Related options. Options -c, -h, -i and -r are all overrun.

 

Option -m: merging triangle vertices

Those triangle vertices which lay near enough to each other are merged into one vertex after the triangles are read into stlredu. The maximum distance between the points to be joined can be given with command line option -m.

Defaults. The default value for the distance is 0.001 units.

Recommendations. The successful merging of vertices is essential for the neighbour finding and later the orientation of triangles in stlredu. The default value for merge distance might be too small for some input files causing gaps to appear in the final result. One indication of this is a large number of separate components found in a presumably simple input file. The user can try to enlarge the value in order to fill these gaps. Large values cause triangle edges smaller than the value to disappear, changing the geometry of the model.

 

Option -o: specifying the output file

Specifies the name of the output file. If the option -o= is used, i.e. the equal sign "=" is used as file name, the output file name will be the same as input file name and the original input file ifile is renamed with a tilde as suffix.

Defaults. The defaults explained in Default extensions apply to this option.

Related options. The option -O specifies the format of the output file.

 

Option -O: specifying the output file format

This option is analogous to the option -F except that it applies to the output file. The argument is a single letter the meaning of which is given bellow:

 

a

ASCII STL

b

binary STL

w

WAVEFRONT OBJ

This option overrides defaults associated to the file extension.

Defaults. If not specified, stlcut derives the output file format from the file extension.

Related options. Options -o and -N.

 

Option -p: multiple pass stop limit

Specifies the stop limit for multiple pass mode for reduction and is used in connection with the option -P.

Default: 5%.

 

Option -P: multiple pass

Specifies the multiple pass mode for reduction. In the default mode the original model is traversed only once with stlredu. With multiple pass mode the model is traversed until the reduction is less than given with the option -p of the number of triangles before the start of reduction loop.

Default: single pass.

 

Option -r: distance tolerance

The distance tolerance controls how much the simplified model can deviate from the original model.

Related options. Options -c, -h and -i.

 

Option -V: controlling the verbosity

It has the same effect as when used with tr2stl. Check the Option Reference Guide of that program for more information.

 

STLREFINE

 

Examples

The following command

% stlrefine -f ifile -o ofile -x -E 5.0

slices the triangulated input model with planes parallel to the x-axis. The planes are 5.0mm apart from each other. This ensures that there are no triangle edges parallel to x-axis which are longer than 5.0mm.

The commands

% stlrefine -f ifile -o ofile1 -x -E 5.0

% stlrefine -f ofile1 -o ofile2 -y -E 5.0

% stlrefine -f ofile2 -o ofile3 -z -E 5.0

slice the model in all three axis directions, effectively slicing all triangle edges to be shorter than 5Ã3.

Refinement combined with reduction allows the user to redefine the faceting of the original model. This is required for some simulation systems.

 

Option Reference Guide

 

Option -E: slice plane distance

Specifies the distance of consecutive slice planes used to refine the triangulation. The slice plane direction is given with options -x, -y and -z.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -m: merging triangle vertices

Those triangle vertices which lay near enough to each other are merged into one vertex after the triangles are read into stlrefine. The maximum distance between the points to be joined can be given with command line option -m.

Defaults. The default value for the distance is 0.001 units.

Recommendations. The successful merging of vertices is essential for the neighbour finding and later the orientation of triangles in stlrefine. The default value for merge distance might be too small for some input files causing gaps to appear in the final result. One indication of this is a large number of separate components found in a presumably simple input file. The user can try to enlarge the value in order to fill these gaps. Large values cause triangle edges smaller than the value to disappear, changing the geometry of the model.

 

Option -N: normal data in OBJ files

Requests that normal information be written to the OBJ file. This option only applies to OBJ output files.

Default. Normal information is not included in OBJ output files.

Related option. Option -O.

Recommendation. The WAVEFRONT Personal Visualizer is capable to create missing normal information when necessary, and better results are obtained if the normal information is not included in the file.

 

Option -o: specifying the output file

Specifies the name of the output file. If the option -o= is used, i.e. the equal sign "=" is used as file name, the output file name will be the same as input file name and the original input file ifile is renamed with a tilde as suffix.

Defaults. The defaults explained in Default extensions apply to this option.

Related options. The option -O specifies the format of the output file.

 

Option -O: specifying the output file format

This option is analogous to the option -F except that it applies to the output file. The argument is a single letter the meaning of which is given bellow:

 

a

ASCII STL

b

binary STL

w

WAVEFRONT OBJ

This option overrides defaults associated to the file extension.

Defaults. If not specified, stlrefine derives the output file format from the file extension.

Related options. Options -o and -N.

 

Option -V: controlling the verbosity

It has the same effect as when used with tr2stl. Check the Option Reference Guide of that program for more information.

 

Option -x, -y, -z: slice plane direction

Specifies the slice plane direction. The slice plane perpendicular to given axis is used. Only one slice plane can be used at a time.

To generate the refinement in all directions, the user must run the program for each direction separately.

STLREFINE2

Splits the triangulation such that no triangle has an edge longer than a user-supplied value.

 

Option Reference Guide

 

Option -e: maximum edge length

A real number that limits the length of any edge in the output file.

Defaults. If no value is given, the average edge length is calculated, adjusted by Ã2, and result is used as the default value.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -o: specifying the output file

Specifies the name of the output file. If the option -o= is used, i.e. the equal sign "=" is used as file name, the output file name will be the same as input file name and the original input file ifile is renamed with a tilde as suffix.

Defaults. The defaults explained in Default extensions apply to this option.

Related options. The option -O specifies the format of the output file.

 

Option -V: controlling the verbosity

It has the same effect as when used with tr2stl. Check the Option Reference Guide of that program for more information.

 

 

STLSEP

 

Examples

The triangle separation is meant for splitting problematic models into different areas. For example, all good areas can be combined, and bad areas (overlapping and duplicate) can be separated into different files. For example, command

% stlsep -f ifile -o ofile –t0

outputs the ok parts of the model into files ofile-okn, overlapping into ofile-overlappingn and duplicate into ofile-duplicaten , where n is an increasing index starting from 0.

 

Option Reference Guide

 

Option –f/F: input file specification

The meaning of –f and –F options is the same as with tr2stl-program.

 

Option –o/O: output file specification

The meaning of –o and –O options is the same as with tr2stl-program.

 

Option –t: separation method

The option –t defines the separation type. There are two different types:

 

0

Ok, overlapping and duplicate

1

All faces

Default. None

Note. The type 0 separation can take a long time due to search for best possible neighbours for each area. The type 1 separation produces a large amount of files.

 

Option -V: controlling the verbosity

The verbosity levels of stlsep are the following:

 

3

All messages (info, warning and error)

4

All and Timing messages.

10

Only error messages.

11

No messages.

12

Number of output triangles.

Specifying a verbosity level larger than 12 causes no information messages to be printed. Verbosity level zero only prints a short help for the available options and exits the program.

Defaults. The current default value is 3.

 

TR2SLICE

 

Uniform slicing

In this Chapter we assume that the slicing mode is applied to the entire object, Zmin to Zmax. Such an interval is also called a range. In the Section Range slicing we describe how the user can subdivide the range into smaller ones and have greater control of the tolerances.

In the sequel we use the term backtracking meaning the re-evaluation of a slice using different criteria other than the current one defined by the slicing mode.

The straightforward slicing mode is uniform, or static, slicing. In this mode the user supplies only one layer thickness that is used throughout the whole model range. The first slice equals to z0 = i*c >= Zmin , where i is the index of first layer from 0 level that intersects the sliced object. The following slices are of the form zi+1 = zi + c where c is the given thickness. This is done while zi<=Zmax. The user can also define ranges with different layer thicknesses (see Range slicing).

The commands below slice the input file with a layer thickness of 0.1mm:

% tr2slice -f ifile -o ofile -c 0.1

% tr2slice -f ifile -o ofile -c 0.1 -mu

The option -c specifies the layer thickness. There is no default value and if it is not supplied an error message is given and the program aborts. The uniform slicing mode is the default mode but it can be stated explicitly with the option -m with argument u. The option -m accepts one of upnaf as argument meaning uniform, preserving semi-adaptive, non-preserving semi-adaptive, adaptive slicing and front end mode, respectively. Different modes require different options to be given as described in the following Sections.

 

Handling peaks with uniform slicing

The user can define special handling for peaks in the object. Anyhow, slice distances which are not equal to given layer thickness may emerge, causing non-uniform nature to the resulting slices. Thus, the receiving system must have a capability to use different layer thicknesses during one run. (This feature is recommended to be used with semi-adaptive slicing, see Semi-adaptive slicing)

If a command such as:

% tr2slice -f ifile -o ofile -c 0.1 -b 0.05

is given then the peaks in the model are handled in a special way. The option -b accepts a so-called backtracking thickness as an argument. If the evaluated slice exceeds or enters a peak in the object, a backtracking is performed; a new slice is evaluated using the backtracking thickness instead of the layer thickness. Slicing resumes as usual using the backtracking thickness and several thin slices may be added to the top of the peak. With this option the user can obtain more a precise slicing for object details.

The backtracking thickness must be smaller than the layer thickness.

In the current version, if an downward peak is entered as an upward peak is exited, the backtracking is not done because the number of contours does not change. This error may be corrected in the future versions.

 

Setting the first slice level

With the uniform slicing the user can set the first slice level with command line option -u. The command

% tr2slice -f ifile -o ofile -c 1 -u 0.5

sets the slice thickness to 1mm and the unused area in the bottom of the object to 0.5mm. The first slice level will be at level 0.5mm from the bottom of the object. From this the slicing continues as normal.

By default, the first slice is at the same level as the first integral multiplicand of layer thicknesses from 0 level that intersect the object.

 

Semi-adaptive slicing

Surface areas which are flat and parallel to the xy-plane can be of a great importance for the model for manufacturing or aestethic reasons. In semi-adaptive mode tr2slice can automatically create slices in surface areas parallel to the slice plane i.e. flat surface areas. Firs, the flat areas are searched from the object. During slicing tr2slice tries to make slices on these levels. If it fails, a warning message is given.

There are two different modes for semi-adaptive slicing. The first one keeps the layer thicknesses as uniform as possible through the whole object. Only the slice at a priori chosen levels can have different thicknesses between given upper and lower bound. The other allows small deviations from the default layer thickness through the whole object.

 

Preserving semi-adaptive slicing

If the user wants the slices between a priori chosen flat layers be the same, he uses the following command:

% tr2slice -f ifile -o ofile -d 0.1 -D 0.3 -c 0.125 -mp

The mode option -m with an argument p specifies the preserving semi-adaptive mode. The minimum layer thickness is defined with option -d and the maximum with option -D. The argument to the option -c specifies the default layer thickness.

Whenever a flat area is encountered during the slicing, special evaluation for layer thickness is performed. If the difference between the previous flat layer level and current layer can be divided evenly with normal layer thickness -c, the normal layer thickness can be used at the current level. If the evaluated layer thickness from the previous slice to the current fixed slice is between (or equal) the minimum thickness and the normal layer thickness, the evaluated thickness will be used. Otherwise, if the evaluated layer thickness between the previous slice and current fixed slice is less than minimum thickness, previous slice must be discarded. Instead, we will use the slice before the previous slice. If the evaluated distance between this slice and the current slice is less than the maximum layer thickness -D, evaluated layer thickness is used. If none of these rules apply the minimum layer thickness is used and a warning message is outputted.

More precisely, let zc be the current fixed slice level and zp be the previous fixed level. Also, let zi be the slice before zc and zdel the slice before zi. Lets set x_0 = zc - zi and x_1 = zc - zdel. If d<= x_0 <= c where c is the normal layer thickness and d is the minimum layer thickness, use layer thickness x_0. If x_0 < d and x_1 < D, where D is the maximum layer thickness, discard slice zi and use layer thickness x_1. Otherwise, you are in troubles and forced to use d.

 

Non-preserving semi-adaptive slicing

If the user does not mind little changes in the layer thicknesses through the model, he uses the following command:

% tr2slice -f ifile -o ofile -d 0.1 -D 0.3 -c 0.125 -mn

The mode option -m with an argument n specifies the non-preserving semi-adaptive mode. The minimum layer thickness is defined with option -d and the maximum is given with the option -D. The option -c specifies the default.

Consider the range between two flat levels. If the range can be divided evenly with normal layer thickness -c, the normal layer thickness can be used through the whole range. Otherwise, if the fraction part is more than minimum layer thickness, the fraction is used at the top of the range. If the fraction is less than the minimum layer thickness, the whole range is sliced with thickness which is between the minimum and the maximum and divides the range evenly.

More precisely, let zc be the current fixed slice level and zp be the previous fixed level, z = zc - zp and n = z / c. Also, let zi be the slice before zc and zdel the slice before zi. Lets set x_0 = zc - zi and x_1 = zc - zdel. If n has no fraction, use thickness c through the whole range [zp,zc]. Also, if d <= x_0 <= c where c is the normal layer thickness and d is the minimum layer thickness, use layer thickness x_0 at the level zc. If n has an integer part i and a fraction part f, use layer thickness use c_f = z / (n+1) if d <= c_f. Else, use c_f = c + f/i through the whole range if c_f <= D. If none of the rules before apply, use thickness c through the whole range and d at the top of the range and output warning message.

 

Handling peaks with semi-adaptive slicing

The peaks can be handled the same way as with uniform slicing (see Handling peaks with uniform slicing).

 

Fixed slice levels

The user can also give fixed slice levels, i.e. tr2slice generates slices to wanted levels. The command

% tr2slice -f ifile -o ofile -d 0.1 -D 0.3 -c 0.125 -mp -Z 1.0 -Z 2.5 -b 0.1

generates two slices in z levels 1.0mm and 2.5. The levels must be given in ascending order and the distance between levels must be larger than the minimum layer thickness -d.

Fixed slice levels are used as flat areas in the model, see Preserving semi-adaptive slicing.

 

Adaptive slicing

 

tr2slice can evaluate the layer thickness depending on the slope of the object. The user supplies the program with a maximum cusp height value. This value gives the upper limit for the difference between the actual triangulated surface and cusps created by the manufacturing process. The command is as follows:

% tr2slice -f ifile -o ofile -d 0.1 -D 0.2 -a 0.05 -ma

The mode is defined with the option -m with argument a indicating adaptive slicing. The maximum cusp height is given with option -a and in the example above it equals 0.05mm. The minimum and maximum layer thicknesses are given with options -d and -D, respectively. Naturally, the minimum value must be smaller than the maximum value.

Adaptive slicing causes finer slicing in those areas of an object where the slope of the surface is smaller. As the slope gets smaller, i.e. the model becomes flat, the layer thickness approaches the maximum cusp height. Tolerances may be violated if the required layer thickness is less than the minimum thickness specified by the -d option.

Moving from an area with a large slope to an area with a smaller one may cause tolerances to be violated. This is avoided by performing backtracking: the layer thickness is re-computed using the data gathered from slice i+1 resulting in a thickness of h instead of H, with h < H. The user can disable this procedure by using the option -R in the command line.

Adaptive slicing generates also slices to flat areas using preserving semi-adaptive approach (see Preserving semi-adaptive slicing). Therefore, the user can also supply default layer thickness with option -c. If it is not supplied, it is taken to be the average of minimum and maximum layer thickness, c = (d+D)/2.0.

 

Handling peaks with semi-adaptive slicing

The peaks can be handled the same way as with uniform slicing (see Handling peaks with uniform slicing).

 

Range slicing

If the slope of the object in different areas is known by the user, he can control the layer thickness in those areas. The user can subdivide the full range of an object to smaller ranges z_0<z_1<...<z_n, and define different layer thicknesses for these ranges. Anyhow, the thickness for a range z_i must not be greater than the range.

Adaptive slicing can not be used in combination with range slicing.

 

Uniform range slicing

The command

% tr2slice -f ifile -o ofile -c 0.1 -r 10.0 -c 0.125 -r 15.0 -c 0.09

starts the slicing with a thickness 0.1mm given with option -c. When the slice level 10.0mm is reached, the layer thickness changes to 0.125mm. At level 15.0mm it changes again to 0.09mm. This allows the user to control the accuracy of the slicing in different areas.

Ranges given with options -r must be given in ascending order. The range layer thickness value -c associated to each range must follow the range value. The user can give any number of ranges. Those ranges outside the interval Zmin-Zmax are discarded.

The command below gives a special handling to the peaks of the object, as described in the Preserving semi-adaptive slicing.

% tr2slice -f ifile -o ofile -c 0.1 -r 10.0 -c 0.125 -r 15.0 -c 0.09 -b 0.05

The backtracking thickness value given with option -b must be smaller (or equal) with all range layer thickness values given with option -c.

When the slice level moves from one range to another, the first slice in the new range is evaluated using the range layer thickness in the previous range. If the range layer thickness in the new area is smaller than in the previous one, this may cause a too thick slice to emerge in the new range. In the worst case, the first slice in a given range might violate the tolerance for that range.

 

Semi-adaptive range slicing

Semi-adaptive range slicing works the same way as normal semi-adaptive slicing and the limitations for uniform range slicing also apply here. New slices are created at the planar regions of the object if the semi-adaptive layer thickness lays between the backtracking thickness and the range layer thickness. For example, the command

% tr2slice -f ifile -o ofile -d 0.1 -D 0.3 -mp -c 0.125 -r 10.0 -c 0.15 -r 15.0 -c 0.125

performs a semi-adaptive range slicing to the object.

 

Storing open slices

Open slices are---more often than not---a sure indication of errors in the model and they may cause mistakes in the manufactured part. The user can output such slices into a separate file for further inspection using the -h option. For instance, the command:

% tr2slice -f ifile -o ofile -h hfile -Hl -c 0.1

specifies that the open slices should be stored in hfile in LEAF format (-Hl option). The file can be either LEAF (-Hl), CBX (-Hc), EOS (-He) or HPGL (-Hh) format. These options behave analogously to the -o and -O options with TR2STL. The file name hfile must not be the same as ofile.

 

 

Option Reference Guide

 

Option -a: cusp height

tr2slice can evaluate the layer thickness depending on the slope of the object. The user supplies the program with a maximum cusp height value. This value gives the upper limit for the difference between the actual triangulated surface and cusps created by the manufacturing. This option is used with adaptive slicing.

Note. A manufacturing process capable of handling multiple layer thicknesses is required when using this option.

 

Option -A: absolute point output for HPGL

Specifies the absolute point output with HPGL-slice output mode.

 

Option -b: backtracking thickness

Specifies the thickness used with sudden changes in the slice contours. This enables the program to catch the small details in the model.

Note. A manufacturing process capable of handling multiple layer thicknesses is required when using this option.

 

Option -c: layer thickness

Specifies the default layer thickness for all slice modes, especially with uniform slicing and semi-adaptive slicing.

 

Option -d: minimum layer thickness

Specifies the minimum layer thickness for adaptive and semi-adaptive slicing.

 

Option -D: maximum layer thickness

Specifies the maximum slice thickness used with semi-adaptive and adaptive slicing.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -h: open slice output file

Specifies the name of the erroneous slice output file.

 

Option -H: open slice output file format

Specifies the erroneous, open slice output file type. The file can be either LEAF (-Hl), CBX (-Hc), EOS (-He) or HPGL (-Hh) format.

 

Option -m: slicing mode

Specifies the slicing mode; -mu uniform, -mp preserving semi-adaptive, -mn non-preserving semi adaptive and -ma adaptive slicing.

Defaults: uniform slicing.

 

Option -o

Specifies the name of the output files. Check the Option Reference Guide of tr2stl for more information.

 

Option -O: specifying the output file format

Specifies the output file type. The file can be either LEAF (-Ol), CBX (-Oc), EOS (-Oe) or HPGL (-Oh) format.

 

Option -r: range start value

Specifies the range start value. Can be given as many as wanted in ascending order. For each -r option there must be an immediately following -c option defining the slice thickness through the given range.

 

Option -R: disables backtracking

Disables backtracking with adaptive slicing.

 

Option -s: slice direction

Specifies the slice direction. Option accepts the letters x, y or z as an argument, e.g. "-sz". The slicing is done with planes perpendicular to the given axis.

Default. "z".

 

Option -u: first slice level

Specifies the first slice level, which overrides the default first slice level.

 

Option -v: merging triangle vertices

Those triangle vertices which lay near enough to each other are merged into one vertex after the triangles are read into tr2slice. The maximum distance between the points to be joined can be given with command line option -v.

Defaults. The default value for the distance is 0.001 units.

Recommendations. The successful merging of vertices is essential for the neighbour finding and later the orientation of triangles in tr2slice. The default value for merge distance might be too small for some input files causing gaps to appear in the final result. One indication of this is a large number of separate components found in a presumably simple input file. The user can try to enlarge the value in order to fill these gaps. Large values cause triangle edges smaller than the value to disappear, changing the geometry of the model.

 

Option -V: controlling the verbosity

It has the same effect as when used with tr2stl. Check the Option Reference Guide of that program for more information.

 

Option -Z: fixed slice levels

Defines the fixed slice levels with adaptive slicing. Must be given in ascending order.

 

TR2STL

 

Handling multiple input files

Sometimes it is necessary to combine several triangulated models stored in different files into one single model. This is easily done by simply concatenating all the files and using the result with tr2stl. For instance, suppose the files model1.stl and model2.stl are to be combined. Then it suffices to use the following command:

% cat model1.stl model2.stl | tr2stl ...

 

Troubleshooting

Depending on the number of problematic triangles, only a few or many, the user can either try to manufacture the object or do some further investigation on the object and fix errors in it, respectively. Also, tr2stl gives some information on the seriousness of the found problems to aid the user in the decision making. The following information messages are possible:

intersecting triangles probably meet only at edges or vertices

Triangles do not actually intersect each other, they only touch each other on edges and vertices. The manufacturing of the model is likely to succeed without problems.

maximum triangle vs. triangle penetration length: n

This gives an estimate how deep intersections take place in the model. If this value is very small, i.e. less than slicing thickness, the manufacturing of the model is likely to succeed.

all overlapping edge-to-edge triangles are thin triangles (lines)

In this case all overlapping edge-to-edge triangles are actually degenerated to lines. They should cause no harm to the slicing and thus to the manufacturing process.

the maximum height for edge-to-edge triangle overlaps: n mm

The maximum depth of an overlap. If this value is very small, i.e. less than slicing thickness, the manufacturing of the model is likely to succeed.

of which all are proper triangles (not lines).

This message is given if all edge-to-edge overlaps are real overlaps, not triangles which are degenerated to lines.

the maximum height for vertex-to-vertex triangle overlaps: n mm

The height of the worst vertex-to-vertex overlap triangle. If this value is very small, i.e. less than slicing thickness, the manufacturing of the model is likely to succeed.

the maximum height for non-neighbour triangle overlaps: n mm

The height of the worst non-neighbour overlap. If this value is very small, i.e. less than slicing thickness, the manufacturing of the model is likely to succeed.

 

Option Reference Guide

 

Option –a: flat gap tolerance

This option sets the limit for flat gap. If all gap polygon points are closer than given tolerance to the gap average plane, a special fill algorithm is used to close the gap.

Default. 0.0

Related options. The option –g sets the maximum size for gap, -U 0 sets the correct gap filling flavor. The option –A sets the flat tolerance type.

 

Option –A: flat gap tolerance type

This option sets the type of flat gap tolerance. The type can be either absolute or relative.

Default. 0, not used. Value 1 means absolute and value 2 means relative (not yet implemented) tolerance.

Related options. The option –g sets the maximum size for gap, -U 0 sets the correct gap filling flavor, –a sets the flat gap tolerance.

 

 

Option -B: file conversion only

This option causes tr2stl to only convert the input file to another file format. No other task is perform, not even determining the correct orientation of the triangle normals.

 

Option -c: full consistency checking

This option activates all possible checks. All triangles are checked against other triangles for possible errors including intersections and overlappings. If problems are found warning messages are issued. The argument is a file name where the errors are reported in VDAFS form.

The possible errors are categorized into five classes (SETs):

Set name

Message

Explanation

EINTERS

the number of non-neighbouring triangle intersections: n

The number of intersecting triangles which have no common vertex.

EVINTERS

the number of vertex-to-vertex triangle intersections: n

The number of intersections between triangles which share a common vertex.

EEOLAPS

the number of edge-to-edge triangle overlaps: n

The number of overlappings between triangles, which share a common edge (other kind of intersection not possible). In this case includes intersecting or duplicate triangles.

EVOLAPS

the number of vertex-to-vertex triangle overlaps: n

The number of overlappings between triangles which share a common vertex including intersecting triangles.

EOLAPS

the number of non-neighbouring triangle overlaps: n

The number of overlappings between triangles which have no common vertices.

Related options. The user can set the minimum error tolerance to control the strictness of the checking using the option -M. When error correction is set, tr2stl tries to remove all overlapping edge-to-edge neighbours from the input file. If the removing fails, a warning message is given:

failed to correct n overlapping edge-to-edge triangles

If the user has defined both gap and error output, the gaps and errors are all written into the same file. The file used depends on the last option given.

 

Option -C: error output file type

The argument is a single letter the meaning of which is given bellow:

 

c

CBX

v

VDA

Related options. The option -c gives the error output file name.

 

 

Option -d: refining triangles

This option causes the refining of erraneous triangles. The erranneous triangles are split into smaller ones to minimize the problematic area.

The refinement types are the following:

0

No refinement.

1

Intersecting, overlapping, etc. error triangles.

2

Gap triangles.

3

All erraneous triangles.

Defaults. The default value is 0.

Related options. –R.

 

Option -D: keep isolated triangles

tr2stl always reports if there are triangles without any neighbours in the triangle mesh. The following warning message is given:

n triangle(s) floating alone in space.

Normally, these triangles are removed but they can be kept using the option -D.

 

Option -e: extrude triangles

This option causes the extrusion of the input triangles. The whole model is moved to the average normal direction of the input object using the value given with option -e . The triangles which connect the edge of the original input and the extruded result are also generated.

Note. This option is mainly meant for adding extra stock on flat areas. This option should only be used with relatively flat and open surfaces.

 

Option -E: error correction level

The user can control the "amount" of error correction that is done with the input file. Currently, there are three levels:

• Level 0

No error correction is attempted. All errors, including gaps, inconsistent edges and intersections, are reported in the error description file if required.

• Level 1

Gaps are filled as determined by other options. Isolated and duplicate triangles are removed. If more than two triangles share the same edge, one is chosen randomly and eliminated.

• Level 2

Includes Level 1 errors and intersecting triangles. The later are removed so that minimum number of intersections remain in the resulting model. Gaps may result from triangle removal, and these are reported if they are not subsequently closed.

The error description file includes only those errors which are left after corrections.

 

Option -F: specifying the input file format

The argument is a single letter the meaning of which is given bellow:

 

a

ASCII STL

b

binary STL

This option overrides defaults associated to the file extension. Unlike the User Interface, tr2stl cannot determine automatically if the file is ASCII or binary STL. For instance, if the file has extension .stl and its contents are ASCII STL, then the option -Fa must be given or the file renamed.

 

Option -g: the gap tolerance

tr2stl is capable of fixing gaps in the triangulation. The argument is a tolerance which controls the size of the gaps that are covered by adding triangles. The exact meaning of this tolerance depends on the value given for the option -U.

Default. By default, gaps are not filled. If a value is given, it bounds the maximum height for an acceptable fill triangle.

Recommendation. The value for this parameter can be approximated by the value obtained from the message

the largest fill tolerance to close the remaining gaps: v mm

Related options. Option -q, -G and -U.

 

Option -G: gap filling angle

The user can specify a minimum fill triangle angle. The argument specifies the minimum angle between the original triangles and the ones used to fill a gap. This value has a strong influence to the triangles which are accepted as fill triangles. The default value causes the gap filling operation to use triangles that follow the shape of the triangles around the gap. The fill angle value can be between 0 and 180 degrees.

Defaults. The default value is 90 degrees.

Recommendations. The minimum triangle angle can be approximated from the warning message

the smallest fill triangle angle to close the remaining gaps: n degrees

 

Option -h: specifying the error description file

Specifies where the description of the gaps should be placed. The file is written in VDAFS form. This file will also contain the following errors that remain after corrections have been attempted:

• duplicate triangles

• triangles with edge errors

• isolated triangles

The errors are classified in different SETs as show bellow:

 

HOLES

Contains the gaps.

EDUPL

Contains the duplicate triangles. Duplicate triangles are normally removed.

EETRS

Contains the triangles with edge errors. These edges have three or more neighbouring triangles.

EFLOAT

Contains isolated triangles. These are triangles which have no neighbours. They are normally removed.

EEDGE

for edges which have more than two triangles attached.

EINCONS

for edges along which triangles could not be oriented consistently. Usually, these errors are caused by more than two triangles sharing the same edge.

Related options. Option –c or -C enables full checking of the input file. These errors are always detected and corrected as much as possible when constructing the topology of the model expect with the error correction level 0.

 

Option -H: gap output file type

The argument is a single letter the meaning of which is given bellow:

 

c

CBX

v

VDA

Related options. The option -h gives the gap output file name.

 

Option -i: inverted removal maximum height

This option causes the removal of thin triangles. The option -i gives the maximum height of a triangle which can be removed.

Default. The default height is 0.05.

Related options. Option –I.

 

Option -I: inverted removal maximum angle

This option sets the maximum angle between thin triangles which can be removed and the neighbouring triangles. The value is given as the cosine between the normals of neighbouring triangles.

Default. The default height is -0.1.

Related options. Option –i.

 

Option -k: kill value

This option is meant to clean corrupted STL-files. This option disables the input of triangles which absolute coordinate value is greater than given value.

Default. Not used.

 

Option -J: preserving normal orientation

Normally, tr2stl orients the normals to comply with the STL standard. This option alters the default behaviour. The triangle normals in the output file will point to the same direction as the normals in the input file.

 

Option -m: merging triangle vertices

Those triangle vertices which lay near enough to each other are merged into one vertex after the triangles are read into tr2stl. The maximum distance between the points to be joined can be given with command line option -m.

Defaults. The default value for the distance is 0.001 units.

Recommendations. The successful merging of vertices is essential for the neighbour finding and later the orientation of triangles in tr2stl. The default value for merge distance might be too small for some input files causing gaps to appear in the final result. One indication of this is a large number of separate components found in a presumably simple input file. The user can try to enlarge the value in order to fill these gaps. Large values cause triangle edges smaller than the value to disappear, changing the geometry of the model.

 

Option -M: controlling the accuracy

Sometimes small errors are acceptable in the final model. For example, very small overlaps would not cause any problems to the manufacturing process and need not to be reported.

The user can control the strictness of the checking with the option -M. The argument specifies the minimum error tolerance value which tells how small errors to report. For example, if the overlap projection height is less than the given value, it is not reported. This also applies to triangle intersection lengths.

Defaults. The default value is 0.05mm.

Related options. The minimum error tolerance is used only with consistency checking enabled by the option –c or -C.

 

Option -N: normal data in OBJ files

Requests that normal information be written to the OBJ file. This option only applies to OBJ output files.

Default. Normal information is not included in OBJ output files.

Related option. Option -O.

Recommendation. The WAVEFRONT Personal Visualizer is capable to create missing normal information when necessary, and better results are obtained if the normal information is not included in the file.

 

Option -o: specifying the output file

Specifies the name of the output file. If the option -o= is used, i.e. the equal sign "=" is used as file name, the output file name will be the same as input file name and the original input file ifile is renamed with a tilde as suffix.

Defaults. The defaults explained in Default extensions apply to this option.

Related options. The option -O specifies the format of the output file.

 

Option -O: specifying the output file format

This option is analogous to the option -F except that it applies to the output file. The argument is a single letter the meaning of which is given bellow:

 

a

ASCII STL

b

binary STL

w

WAVEFRONT OBJ

This option overrides defaults associated to the file extension.

Defaults. If not specified, tr2stl derives the output file format from the file extension.

Related options. Options -o and -N.

 

Option -p: separate output for error triangles

This option specifies a file name for separate output of erraneous triangles. Different error triangles are split into 5 different files, where the given file name added with numbers 0-4 as postfixes indicate the triangle error type:

0

Intersecing and overlapping

1

Multiple

2

Duplicates

3

Floating

4

At gap

Also, another set of files with a postfix "EN" and a number 0-4 will be generated. These files include the triangles which are inside the bounding box of the above mentioned erraneous triangles.

Related options. Different erraneous triangle types are decribed with options -c , -C and –h and –d.

 

Option -P: specifying the output file format

This option is analogous to the option -O except that it applies to the error triangles output files. The argument is a single letter the meaning of which is given bellow:

 

a

ASCII STL

b

binary STL

w

WAVEFRONT OBJ

This option overrides defaults associated to the file extension.

Defaults. If not specified, tr2stl derives the output file format from the file extension.

 

Option -q: gap fill low tolerance

This option specifies the tolerance for the first run for filling wihle using gap filling mode –U 2.

Default. The default for first run is 0.01.

Related options. –U, –g and –G.

 

Option -Q: filling gaps with open models

Default gap filling causes erroneous results to happen when used with open models, like car outer surfaces. By default, all triangles which are created to fill the gaps are added to the triangulation, even when the gap is not completely filled. This causes extra triangles to emerge on the border of the open surface.

The user can define the input model to be open with the option -Q. With open model gap fill the triangles which are generated with failed gap fills are not accepted to the final result.

Recommendation. With the open models the user should pay more attention to the gap fill tolerance. When using fill triangle edge length as the limiting factor, this tolerance value should be sufficiently smaller than the shortest distance between the opposite surface border points to avoid the filling of the surface at the borders. With triangle height mode the value should be smaller than the longest triangle edge at the surface border.

 

Option -R: refinement tolerance

This option sets the value for maximum edge length of refined erraneous triangles. If this option is not given, the average edge length divided by two of the erraneous triangles is used.

Related options.Triangle refinement is set on with option –d.

 

Option -r: smoothen flat areas

The user has a possibility to smoothen flat areas in the model, i.e. areas parallel to the xy-plane. These areas may have little deviations because of rounding errors or border matching in the triangulation algorithm. The argument is the filter thickness which is used as follows.

First, all flat areas are searched and sorted to ascending order. Second, the first flat level is chosen and all those triangles which have all corner points nearer than given filter value (below or above) to the chosen level, are moved to the same plane. This is repeated to all previously saved flat levels.

 

Option -s: scaling the model

The argument is a scale factor that is applied to all co-ordinates of the input model. If the user is using the translate options at the same time, this must be taken into consideration when giving the pool limits.

 

Option -t: maximum number of triangles to read

The option sets a limit to the number of the triangles to input.

Option -T: separating the input file

This options allows the user to output different components of a model to separate files. The program generates as many separate files as needed to store the different components. Each component gets an identifying number. All generated files have different names, consisting of the original output file name and suffix -c-n, where n is the component number.

Recommendation. Component output can be used for debugging the model or deleting erroneous objects from the original input file.

Note. The triangles in the component files are oriented as if they were still in one model or the same file.

 

Option -U: gap filling flavours

Gap filling has two modes. The tolerance specified using the option -g; can put a limit on either the maximum triangle height or edge length that is used to fill gaps.

The argument to the option -U is either 0 or 2. A value equal to 0 specifies that the limiting factor in gap filling is the edge length of the triangles whereas a value equal to 1 specifies as limiting factor the triangle height.

Default. 0.

Recommendation. When the triangle height mode, -U 2, is used, a relatively small value for the -g is recommended.

Related options. Options -g , -q and –G.

 

Option -V: controlling the verbosity

The verbosity levels of tr2stl are the following:

 

3

All messages (info, warning and error)

4

All and Timing messages.

10

Only error messages.

11

No messages.

12

Number of output triangles.

Specifying a verbosity level larger than 12 causes no information messages to be printed. Verbosity level zero only prints a short help for the available options and exits the program.

Defaults. The current default value is 3.

 

Moving objects

The user can reposition the object to the positive quadrant of the co-ordinate system with options -x, -y, -z, -X, -Y and -Z.

The lower case letters give the minimum x-, y- and z-coordinate values for the object. The uppercase letters give the maximum co-ordinate values for the object, respectively.

If the object does not fit into the given limits when both minimum and maximum values are supplied, a warning message is issued and the object is positioned according to the minimum co-ordinate values.

The following options would move a model to the positive quadrant:

% tr2stl -x 0 -y 0 -z 0

Note: Should the user move the model to negative quadrants, the negative co-ordinate values must follow immediately after the option letter, no spaces allowed, e.g. "-x-10 -y-10 -z-10".

 

TRBOOL

 

Examples

Two input files are always needed when using trbool. Here is an example how to compute the union of two intersecting STL models:

% trbool -f ifile1 -e ifile2 -o ofile

In the command above, trbool reads the input objects from ifile1 and ifile2. They are intersected and the output consists of those parts of the input objects which lay on the positive normal side of the intersecting object. The resulting part is a solid, if the input objects were solids.

If the intersection ("negative" normal side) is also needed, the option -S gives the user that possibility as well:

% trbool -f ifile1 -e ifile2 -o ofile1 -p ofile2 -S

This commands writes the union ("positive" normal side) of the objects into ofile1 and the intersection ("negative" normal side) of the objects into ofile2.

To split the two files "four-ways", use the option -T:

% trbool -f ifile1 -e ifile2 -o ofile1 -p ofile2 -T

The intersection may cut both input files in several pieces. The pieces from ifile1 are written onto the files ofile1-cN and the ones from ifile2 onto ofile2-cM, where N and M are integer numbers identifying each piece.

The result can also be divided into four files. The command

% trbool -f ifile1 -e ifile2 -o ofile -4

outputs the result in four files, ofile0.stl, ofile1.stl, ofile2.stl and ofile3.stl. These files include the negative and positive parts of the Boolean operation separately for both input files.

Both input files can contain multiple components, ie. one of the files can contain several pins and the other the object where the pins are to be attached.

 

Option Reference Guide

 

Option -m: merging triangle vertices

Those triangle vertices which lay near enough to each other are merged into one vertex after the triangles are read into trbool. The maximum distance between the points to be joined can be given with command line option -m.

Defaults. The default value for the distance is 0.001 units.

Recommendations. The successful merging of vertices is essential for the neighbour finding and later the orientation of triangles in trbool. The default value for merge distance might be too small for some input files causing gaps to appear in the final result. One indication of this is a large number of separate components found in a presumably simple input file. The user can try to enlarge the value in order to fill these gaps. Large values cause triangle edges smaller than the value to disappear, changing the geometry of the model.

 

Option -o: specifying the output file

Specifies the name of the output file. If the option -o= is used, i.e. the equal sign "=" is used as file name, the output file name will be the same as input file name and the original input file ifile is renamed with a tilde as suffix.

Defaults. The defaults explained in Default extensions apply to this option.

Related options. The option -O specifies the format of the output file.

 

Option -O: specifying the output file format

This option is analogous to the option -F except that it applies to the output file. The argument is a single letter the meaning of which is given bellow:

 

a

ASCII STL

b

binary STL

w

WAVEFRONT OBJ

This option overrides defaults associated to the file extension.

Defaults. If not specified, trbool derives the output file format from the file extension.

Related options. Options -o and -N.

 

Option -N: normal data in OBJ files

Requests that normal information be written to the OBJ file. This option only applies to OBJ output files.

Default. Normal information is not included in OBJ output files.

Related option. Option -O.

Recommendation. The WAVEFRONT Personal Visualizer is capable to create missing normal information when necessary and better results are obtained if the normal information is not included in the file.

 

Option -V: controlling the verbosity

It has the same effect as when used with tr2stl. Check the Option Reference Guide of that program for more information.

 

Option -4: four file output

Produces four output files, ofile0.stl, ofile1.stl, ofile2.stl and ofile3.stl. ofile0.stl includes the positive normal part of the first input file (-f). ofile1.stl includes the positive normals part of the second input file, (-e). ofile2.stl is the negative part of the first input file and ofile3.stl is the negative side of the second input file. For example, if there is more than one positive component produced from the first input file, all components are outputted into file ofile0.stl.

 

TROFFS AND TROFFS2

The major function of offsetting is to create a solid model from an open triangulated surface for RPT. For example, this enables the fast manufacturing via Rapid Prototyping of a car outer body consisting of open surfaces. The time consuming construction of inner surface with CAD-system is omitted.

There are also other uses for the offset operation. These depend on the offset distance compared to the size of the details in the original model. If the distance is large compared to the detail size, it is impossible to follow the shape of the original surface within tight tolerances, thus reducing the usability of the offset surface. When the offset distance is small enough, the details of the original surface can be followed within the given tolerance. This offset surface can be used for fit and function as well as shrinkage compensation.

Another important application is to transfer an originally solid large block object to a hollow object. This can reduce the material needed and building time with some RP processes. First, the part is made hollow with offsetting operation. Before the manufacturing little holes can be added trbool to allow the liquid material to flow out from the model during/after the build operation. This is much better than drilling holes to the manufactured part to allow the trapped liquid to flow out.

The new version of offsetting, troffs2, produces a smoother offset. The use of troffs2 is recommended. The parameters for troffs2 are identical to the parameters of troffs and the following examples and option descriptions apply to both programs.

 

Examples

A typical usage of troffs is:

% troffs -f infile -o ofile -d 1.0

% tr2stl -f ofile -o ofile2

In the command above, troffs reads it's input from infile consisting of open triangulated surfaces and the final solid result is stored in ofile. The offset distance parameter gives the distance between the original and the new surface, here 1.0mm. The offset is generated to the default direction parallel to the surface normal vectors. After the offsetting, the result is post processed with tr2stl to orient the normals and check for gaps.

 

Controlling the offset

The parameters to control the offset operation are offset distance , offset tolerance , offset direction, close/open switch and mode switch. The offset tolerance indicates the maximum deviation from the offset distance. The offset direction indicates the offset direction, either to the surface normal direction or opposite direction. The close/open switch tells if an open model is to be closed or not. The offset of a closed model is a closed model by definition. The mode switch causes the program to run either in normal or accurate mode.

Note. troffs does not orient the output triangles in the manner required by the STL-format. Offset must be oriented with a post processor, like tr2stl, before manufacturing.

 

Option Reference Guide

 

Option -a: accuracy tolerance

Offset tolerance gives the maximum offset deviation from the given offset distance. The tolerance gives the limits for offset distance and rounding with sharp corners. In the command:

% troffs -f ifile -o ofile -d 1.0 -a 0.1 -M

option -a gives the tolerance and switch -M sets the accurate mode. This allows the offsetting to deviate up to 10 percent from the offset distance ,i.e. d+/d-*a. The default value for is 0.1, i.e. 10%. Smaller value for increases the execution time and the number of produced triangles, but could produce better quality offset.

 

Option -B: output only offset surface

The default action for troffs is to output both original and offset triangles to produce a solid model. But the user can also choose to output only those triangles generated by the offset operation (offset surface and joining triangles) or both the original and offset triangles. To output only the offset triangles, the user gives an option -B on the command line:

% troffs -f ifile -o ofile -B

This is useful for example to compensate shrinkage in mould manufacturing. The model is made bit larger with offset operation and only the offset triangles are used to produce the mould via suitable process. In this case the original triangles can be discarded.

Default. Both surfaces are outputted.

 

Option -d: offset distance

Specifies the offset distance. The command

% troffs -f ifile -o ofile -d 1.0

produces an offset of 1.0mm.

 

Option -D: minor component removal

Self-intersection removal can cause small, insignificant offset surface components to emerge. These minor components are removed automatically. If the user wishes to keep all components of the offset surface, he can disable minor component removal with command line option -D.

Default. All minor components are removed.

Alternative procedure. The user can separate all different components with tr2stl post processor for closer examination of the result.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -I: offset direction

The offset direction with troffs is given to be either parallel to the original surface normals or opposite. First the facets defining the original model are oriented in a consistent manner. In the second step a normal is created for every vertex in the model. This is done by averaging the normals of the facets which share the vertex.

The default offset direction is parallel to the surface normals. In the following command the offset direction is set opposite to the normal direction with command line option -I (for inverse):

% troffs -f ifile -o ofile -I

In a solid model the normals point to the ``air'' part of the space surrounding the model. For open surfaces it is impossible to tell which is inside and which is outside. For this purpose the user can first use option -t on the command line to produce a normal output of the original surface in STL-format. This file can be visually checked with the graphical user interface to set the final offset direction.

If the file consist of many separate open surfaces, the troffs tries to orient the separate surfaces in a consistent manner. This may not always be possible forcing the user to divide the separate components into different files.

 

Option -J: disable normal orientation

The user can disable the normal orientation before offsetting with command line option -J.

• This can be used to save time if the model has already been post processed and the normals have already been oriented.

• This must be used for open models. The normals must have been oriented consistently using the User Interface. This option will then ensure that troffs will not re-orient the normals in the opposite direction.

Default. The normal are oriented as required by the STL standard.

 

Option -m: merging triangle vertices

Those triangle vertices which lay near enough to each other are merged into one vertex after the triangles are read into troffs. The maximum distance between the points to be joined can be given with command line option -m.

Defaults. The default value for the distance is 0.001 units.

Recommendations. The successful merging of vertices is essential for the neighbour finding and later the orientation of triangles in troffs. The default value for merge distance might be too small for some input files causing gaps to appear in the final result. One indication of this is a large number of separate components found in a presumably simple input file. The user can try to enlarge the value in order to fill these gaps. Large values cause triangle edges smaller than the value to disappear, changing the geometry of the model.

 

Option -M: accurate mode

The normal mode for troffs does no rounding with the offset triangles generated along sharp edges of the original surface. This leads to some tolerance violations. The user can have more accurate offsets with accurate mode. The accurate offset mode is set on with -M option on the command line:

% troffs -f ifile -o ofile -d 1 -M

With this mode the offset triangles generated along sharp edges are rounded. This is used in combination with offset tolerance option -a.

The accurate offset mode increases the size of the output file. The number of generated triangles depends on the given tolerance value -a.

 

Option -N: normal data in OBJ files

Requests that normal information be written to the OBJ file. This option only applies to OBJ output files.

Default. Normal information is not included in OBJ output files.

Related option. Option -O.

Recommendation. The WAVEFRONT Personal Visualizer is capable to create missing normal information when necessary, and better results are obtained if the normal information is not included in the file.

 

Option -o: specifying the output file

Specifies the name of the output file. If the option -o= is used, i.e. the equal sign "=" is used as file name, the output file name will be the same as input file name and the original input file ifile is renamed with a tilde as suffix.

Defaults. The defaults explained in Default extensions apply to this option.

Related options. The option -O specifies the format of the output file.

 

Option -O: specifying the output file format

This option is analogous to the option -F except that it applies to the output file. The argument is a single letter the meaning of which is given bellow:

 

a

ASCII STL

b

binary STL

w

WAVEFRONT OBJ

This option overrides defaults associated to the file extension.

Defaults. If not specified, troffs derives the output file format from the file extension.

Related options. Options -o and -N.

 

Option -P: disable offset post processing

By default, troffs will automatically apply post processing procedures to the offset model. All intersecting offset triangles are removed and all gaps left in the offset are filled. This operation can be disabled with command line option -P.

Default: Intersection removal and gap filling is done.

Alternative procedure. Use the triangle post processor tr2stl separately to examine and fill the gaps.

 

Option -R: remove self intersections

Large offset values can cause self-intersections in the resulting offset. With the option -R the user can invoke a self-intersection removal procedure during the offset. The command:

% troffs -f ifile -o ofile -R

would remove self-intersections from the offset surface. Self-intersection removal is a time consuming operation and the run time is usually doubles. The use of this option is only recommended if self-intersections are likely to happen.

Note: This option causes gaps to appear in the offset file.

Recommendation: The automatic gap filling is recommended (see option -P).

 

Option -S: open offset

The default action for troffs is to create a solid model. The offset surface is created and the borders of the offset surface are joined with the appropriate borders in the original surface. The user can create an open offset with the following option -S on the command line:

% troffs -f ifile -o ofile -S

Now only those triangles which are generated from the triangles in the original surface emerge. No joining is done between the two surfaces.

Option -S has no effect with originally solid models, because the offset of a closed surface is always a closed surface.

Default. A closed offset is created.

 

Option -V: controlling the verbosity

It has the same effect as when used with tr2stl. Check the Option Reference Guide of that program for more information.

VDA2IGS

The elements that can be taken from the input VDAFS file are the following:

 

CURVE

3D freeform parametric curves

SURF

3D freeform parametric surfaces

CONS

2D parametric trimming curves

FACE

Trimmed surfaces

A FACE is always represented as a Trimmed Parametric Surface (144), and functions of degree higher than 3 are always converted to NURBS. Other elements other than FACE of degree less or equal than 3 can be represented in IGES in different ways.

The method used to control how these elements are placed in the IGES files is based on the name of the target system. The following sections explain how the conversion is done for each target system that is currently recognised by vda2igs, and the Table below shows the default mapping.

 

Element type

degree

IGES entity

CURVE

any

NURBS

CONS

² 3

> 3

Splines

NURBS

SURF

² 3

> 3

Splines

NURBS

Recommendations. Using suitable entity types alone does not always guarantee that the data transfer will be successful. Several flags and fields must be filled in properly. It is highly recommended that the original VDAFS file be loaded into the User Interface and a new one generated before using vda2igs.

 

CATIA

 

Element type

degree

IGES entity

CURVE

any

NURBS

CONS

= 1

 

² 3

> 3

Composite Curve (Lines)

Splines

NURBS

SURF

² 3

> 3

Splines

NURBS

 

 

GRADE

The GRADE CAD system does not support functions of degree greater than 3. Consequently, if the VDAFS file has such functions, the file must be first loaded into the User Interface since at that time degree reduction can be applied.

All elements in the input file are converted to Splines. The conversion of CURVE and CONS geometries is text-based, and the result is an exact copy of the original model. The following Table specifies precisely how the entities are mapped:

 

Element type

degree

IGES entity

CURVE

² 3

Splines

CONS

² 3

Splines

SURF

² 3

Splines

 

HP/Solid Designer

 

Element type

degree

IGES entity

CURVE

any

NURBS

CONS

any

NURBS

SURF

any

NURBS

 

 

I-DEAS

 

Element type

degree

IGES entity

CURVE

² 3

> 3

Splines

NURBS

CONS

² 3

> 3

Splines

NURBS

SURF

² 3

> 3

Splines

NURBS

 

 

IGRIP

 

Element type

degree

IGES entity

CURVE

² 3

> 3

Splines

NURBS

CONS

² 3

> 3

Splines

NURBS

SURF

² 3

> 3

Splines

NURBS

 

 

PRO/Engineer

 

Element type

degree

IGES entity

CURVE

² 3

> 3

Splines

NURBS

CONS

= 1

 

² 3

> 3

Composite Curve (Lines)

Splines

NURBS

SURF

² 3

> 3

Splines

NURBS

 

 

Option Reference Guide

 

Option -C: compress the output

This argument requests that, when possible, redundant white spaces and zeroes be avoided. The program will run slower but, sometimes, files will become significantly smaller.

Default. Redundant white spaces and zeroes are not eliminated to save time.

 

Option -t: specifying the target application

The argument is one of the following strings: default, catia, hp, ideas, igrip, or proengineer.

Each string is associated to one of the systems described in the previous sections of this manual.

Defaults. The default string is default.

VDA2TR

An easy session with vda2tr is characterized by the message

vda2tr(info): all gaps were eliminated.

In this case, the resulting triangulation will contain no gaps and, most likely, it represents a solid. If the gaps are not eliminated then the resulting triangulation will also contain gaps and problems may arise in production because the slices will also have gaps. Furthermore, problems may occur evaluating the direction of facet normals in the post processor.

The technique used by vda2tr involves merging adjacent boundaries to form a solid. On the other hand, tr2stl adds triangles to fill one single gap. Finally, the GUI allows the user to connect gaps. A combination of all three methods may be needed in some cases.

If suitable parameters are given to vda2tr then most of the gaps will be eliminated, and the remaining ones will–hopefully–be too small to cause any trouble.

Recommendation. Only very experienced users can process models using vda2tr and tr2stl without the Graphical User Interface. The gap descriptions generated by both programs should be analyzed with the GUI before proceeding to production.

 

Tolerances

The four tolerances that are needed are coined the TEAR tolerances. TEAR stands for Triangulation, Edge, Averaging, and Refinement tolerances:

• The triangulation tolerance controls the discretization of the surfaces.

• The edge tolerance is always optional and it controls the maximum edge length of all facets. It can be used to avoid thin triangles.

• The averaging tolerance controls the size of the gaps which can be eliminated.

• The refinement tolerance controls the discretization of the trimming curves.

The choice of tolerances should be based on the following:

• The size of the model.

• If the model is open or closed.

Our rule-of-thumb is the following:

Averaging tolerance: about ten times the size of the refinement tolerance (the default value).

Refinement tolerance: about 0.05mm or less than 1/100 of the smallest extent of the model's bounding box.

For instance, take a model of size 3 by 5 by 5 (mm). Normally, a refinement tolerance of 0.01mm and an averaging tolerance of 0.2mm will suffice.

When triangulating open models the averaging tolerance must be specified with care. A relatively large tolerance may eliminate features along the gaps and produce undesired results.

Finally, a few words of caution. Models usually have errors either because there are faces or surfaces missing or because there are too many of them. Using a very large averaging tolerance may cause errors to go undetected until the triangulation is further processed by other tools such as the post processor or slicer.

 

Multiple input files

Sometimes it may be desirable, or even necessary, to store the model in several files. It is not necessary to merge them and create one single VDAFS file before using vda2tr. For example, suppose the model has been stored in the files file1.vda and file2.vda. The command

% cat file1.vda file2.vda | vda2tr <options>

would triangulate both files as if they had been merged in a single VDAFS file.

 

Automatic component separation

Normaly, vda2tr will place all the triangles in one STL file even if the input file is a collection of separate models. This is not always the ideal alternative, however, when the model contains mistakes and must be repaired using Boolean operations.

For instance, it may be that a pin or a through hole has not been properly built into the model and was simply placed near some surface. Another way to describe this situation is to say that some surfaces have not been trimmed against other surfaces.

In order to correct this problem, one can use Boolean operations, but the two models that will participate in the operation must be separated.

Depending on the geometry and the value of the gap tolerance, vda2tr can separate these components by triangulating each one separately and placing them in different output files. In order to obtain this effect, the user must include the string "%d" in the output file name, and the file name must be enclosed in quotes. For example,

% vda2tr -f model.vda -o "model%d.stl" É

will generate files named model1.stl, model2.stl, etc, one for each component.

 

Troubleshooting

It may happen that the conversion from VDAFS to STL fails to produce acceptable results. Quite often, the log file will contain good indications of what went wrong.

It is impossible to give precise information on what to do when the STL file is not good enough because there are so many reasons why this can happen. Instead, we present below a checklist that can be used in these situations.

 

The system refuses to accept the file

Symptom. The log file only contains "syntax error", "illegal character", and/or "record out of sequence" messages.

Possible cause. This is a strong indication that the file is not a legal VDAFS file. You may, for instance, have selected the wrong file by mistake. Or, if the file was received in some magnetic media, it may be corrupted.

VDAFS files are plain text files. You may display them on any xterm window using more, or load them into your favourite text editor. If the file does not look like a printable text file, it is certainly not a valid VDAFS file.

Recommendation. It is highly recommended that if someone wishes to send a file---any file---using magnetic media, then one separate copy be included in a separate media to avoid delays caused by corrupted data. The benefits of Rapid Prototyping are lost if the file is received corrupted, and a new copy re-sent. Normally, users do not keep track of the age of a magnetic media. These medias do get old, and eventually fail.

 

The resulting STL file has errors

Symptom. The log file and/or the gap description file reports problem areas.

Possible cause. It is possible that different tolerances must be specified. For example, increasing the Averaging tolerance may eliminate all problems. On the other hand, the file may contain too many surfaces (duplicates) or untrimmed surfaces.

Recommendation. The verification tools in the SURFACE menu in the Graphical User Interface should be used prior to triangulation. The next step is to classify the errors according to their type and relative size: separate the gaps from the non-gaps (duplicates, untrimmed surfaces), and whether they will or not interfere with the building process. The triangulation post-processor tr2stl can be of help to perform this task, and the result seen using the Graphical User Interface.

 

Option Reference Guide

 

Option -A: the averaging tolerance

Imagine you are a lonely segment that will eventually become the edge of a triangle. If you do not find a matching segment to form a pair then you will be part of a gap in the resulting part, and no one likes to be in a gap.

The averaging tolerance bounds the region in space that is used to search for the matching segment. If the trimming curves have been sufficiently discretized then the matching segment cannot be too far away.

When assigning a value to this tolerance the user should take into account if the model is open or closed. Because the tolerance is meant to be used to eliminate gaps, details along intentional gaps may be lost.

Note. Gap elimination is not done if the tolerance is zero.

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

 

Option -K: component information

This option does not take any argument. It causes vda2tr to print component information after the gap elimination has been done but before the triangulation starts.

If a model has only one solid, it will have only one component unless it has an inner void. If the input file contains more than one solid, it will, evidently, have more than one component.

Default. Detailed component information is not given. The total number of components is, however, given by default.

Related options. Option -V.

 

Option -N: altering the default behavior

The argument is a single letter that alters the default behavior. The following Table explains the different options:

c

Prevents the display of the CANCEL window.

d

Prevents the deletion of degenerated faces. Faces which have a domain whose area is ZERO constitutes an error except in very rare cases.

o

Prevents anything from being written in the output file. Useful for debugging purposes only.

r

Enables data reduction along the face boundaries. This option should only be used with models originating from CAD systems known to create very dense trimming curves.

s

Displayes a termination note when done.

t

Avoids the triangulation stage and it is used when the model is to be verified only.

w

Prevent the wire frame from being created in the wire frame file. Instead, only the gaps are written.

   

 

Option -o: specifying the output file

Specifies the location of the output file.

Defaults. The default is binary STL unless the output file extension specifies otherwise (see Default extensions in Part I of this Manual).

Related options. The option -O specifies the output file format.

 

Option -O: specifying the output format

Three file formats are supported, ASCII and binary STL, and CFL, determined by the argument to the option -O. This argument is a single letter and it is called the format specifier. The default extensions associated to each format specifier are summarized in the following Table:

 

a

ASCII STL

.astl

b

binary STL

.stl

C

CFL

.cfl

Default. The default file format is binary STL unless the file extension determines otherwise.

 

Option -R: the refinement tolerance

The argument is a tolerance used to discretize the trimming curves. For triangulation purposes alone, it could always equal the triangulation tolerance. However, seldom a single tolerance is useful. One of the purposes of the refinement tolerance is to obtain good accuracy for the reproduction of fine details.

It is also used in the pre-processing stage used to eliminate the gaps between adjacent trimming curves.

Default. There is none, and it must always be specified.

 

Option -T: the triangulation tolerance

The argument is a tolerance that controls the maximum Euclidean distance between the original and the triangulated models. Due to the nature of the algorithm used, most of the triangles will be closer than the desired maximum.

Experiments indicate that the results are near optimal. Halving the tolerance at most doubles the number of triangles. The user should keep in mind that the refinement tolerance also determines the number of triangles that are used along the boundaries.

Default. There is none. However, it is not needed if the triangulation will not be performed.

 

Option -w: specifying a gap description

The wireframe model, or simply wire frame for short, and a description of the problem areas in the model is obtained using the option -w. The command

% vda2tr -f test -o test -w=

will create the file test-wf.vda in the current working directory, because the equal sign indicates that it should use the same path as given in the option -o. Evidently, one can specify a path instead of the equal sign, remembering that the default extension is -wf.vda. Furthermore, if the option -o was not given then this is the only alternative, that is, the equal sign syntax is not allowed because there is no default path available.

 

The contents of the wire frame file

Using the same terminology as the VDAFS standard, the wire frame file contains a collection of elements. The only geometrical elements are polylines represented as CURVE elements. Individual polylines will normally not be of much interest.

The file may contain two non-geometrical elements, namely WF and ERRORS:

• The element named WF represents the wire frame; it is the set of all discretized trimming curves in the input file after the pre-processing stage (and thus before the triangulation stage).

• The element ERRORS is a SET representing all the portions of the wire frame considered to be gaps, where a gap is an edge of a triangle which has no corresponding neighbor.

In addition to the geometrical elements, topological information is stored in the form of comments at the end of the file. This can be useful when the user wishes to extract a subset of the model surrounding the gaps using vdaselect.

 

Option -W: wire frame file format

The option -W controls whether the wire frame file will be written using VDAFS version 1 or 2 by simply appending the version number after the option.

Version 1 files contain less information. The WF element is a SET, whereas in version 2 files it is a GROUP. Furthermore, GROUP elements are used to indicate which curves belong to the corresponding surface or face allowing the user to associate the resulting trimming curves created by vda2tr with the elements in the input file.

Default. VDAFS version 2 is used.

 

Option -X

The option -X takes no argument and it causes vda2tr to drop all surfaces which have no faces attached to it. For example, if it is used with an input file represented in VDAFS version 1 then the entire file is discarded. Therefore, it should be used only with version 2 files.

Frequently, version 2 files have bogus surfaces which will cause gaps and errors in the construction of the wire frame model. In these special cases, this option may come to rescue and eliminate all problems with the file.

 

The Selection Mechanism

 

Option -s

It is possible to triangulate just a subset of the model by selecting the elements using the option -s. The argument is a regular expression. All characters in the regular expression are converted to uppercase. This is because the VDAFS standard does not allow lowercase characters in names of elements.

Those elements with names that match the regular expressions are processed. The remaining ones are ignored.

 

Option -x

This option excludes elements from the input file. It takes as argument a regular expression which specifies which elements should be discarded from the input. If the element discarded is a surface then all the associated faces will also be discarded.

 

Option -V: controlling the verbosity

The argument is an integer that determines the amount of information written to the log file. Setting the verbosity to n causes all messages associated to level n and higher to be issued.

 

1

The element names selected from the input file(s).

2

The names of the surfaces being triangulated.

3

The id of vda2tr, including the version number, the name of duplicate surfaces, and component information.

4

Statistics (memory usage).

5

Timings for each phase.

6

The HEADER names from the input file(s), how many surfaces triangulated so far ("done so far" messages).

7

Default values assigned to tolerances, default actions taken, the total number of triangles generated, the object's bounding box and extents, the names of the elements with gaps.

Specifying a verbosity level equal to zero or greater than 7 is equivalent to -S.

Default. The current default value is 6.

VDASELECT

This is one of the few programs that takes arguments in addition to options. The arguments to vdaselect are regular expressions indicating which entities to take from the input file.

If the user selects, for instance, a entity that is a FACE, all the entities referenced by the FACE are also included in the output file. Here is an example:

% zcat file.vda.Z | vdaselect fac1 > fac1.vda

The entity whose name matches the regular expression "FAC1" is placed in the file fac1.vda together with all entities that it references.

Notice that no option exists to name an output file. Output redirection must be used as explained in General Principles in Part I of this Manual.

 

Option Reference Guide

 

Option -f: specifying the input file

Specifies the location of the input file.

Defaults. The defaults explained in Default extensions apply to this option.

APPENDICES

 

Glossary

 

Faces and trimming curves

We say that a part is composed of a set of faces and the boundary of a face is defined by a set of trimming curves. The shape of the face is determined by a bi-variate parametric composite function that we will refer to as a surface. It is a composite function because usually it is a collection of patches.

The trimming curves act as a pair of scissors that cut out the unwanted portions of the surface. Each set of trimming curves defining a face must be simple and non-intersecting. Some CAD systems do not support trimming curves and in that case the boundary of the surface is the trimming curve.

 

Topological information and components

A face is said to be adjacent or connected to another face when the corresponding boundaries defined by the trimming curves are within a given tolerance.

This sort of information is referred to in this document by topological information.

A set of connected faces is called a component.

Components vs. shells

In geometric modeling, a component, or a shell, is usually assigned its topological meaning (more precisely, it is related to the zeroth Betti number of the plane model). For instance, two disjoint non-intersecting spheres amount to two components; both a teacup with a handle and a doughnut have one component.

Although similar, the usage of component in this document differs somewhat. Consider a sphere within a sphere, e.g. a soccer ball. In this case, vda2tr would flag two components because the surface(s) used to model the empty space do not touch the surface(s) used to model the outer side of the ball.

 

Holes and gaps

In geometric modeling, a hole is usually assigned its topological meaning (more precisely, it is related to the first Betti number of the plane model). For instance, both a teacup with a handle and a doughnut have exactly one hole.

In this document, it has the meaning of a gap or crack between two adjacent faces in the model, or a "hole" caused by a missing surface or face; it is a place in the model were one could look "inside". In this sense, it bears no relationship with its topological counterpart.

 

Model, object, and part

These terms are used interchangeably. It is the set of all surfaces and faces collected from the input file.

 

 

Data Exchange Formats

 

The STL Standard

A correct input file can contain one or more solids or volumes represented using triangles. A model in STL format is a solid iff:

• Each triangle has exactly 3 neighbours, one along each edge,

• and triangles do not intersect except at common edges and vertices.

Input files usually contain mistakes which, or may not, affect the quality of a manufactured part. Generally speaking, quality may suffer if the size of the error is larger than the accuracy of the process. The mistakes that can be present in input files are illustrated in the following Figures.

Special cases of these errors are overlapping triangles and open models.

 

 

The VDAFS Standards

First of all, VDAFS files are ASCII, textual files. Consequently, they can be inspected using word processors, and all operating system commands that operate on textual files can be used. On UNIX-like platforms, examples of word processors are Emacs, vi, jot (SGI only), and useful system commands includes more, cat, grep, and so on.

There are two versions of VDAFS. Version 1 does not have the concept of faces and the facilities for structuring the data are very limited. Version 2 is more sophisticated. It allows one to represent trimmed surfaces and their topology, and structure the data in a hierarchical fashion. Unfortunately, it also has more rules that are commonly violated by existing CAD systems.

The syntax of both versions is identical. At the lowest level, a VDAFS file is a sequence of lines of size exactly 80 characters. At a higher level, a VDAFS file is a sequence of elements. An element is constructed using the following syntax:

<Name> = <Keyword>

or

<Name> = <Keyword> / <Parameters>

In the last case, the parameters are a list of numbers or names of other elements separated by commas. An example of a VDAFS files is shown below:

 

STRIM100 = HEADER / 20 00000010

************************************************************************00000020

VDAFS VERSION : 2.0 00000030

------------------ SENDER ----------------------------------------------00000040

COMPANY : 00000050

SENDER NAME : 00000060

TELEPHONE : 00000070

ADDRESS : 00000080

TRANSMITTING SYSTEM : 00000090

TRANSMISSION DATE : 12/09/1990 11h52mn42s 00000100

FILENAME : 00000110

------------------ SUBJECT ---------------------------------------------00000120

PROJECT NAME : 00000130

SUBJECT CODE : 00000140

VERSION : 00000150

CONFIDENTIALITY : 00000160

VALIDITY DATE : 00000170

------------------ RECEIVER --------------------------------------------00000180

COMPANY : 00000190

RECEIVER NAME : 00000200

************************************************************************00000210

V0000001 = BEGINSET 00000220

V0000002 = SURF / 1,1,0.000000000000000D+00 , 00000230

0.100000000000000D+01 ,0.000000000000000D+00 ,0.100000000000000D+01 ,00000240

4,15,0.238349052421457D+02 ,-0.316690832177725D-01 , 00000250

...

0.134164612143594D+01 ,0.416398927915839D-01 ,-0.183448339656512D+01 ,00056310

-0.128339265151975D+01 ,0.249800180540660D-15 ,0.208166817117217D-16 ,00056320

0.849704853842326D+00 ,0.116129436654081D+01 ,-0.832667268468867D-16 ,00056330

0.624500451351651D-16 00056340

JTO = ENDSET 00056350

STRIM100 = END 00056360

The first element is always the HEADER, and the last one is always the END. The HEADER element contains free-style lines, and there is no standard regarding the format of these lines nor the information they should contain.

There are many VDAFS dialects. Different CAD vendors have their own implementation. The batch tools can read practically all of them.

 

 

Regular expressions

The syntax of a regular expression is the same as used by the text editor Emacs and, for all practical purposes, the syntax is the same as the one used by the UNIX grep and egrep utilities, and the user may try the on-line manual pages of those utilities for more information.

A rather complete description is also given here. Notice that the syntax allows for many patterns that are not useful for the purposes of the batch tools.

In the following description character excludes new line:

• A "\" followed by a single character other than new line matches that character.

• The character "^" matches the beginning of a line.

• The character "$" matches the end of a line.

• A "." (dot) matches any character.

• A single character not otherwise endowed with special meaning matches that character.

• A string enclosed in brackets "[ ]" matches any single character from the string. Ranges of ASCII character codes may be abbreviated as in "a-z0-9". A "]" may occur only as the first character of the string. A literal "-" must be placed where it can't be mistaken as a range indicator.

• A regular expression followed by an "*" (asterisk) matches a sequence of 0 or more matches of the regular expression.

• A regular expression followed by a "+" (plus) matches a sequence of 1 or more matches of the regular expression.

• A regular expression followed by a "?" (question mark) matches a sequence of 0 or 1 matches of the regular expression.

• Two regular expressions concatenated match a match of the first followed by a match of the second.

• Two regular expressions separated by "|" or new line match either a match for the first or a match for the second.

• A regular expression enclosed in parentheses matches a match for the regular expression.

The order of precedence of operators at the same parenthesis level is the following: "[ ]", then "*+?", then concatenation, then "|" and new line.

When using characters in a regular expression other than letters and numbers it is safest to enclose the string in double quotes, otherwise there is the chance that your favourite command line interpreter will use them for something else.