4.25. Grayscale to Shell

This option enables clustering elements under user-defined part IDs according to a given grayscale image. Grayscale image files have to be provided in an ASCII-based *.pgm format. This can be exported from any image-processing software.

The grayscale values of each pixel in the image are assigned to a point cloud that is generated internally, and because of that, you must provide information about the image size for the point cloud to include the whole image. The point cloud starts generating at the bottom-left corner, which is given the global (0,0,0) coordinate. The generated point cloud functions as the source mesh, and there are cases where it might be necessary to assign simple transformations to the generated point cloud.

4.25.1. Main Mapping Command

ENVYO = GRAYSCALE-SHELL

4.25.2. Input and Output Meshes

SourceFile = STRING

Define the name and, if needed, the path of the source grayscale image file.

TargetFile = STRING

Define the name and, if needed, the path of the target file. This must be an LS-DYNA mesh.

MappingResult = STRING

Define the result file name. The mapping result is written into this newly generated file.

TransformedMeshFile = STRING

Define the name of the transformed mesh file. The transformation result is written into this newly generated file.

4.25.3. Transformation Options

Simple transformation options are available for this mapping option which includes moving, scaling, and rotating the source mesh.

TRANSFORMATION = YES

NO

Turns the transformation option on or off.

WriteTransformedMesh = YES

NO

Activates the output of the transformed mesh file to control the applied transformation's accuracy. You must define a TransformedMeshFile for this option (see Input and Output Meshes).

RotateSRC = DOUBLE;X

DOUBLE;Y

DOUBLE;Z

DOUBLE; DOUBLE DOUBLE DOUBLE

Source mesh rotates by an angle (first value) in degrees on the defined axis. Predefined axis are X, Y, and Z, but a user-defined axis is also possible by separating three double values with a space, following a semicolon (;x y z).
MoveSRC = DOUBLE DOUBLE DOUBLESource mesh moves along the user-defined vector (x y z).
ScaleSRC = DOUBLESource mesh scales about the origin using the defined scale factor.

4.25.4. Mapping Options

ALGORITHM = ClosestPointThe only available option is ClosestPoint. Values are mapped to the nearest node, integration point, or element center.
SORT = BUCKETAlways use bucket sort for a significant speed-up of the search algorithm.
REPEAT = YESEnable this option to ensure that all elements and integration points receive mapped data. When there is a significant difference in element sizes between the source and target meshes, the default bucket refinement may be insufficient to cover all points, sometimes by design. In such cases, this flag must be set to guarantee complete data coverage.
ImageSize = DOUBLExDOUBLEDefine the size of the image. The first value designates the image's length, and the second value is the width. Consider the unit system of your target mesh when using this option.
NumClusterIDs = INTNumber of cluster IDs that are generated. This card must be followed by ClusterID# declarations of the following card.
ClusterID#i = INT INT INTDefine the respective gray scale range for each cluster ID in the target mesh. The first value represents the cluster ID, the scond value is the lower value of the gray scale range, the third value is the upper value of the gray scale range. See the example below.

Example 4.1:

ClusterID#1 = 3 120 200

The three intergers given are: 3, 120, and 200. 3 is the first cluster's target cluster ID. 120 is that cluster's minimum grayscale value. 200 is that cluster's maximum value.