Overview | All Modules | Tutorial | User's Guide | Programming Guide

COVISE Online Documentation


Module category: Tools



Transform

Transform manipulates grids and geometry objects. Transform makes it possible to mirror, translate, scale, rotate and tile objects and their data.

TransformModule.png

Transform is available for COVISE version 4.5 and higher. It's available for all supported platforms.

Parameters

Note that the reader may override the values of the parameters below, if he gets a geometry object (first port) with the attribute TRANSFORM. If this is the case, the module expects for each parameter whose value should be overridden a subchain with the following structure: first comes the parameter name, and, separeted by a blank, another chain indicating the value to be used. If several parameters are overridden, these subchains are separated by newline characters. As for the subchain indicating the value, it is always made out of numbers, even for boolean and choice parameters, which may be several and separated by blanks in the case of vector parameters.

Transform: Mirror

Name Type Description
normal_of_mirror_plane Vector Normal of the mirror plane.
distance_to_origin Scalar Distance to origin.
MirroredAndOriginal Boolean It determines whether the original model is also included in the output or only the mirrored geometry.
In this case the output ports deliver a set with two elements if the object received by the matching input port is a grid (in a broad sense of the word embracing polygons, triangle strips, lines, points and all kinds of grids), a vector field or a scalar field. In these cases the first element of the set is the original object, and the second one is the reflected object. If the input object is a scalar field, then the second element is the same as the first, which is also the same as the input scalar field.

Transform: Translate

Name Type Description
vector_of_translation Vector Every object is translated by this vector.
In this case and when the input is a grid, the output contains only the translated object and not the original one. For scalar or vector fields the output is the same as the input.

Transform: Rotate

Name Type Description
axis_of_rotation Vector Direction of the axis.
one_point_on_the_axis Vector One point on the axis.
angle_of_rotation Scalar Angle in degrees.
In this case and when the input is a grid or a vector field, the output contains only the rotated object and not the original one. For scalar fields the output is the same as the input.

Transform: Scale

Name Type Description
scaling_factor Scalar Scaling factor.
new_origin Vector The object is translated by this vector.
The points of the geometry are first of all translated by the vector new_origin, and afterwards, the points are scaled according to scaling_factor. In this case and when the input is a grid, the output contains only the scaled object and not the original one. For scalar or vector fields the output is the same as the input.

Transform: MultiRotate

Name Type Description
axis_of_(multi-)_rotation Vector Direction of the axis.
_one_point_on_the_axis Vector One point on the axis.
angle_of_(multi-)rotation Scalar Angle in degrees.
number_of_rotations Scalar Number of rotations.
In this case the output ports generate a set with as many elements as given by number_of_rotations. In the case of grids or vector fields these output elements are those obtained by successive number_of_rotations rotations up to the angle angle_of_(multi-)rotation. In the case of scalar fields number_of_rotations copies of the input scalar field are delivered through the set.

Transform: Tile

Name Type Description
TilingPlane Choice Tiling plane: XY, YZ or ZX.
flipTile Boolean It indicates whether the tiles are obtained by flipping the original model (combinations of reflections) or just by simple translation.
TilingMin Vector It describes the position of the tile with the smallest coordinate values.
TilingMax Vector It describes the position of the tile with the largest coordinate values.
In this case the output ports generate a set with as many elements as given by the product (TilingMax(0) - TilingMin(0))*(TilingMax(1) - TilingMin(1)). The elements of the tiling pattern are obtained by flipping or translation according to the parameter flipTile. The dimensions of a tile are computed from all geometry input objects. Nevertheless, you may prevent an object, a DistributedObject, from contributing to this tile dimension computation, if the getAttribute function applied to it with the argument "NO_BBOX" is not NULL.

Transform: Other parameters
Name Type Description
InDataType_0...3 Choice Magnitude options:
TrueVectorOrScalar,
PseudoVectorOrScalar,
Displacements.
createSet Boolean Its value is only relevant in the case of transformations that would create multiple objects for each input object. This is namely the default behaviour in the case of tiling and multirotations, and mirroring too, when the original geometry is also to be displayed.
Sometimes this default behaviour might cause performance problems if the name of element objects in the output sets is too large. In this case, you may try setting this parameter to false, and all these output objects shall be gathered in a single object, provided that it is an unstructured one:
Points,
Lines,
Polygons,
TriangStrips,
UnstructuredGrid,
Float or
Float

With these parameters you may declare the nature of the magnitudes you are transforming. In the pseudovector or pseudoscalar case, the output field flips sign with respect to the output using the first option if the jacobian of the transformation is negative. The third case, Displacements, is only meaningful when you are tiling the model; the output is the correct continuation of the input vector field if it has the meaning of displacements.

Input Ports

Name Type Description
requiredgeo_in Polygons
TriangleStrips
Lines
Points
UnstructuredGrid
UniformGrid
RectilinearGrid
StructuredGrid
Grid or geometry objects.
optionaldata_in0 ... data_in3 Float
Vec3
Float
Vec3
Scalar or vector data.

Output Ports

Name Type Description
outputgeo_out Polygons
TriangleStrips
Lines
Points
UnstructuredGrid
UniformGrid
RectilinearGrid
StructuredGrid
Transformed objects.
dependdata_out0 ... data_out3 Float
Vec3
Float
Vec3
Scalar or vector data on the transformed objects.

Examples

Suppose we have a symmetrical object.

Figure: One half of the object
TransformRenderer.png

We use Transform in the map covise/net/examples/Transform.net to construct the whole object.

Figure: covise/net/examples/Transform.net
TransformMap.png

RWCovise_1 reads in the computational grid of a channel with two inlets. RWCovise_2 reads in the data on the surface. DomainSurface computes the outer surface of the channel. CutGeometry cuts away one half of the channel. You can see the result in Renderer2. The first figure shows you a screenshot of the original (half) object with wireframes. Transform mirrors the object and its data. The mirror plane is described by the normal vector (0,0,1). The origin is on the mirror plane. Colors translates the data into colors.

The second figure shows the whole channel in the renderer. Both the original non-mirrored and mirrored geometries are shown because the value of parameter MirroredAndOriginal is true.

Figure: Result in the renderer
TransformRendererMirrored.png

In the next example we illustrate the use of tiling. In this case we are using the flipping option. The first renderer snapshot shows the effect on a normal vector field. Note that we perform the tiling by mirroring. The second image shows the result if the input vector field is assumed to be a field of displacements.

Figure: covise/net/examples/TransformTile.net
TransformTileMap.png

Figure: Tiling a normal vector field
TransformTileNormal.png

Figure: Tiling a displacements vector field
TransformTileDisplacements.png


Authors: Martin Aumüller, Ruth Lang, Daniela Rainer, Jürgen Schulze-Döbold, Andreas Werner, Peter Wolf, Uwe Wössner
Copyright © 1993-2022 HLRS, 2004-2014 RRZK, 2005-2014 Visenso
COVISE Version 2021.12