Professional Documents
Culture Documents
This manual, as well as the software described in it, is furnished under license and may be
used or copied only in accordance with the terms of such license. The content of this
document is furnished for informational use only, and is subject to change without notice.
InnovMetric Software Inc. assumes no responsibility or liability for any errors or inaccuracies
that may appear in this document.
Except as permitted by such license, reproduction in whole or in part in any way without
written permission from InnovMetric Software is strictly prohibited.
Contents
4 Introduction
4 Contents of the Translators Reference Guide
4 Related documentation
5 Technical support
6 1. Polygonal Translators
7 1.1 Information extracted from polygonal files
8 1.2 Controlling the DXF translator
8 1.3 Controlling the IGES translator
9 1.4 Controlling the STL translator
10 1.5 Controlling the VRML translator
10 1.6 Hints
11 2. Image Translators
12 2.1 Image translation strategy
12 2.2 Hints
This document provides useful information about the PolyWorks polygonal and image
translators. It also describes IMConvert and IMSlice, command line tools; the first
translates files from one polygonal format to another, and the second slices polygonal
models.
This Translators Reference Guide may be used in conjunction with a version 12.1 or later
release of the following InnovMetric Software products: IMAlign™, IMMerge™, IMEdit™,
IMCompress™, IMTexture™, IMInspect™, IMSurvey™, and IMView™.
1. Polygonal Translators
This chapter describes the polygonal translation strategy provided by InnovMetric
Software’s products. Features specific to particular formats are also presented.
2. Image Translators
This chapter describes InnovMetric Software’s image translators.
Related documentation
The following documents offered in PDF format, available from the Help > Reference
Guides menu of the PolyWorks/Workspace Manager, offer related information:
The PolyWorks® Reference Guide presents the PolyWorks software suite, including the
PolyWorks/Workspace Manager, and explains how to customize the user interface by
means of visual layouts. It also explains how to invoke modules from the PolyWorks/
Workspace Manager. Finally, appendixes describe the installation procedure for both
node-locked and floating licenses.
Technical support
This chapter describes the polygonal translation strategy implemented by InnovMetric Software. Features
specific to particular formats are also presented.
The last two types cannot be mixed into one model file. If such a case occurs, the
invoked translator program would preserve texturing information first, disregarding
color-per-vertex information.
Grouping information.
Group labels.
Material properties.
Vertex normals.
Table 1 that follows shows the type of information that is extracted by four polygonal
translators provided by InnovMetric Software. All these translators are bidirectional,
which is to say that they can read and write polygonal files.
dxf_3dface
dxf_polyface
iges_108
iges_128
stla
stlb
stl
By default, the stl translator reads/writes binary STL files. To read/write ASCII files with
the stl translator, type:
stl_ascii
stl_binary
vrml_1
vrml_2
1.6 Hints
If you are processing a texture-mapped model or an OBJ file using materials, the file
input to an InnovMetric Software product will usually contain references to one or
several external files. These external references may be expressed using a path relative
to the position of the input model file. To preserve these relative paths, the output files
created by an InnovMetric Software product should be placed in the directory
containing the input model file; otherwise, the relative paths will be transformed into
absolute paths.
First, the file extension is extracted. If the extension corresponds to the name of an
image translator, the translator program is directly invoked.
Otherwise, a list of format magic numbers is inspected in order to identify the input
image file format. If the image magic number is matched with a supported image
format, the image is immediately translated.
If the input image format is not supported, it is not translated. However, the image
file name is kept within the internal software structures, and written in the polygonal
files generated by InnovMetric Software’s products. Therefore, a texture-mapped
model may be successfully processed by an InnovMetric Software product even
though it uses a texture map expressed in an unsupported file format.
2.2 Hints
All InnovMetric Software products support 24-bit RGB images and 32-bit RGBA images.
Gray scale images are internally converted to 24-bit images.
IMConvert is a command line program. Please ensure that IMEdit has been properly installed on your system
before trying to use it.
imconvert input_model_file
[-fi model_format]
[-divide value]
[-multiply value]
[-pose pose_file]
[-slice slicing_step]
[-closure value]
[-start x y z]
[-verbose]
imconvert input_model_file
[-fi model_format]
[-divide value]
[-multiply value]
[-pose pose_file]
[-cloud]
[-closure value]
[-start x y z]
[-verbose]
Note that the -slice and -cloud parameters are mutually exclusive.
An input model file to IMConvert must be specified. This file should contain the
description of a polygonal model written in a format supported by InnovMetric
Software.
Two methods can be used to specify the format in which a model file is written. If the
file has an extension that is a format name, IMConvert automatically selects the
translator program corresponding to this format. Otherwise, you have to use the -fi
parameter with the format name as an argument.
Examples
Let us assume that the fmt model format is supported by IMConvert. Then, the
following sequences are valid methods that allow specifying an input model file
written in this format:
model.fmt
IMConvert may be used to convert an input model file to another supported polygonal
format.
The -o parameter may be used to simultaneously specify the output model file name
and the output polygonal format. If the specified file name has an extension that is a
format name, IMConvert automatically selects the translator program corresponding to
this format. Otherwise, you have to use the -fo parameter (description follows) to
specify a format.
With the -fo parameter, you can specify a polygonal format for the output model file.
The -fo argument must be a polygonal format that can be written by IMConvert.
IMConvert allows you to scale a polygonal model input from a file. Two scaling methods
are available. The -divide parameter may be invoked to divide all (x, y, z) point
coordinates by a specified value. The -multiply parameter may be invoked to
multiply all (x, y, z) point coordinates by a specified value.
Every InnovMetric Software interface offers the View > Custom Views > Save command
that saves the model pose to a file. A pose file contains the rigid transformation matrix
applied to the model prior to rendering it on the computer screen. The -pose
parameter allows you to specify the path to a pose file to IMConvert. The
transformation matrix read from the pose file is applied to the input model.
If the -verbose parameter is invoked, various messages are sent to the standard
output; otherwise, IMConvert is silent.
The slicing algorithm translates a slicing plane, parallel to the X-Y plane, along the Z axis
by slicing_step increments. For every slicing plane position, the algorithm computes the
exact intersection between the plane and the input model, thus extracting one or
several polylines representing the intersection. The resulting polylines are then saved
to an external file. Supported formats for slices include dxf (Autodesk), igs (IGES), and
iv (Inventor).
By default, the first slice is located at the smallest z value of the input model. To modify
this behavior, you can specify the (x, y, z) coordinates of a starting point using the -
start parameter. This starting point does not have to be part of the input model. The
slicing algorithm uses it as a reference point and automatically determines the number
of slicing_step increments that must be added or subtracted to obtain a first slice lying
inside the input model’s bounding box.
IMConvert also allows the slicing of a model along an arbitrary axis. To achieve this
operation, the -pose parameter should be used to apply a transformation matrix to
the input model prior to slicing it. The slicing algorithm will then translate the slicing
plane along the Z axis of the new coordinate system. Afterward, the inverse
transformation is applied to the slices to bring them back to the coordinate system of
the original model. It should be noted that this transformation matrix is also applied to
a starting point specified using the -start parameter.
IMSlice allows you to automatically produce three sets of orthogonal slices along the X
axis, the X axis, and the Z axis. IMSlice manages three distinct calls to IMConvert. A
general call to IMSlice has the following format:
imslice input_model_file
[-fi model_format]
-o output_model_file
-fo model_format
-slice slicing_step
[-start x y z]
[-closure value]
[-verbose]
The IMSlice parameters have exactly the same meaning as their IMConvert equivalent.
IMSlice inserts an identifier in the specified output file name to identify the slicing axis.
If the output file name is base.ext, the generated files will be base_x.ext, base_y.ext, and
base_z.ext.
The -pose, -divide, and -multiply parameters may be used to transform or scale
the model coordinate system prior to saving the set of polygonal vertices.